From 0e23fdc16ca19f2420ccbbbb5da8ab718d12f437 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 17:20:49 +0100 Subject: [PATCH 01/61] :whale: Fixes Yarn missing in ARM images --- Dockerfile-arm32v7 | 3 +++ Dockerfile-arm64v8 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index 2c49e078..a7009c4b 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -8,6 +8,9 @@ ENV IS_DOCKER true # Create and set the working directory WORKDIR ${DIRECTORY} +# Install Yarn +RUN npm install -g yarn + # Copy over both 'package.json' and 'package-lock.json' (if available) COPY package*.json ./ diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 index 3cd8f48f..b3ab8bb5 100644 --- a/Dockerfile-arm64v8 +++ b/Dockerfile-arm64v8 @@ -8,6 +8,9 @@ ENV IS_DOCKER true # Create and set the working directory WORKDIR ${DIRECTORY} +# Install Yarn +RUN npm install -g yarn + # Copy over both 'package.json' and 'package-lock.json' (if available) COPY package*.json ./ From 9e3d728768a5e5b3dc6755c125c154bef607830c Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 20:47:37 +0100 Subject: [PATCH 02/61] :whale: Fixes Docker images for ARM-based devices --- Dockerfile-arm32v7 | 16 +++++++--------- Dockerfile-arm64v8 | 6 ++---- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index a7009c4b..437d1ebf 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -8,26 +8,24 @@ ENV IS_DOCKER true # Create and set the working directory WORKDIR ${DIRECTORY} -# Install Yarn -RUN npm install -g yarn +# Copy over both 'package.json' and 'yarn.lock' +COPY package.json ./ +COPY yarn.lock ./ -# Copy over both 'package.json' and 'package-lock.json' (if available) -COPY package*.json ./ - -# Install project dependencies +# Install dependencies RUN yarn # Copy over all project files and folders to the working directory COPY . . -# Build initial app for production +# Build Dashy for production RUN yarn build -# Expose given port +# Expose users port EXPOSE ${PORT} # Finally, run start command to serve up the built application CMD [ "yarn", "build-and-start"] -# Run simple healthchecks every 5 mins, to check the Dashy's everythings great +# Enable Docker healthcecks, to ensure Dashy is running correctly HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 index b3ab8bb5..c5fd92f6 100644 --- a/Dockerfile-arm64v8 +++ b/Dockerfile-arm64v8 @@ -8,11 +8,9 @@ ENV IS_DOCKER true # Create and set the working directory WORKDIR ${DIRECTORY} -# Install Yarn -RUN npm install -g yarn - # Copy over both 'package.json' and 'package-lock.json' (if available) -COPY package*.json ./ +COPY package.json ./ +COPY yarn.lock ./ # Install project dependencies RUN yarn From 8ad600ec70ba9e5b444ca0d257f59476bbff9193 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 22:13:34 +0100 Subject: [PATCH 03/61] :beers: Stupid ARM image failing to build on Docker Hub --- Dockerfile-arm32v7 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index 437d1ebf..fa6036ba 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -1,4 +1,6 @@ -FROM arm32v7/node:latest +FROM alpine:3.8 + +RUN apk add --no-cache nodejs yarn --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community # Define some ENV Vars ENV PORT 80 @@ -12,20 +14,20 @@ WORKDIR ${DIRECTORY} COPY package.json ./ COPY yarn.lock ./ -# Install dependencies +# Install project dependencies RUN yarn # Copy over all project files and folders to the working directory COPY . . -# Build Dashy for production +# Build initial app for production RUN yarn build -# Expose users port +# Expose given port EXPOSE ${PORT} # Finally, run start command to serve up the built application CMD [ "yarn", "build-and-start"] -# Enable Docker healthcecks, to ensure Dashy is running correctly +# Run simple healthchecks every 5 mins, to check the Dashy's everythings great HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check From c26184265939ef0ebbc7cf47925284be1bf9c744 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 22:14:16 +0100 Subject: [PATCH 04/61] :beers: Run dos2unix over dockerfile in a desperate attempt to fix it --- Dockerfile-arm64v8 | 62 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 index c5fd92f6..c6173499 100644 --- a/Dockerfile-arm64v8 +++ b/Dockerfile-arm64v8 @@ -1,31 +1,31 @@ -FROM arm64v8/node:latest - -# Define some ENV Vars -ENV PORT 80 -ENV DIRECTORY /app -ENV IS_DOCKER true - -# Create and set the working directory -WORKDIR ${DIRECTORY} - -# Copy over both 'package.json' and 'package-lock.json' (if available) -COPY package.json ./ -COPY yarn.lock ./ - -# Install project dependencies -RUN yarn - -# Copy over all project files and folders to the working directory -COPY . . - -# Build initial app for production -RUN yarn build - -# Expose given port -EXPOSE ${PORT} - -# Finally, run start command to serve up the built application -CMD [ "yarn", "build-and-start"] - -# Run simple healthchecks every 5 mins, to check the Dashy's everythings great -HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check +FROM arm64v8/node:latest + +# Define some ENV Vars +ENV PORT 80 +ENV DIRECTORY /app +ENV IS_DOCKER true + +# Create and set the working directory +WORKDIR ${DIRECTORY} + +# Copy over both 'package.json' and 'package-lock.json' (if available) +COPY package.json ./ +COPY yarn.lock ./ + +# Install project dependencies +RUN yarn + +# Copy over all project files and folders to the working directory +COPY . . + +# Build initial app for production +RUN yarn build + +# Expose given port +EXPOSE ${PORT} + +# Finally, run start command to serve up the built application +CMD [ "yarn", "build-and-start"] + +# Run simple healthchecks every 5 mins, to check the Dashy's everythings great +HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check From b5b50bc154b64606c730b7f7759aeac37434fd0e Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 22:25:27 +0100 Subject: [PATCH 05/61] :confounded: Attempting to fix Docker ARM build --- Dockerfile-arm32v7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index fa6036ba..44941b1c 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -1,6 +1,6 @@ FROM alpine:3.8 -RUN apk add --no-cache nodejs yarn --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache nodejs=14.17.4-r0 yarn --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community # Define some ENV Vars ENV PORT 80 From f7eac66d6529f76ec66adeafadf03ab060205a8b Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 22:34:33 +0100 Subject: [PATCH 06/61] :confounded: Attempting to fix Docker ARM build --- Dockerfile-arm32v7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index 44941b1c..3ecd7742 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -1,6 +1,6 @@ FROM alpine:3.8 -RUN apk add --no-cache nodejs=14.17.4-r0 yarn --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --update --no-cache nodejs npm yarn # Define some ENV Vars ENV PORT 80 From c8c730f9912bcb33e7fdf6e9db2dc6170177c6ee Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 22:45:46 +0100 Subject: [PATCH 07/61] :confounded: Attempting to fix Docker ARM build --- Dockerfile-arm32v7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index 3ecd7742..774013f1 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -1,4 +1,4 @@ -FROM alpine:3.8 +FROM alpine:3.14 RUN apk add --update --no-cache nodejs npm yarn From 4fdaf27191bb66a7a49c456df8eef7df00f0635d Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 22:56:53 +0100 Subject: [PATCH 08/61] :neutral_face: Build almost working --- Dockerfile-arm32v7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 index 774013f1..8da83fa2 100644 --- a/Dockerfile-arm32v7 +++ b/Dockerfile-arm32v7 @@ -1,4 +1,4 @@ -FROM alpine:3.14 +FROM arm32v7/alpine:3.14 RUN apk add --update --no-cache nodejs npm yarn From 84080433f77c7c95707182d193d1a5c28272d355 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Fri, 6 Aug 2021 23:23:57 +0100 Subject: [PATCH 09/61] :put_litter_in_its_place: Binned the ARM Docker containers, as DockerHub cannot build --- Dockerfile-arm32v7 | 33 --------------------------------- Dockerfile-arm64v8 | 31 ------------------------------- 2 files changed, 64 deletions(-) delete mode 100644 Dockerfile-arm32v7 delete mode 100644 Dockerfile-arm64v8 diff --git a/Dockerfile-arm32v7 b/Dockerfile-arm32v7 deleted file mode 100644 index 8da83fa2..00000000 --- a/Dockerfile-arm32v7 +++ /dev/null @@ -1,33 +0,0 @@ -FROM arm32v7/alpine:3.14 - -RUN apk add --update --no-cache nodejs npm yarn - -# Define some ENV Vars -ENV PORT 80 -ENV DIRECTORY /app -ENV IS_DOCKER true - -# Create and set the working directory -WORKDIR ${DIRECTORY} - -# Copy over both 'package.json' and 'yarn.lock' -COPY package.json ./ -COPY yarn.lock ./ - -# Install project dependencies -RUN yarn - -# Copy over all project files and folders to the working directory -COPY . . - -# Build initial app for production -RUN yarn build - -# Expose given port -EXPOSE ${PORT} - -# Finally, run start command to serve up the built application -CMD [ "yarn", "build-and-start"] - -# Run simple healthchecks every 5 mins, to check the Dashy's everythings great -HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check diff --git a/Dockerfile-arm64v8 b/Dockerfile-arm64v8 deleted file mode 100644 index c6173499..00000000 --- a/Dockerfile-arm64v8 +++ /dev/null @@ -1,31 +0,0 @@ -FROM arm64v8/node:latest - -# Define some ENV Vars -ENV PORT 80 -ENV DIRECTORY /app -ENV IS_DOCKER true - -# Create and set the working directory -WORKDIR ${DIRECTORY} - -# Copy over both 'package.json' and 'package-lock.json' (if available) -COPY package.json ./ -COPY yarn.lock ./ - -# Install project dependencies -RUN yarn - -# Copy over all project files and folders to the working directory -COPY . . - -# Build initial app for production -RUN yarn build - -# Expose given port -EXPOSE ${PORT} - -# Finally, run start command to serve up the built application -CMD [ "yarn", "build-and-start"] - -# Run simple healthchecks every 5 mins, to check the Dashy's everythings great -HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check From 79d8d1b036b4981b5cdda97cc99e1fd380994d77 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 14:15:45 +0100 Subject: [PATCH 10/61] :globe_with_meridians: Re: #126 - Adds missing translations --- src/assets/locales/en.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index b0ae0e40..6a3a6175 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -17,7 +17,13 @@ "remember-me-never": "Never", "remember-me-hour": "4 Hours", "remember-me-day": "1 Day", - "remember-me-week": "1 Week" + "remember-me-week": "1 Week", + "error-missing-username": "Missing Username", + "error-missing-password": "Missing Password", + "error-incorrect-username": "User not found", + "error-incorrect-password": "Incorrect Password", + "success-message": "Logging in...", + "logout-message": "Logged Out" }, "config": { "main-tab": "Config", @@ -59,7 +65,9 @@ "item-size-small": "Small", "item-size-medium": "Medium", "item-size-large": "Large", - "config-launcher-label": "Config" + "config-launcher-label": "Config", + "config-launcher-tooltip": "Update Configuration", + "sign-out-tooltip": "Sign Out" }, "updates": { "app-version-note": "Dashy version", From 9f33bacf1618e42956a9e1e22810650f7a531844 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 14:17:01 +0100 Subject: [PATCH 11/61] :bug: Re: #127 - Fixes translations not being picked up in dropdown --- src/views/Login.vue | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/src/views/Login.vue b/src/views/Login.vue index 1dd35b15..22a6673e 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -40,6 +40,10 @@ import { checkCredentials, login } from '@/utils/Auth'; export default { name: 'login', + components: { + Button, + Input, + }, props: { appConfig: Object, }, @@ -50,23 +54,41 @@ export default { message: '', status: 'waiting', // wating, error, success timeout: { label: this.$t('login.remember-me-never'), time: 0 }, - dropDownMenu: [ // Data for timeout dropdown menu, translated label + value in ms + }; + }, + computed: { + /* Data for timeout dropdown menu, translated label + value in ms */ + dropDownMenu() { + return [ { label: this.$t('login.remember-me-never'), time: 0 }, { label: this.$t('login.remember-me-hour'), time: 14400 * 1000 }, { label: this.$t('login.remember-me-day'), time: 86400 * 1000 }, { label: this.$t('login.remember-me-week'), time: 604800 * 1000 }, - ], - }; - }, - components: { - Button, - Input, + ]; + }, + /* Translations for login response messages */ + responseMessages() { + return { + missingUsername: this.$t('login.error-missing-username'), + missingPassword: this.$t('login.error-missing-password'), + incorrectUsername: this.$t('login.error-incorrect-username'), + incorrectPassword: this.$t('login.error-incorrect-password'), + successMsg: this.$t('login.success-message'), + }; + }, }, methods: { /* Checks form is filled in, then initiates the login, and redirects to /home */ submitLogin() { + // Use selected timeout, if available,else revedrt to zero const timeout = this.timeout ? this.timeout.time : 0; - const response = checkCredentials(this.username, this.password, this.appConfig.auth || []); + // Check users credentials + const response = checkCredentials( + this.username, + this.password, + this.appConfig.auth || [], // All users + this.responseMessages, // Translated response messages + ); this.message = response.msg; // Show error or success message to the user this.status = response.correct ? 'success' : 'error'; if (response.correct) { // Yay, credentials were correct :) @@ -76,7 +98,7 @@ export default { }, 250); } }, - /* Since we don't have the Theme setter at this point, we must manually set users theme */ + /* Since Theme setter isn't loaded at this point, we must manually get and apply users theme */ setTheme() { const theme = localStorage[localStorageKeys.THEME] || Defaults.theme; document.getElementsByTagName('html')[0].setAttribute('data-theme', theme); From 7a669d6ee4246c2d208234faa3f2a9263b025090 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 14:19:28 +0100 Subject: [PATCH 12/61] :globe_with_meridians: Re: #126 - Implements missing translations for Login action --- src/components/Settings/AppButtons.vue | 4 ++-- src/utils/Auth.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/Settings/AppButtons.vue b/src/components/Settings/AppButtons.vue index 8425fefc..875ae11b 100644 --- a/src/components/Settings/AppButtons.vue +++ b/src/components/Settings/AppButtons.vue @@ -1,7 +1,7 @@ diff --git a/yarn.lock b/yarn.lock index e7fba661..2543963f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5045,11 +5045,6 @@ highlight.js@^10.7.1: resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== -highlight.js@^11.0.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.1.0.tgz#0198f7326e64ddfbea5f76b00e84ab542cf24ae8" - integrity sha512-X9VVhYKHQPPuwffO8jk4bP/FVj+ibNCy3HxZZNDXFtJrq4O5FdcdCDRIkDis5MiMnjh7UwEdHgRZJcHFYdzDdA== - hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" From 1ea00ec863f7d8b845a754915ab9833ec154974b Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 14:24:31 +0100 Subject: [PATCH 14/61] :fire: Removed obsolete lougout code, and adds translations --- src/components/Settings/ConfigLauncher.vue | 2 +- src/components/Settings/SettingsContainer.vue | 27 ------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/components/Settings/ConfigLauncher.vue b/src/components/Settings/ConfigLauncher.vue index ac06658b..92cf2311 100644 --- a/src/components/Settings/ConfigLauncher.vue +++ b/src/components/Settings/ConfigLauncher.vue @@ -4,7 +4,7 @@ {{ $t('settings.config-launcher-label') }}
+ v-tooltip="tooltip($t('settings.config-launcher-tooltip'))" />
diff --git a/src/components/Settings/SettingsContainer.vue b/src/components/Settings/SettingsContainer.vue index 00637f08..9c6a1bf6 100644 --- a/src/components/Settings/SettingsContainer.vue +++ b/src/components/Settings/SettingsContainer.vue @@ -37,7 +37,6 @@ import ItemSizeSelector from '@/components/Settings/ItemSizeSelector'; import AppButtons from '@/components/Settings/AppButtons'; import KeyboardShortcutInfo from '@/components/Settings/KeyboardShortcutInfo'; import AppInfoModal from '@/components/Configuration/AppInfoModal'; -import { logout as registerLogout } from '@/utils/Auth'; import IconOpen from '@/assets/interface-icons/config-open-settings.svg'; import IconClose from '@/assets/interface-icons/config-close.svg'; import { @@ -88,13 +87,6 @@ export default { getInitialTheme() { return this.appConfig.theme || ''; }, - logout() { - registerLogout(); - this.$toasted.show('Logged Out'); - setTimeout(() => { - location.reload(true); // eslint-disable-line no-restricted-globals - }, 100); - }, isUserLoggedIn() { return !!localStorage[localStorageKeys.USERNAME]; }, @@ -199,25 +191,6 @@ export default { } } - svg.logout-icon { - path { - fill: var(--settings-text-color); - } - width: 1rem; - height: 1rem; - margin: 0.35rem 0.2rem; - padding: 0.2rem; - text-align: center; - background: var(--background); - border: 1px solid var(--settings-text-color);; - border-radius: var(--curve-factor); - cursor: pointer; - &:hover, &.selected { - background: var(--settings-text-color); - path { fill: var(--background); } - } - } - @include tablet { section { display: block; From 4ead7b6742fb78abb9aeaa47f39489eb35578032 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 14:31:18 +0100 Subject: [PATCH 15/61] :adhesive_bandage: Re: #123 - Fixes cut-off text --- src/components/Settings/ConfigLauncher.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Settings/ConfigLauncher.vue b/src/components/Settings/ConfigLauncher.vue index 92cf2311..c9b0f267 100644 --- a/src/components/Settings/ConfigLauncher.vue +++ b/src/components/Settings/ConfigLauncher.vue @@ -73,6 +73,7 @@ export default { display: flex; flex-direction: column; color: var(--settings-text-color); + min-width: 3.2rem; svg { path { fill: var(--settings-text-color); From 179c9edbdf05f203f82a6b083de8c8f5628c53e2 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 15:12:30 +0100 Subject: [PATCH 16/61] :man_astronaut: Adds Owners file for PR assignments --- .github/CODEOWNERS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..90d307e9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,16 @@ +# Code Owners helps give greater control to those who developed a feature +# PR's which modify files that you own will be marked as trusted +# After developing a feature, you can add yourself as it's owner +# Each line starts with file pattern, followed by one or more owners +# Codeowners Docs: https://github.blog/2017-07-06-introducing-code-owners/ + +# Repo Owner +* @lissy93 + +# Translations +src/assets/locales/de.json @niklashere +src/assets/locales/nl.json @evroon + +# Bot PR Permissions +docs/assets/CONTRIBUTORS.svg @liss-bot +docs/*.md @liss-bot From 61a3e6ba54996c098a5e672476b3dc28533f5997 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 15:13:01 +0100 Subject: [PATCH 17/61] :construction_worker: Adds GH action to assign reviewer based on code owner --- .github/workflows/assign-reviewer.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/assign-reviewer.yml diff --git a/.github/workflows/assign-reviewer.yml b/.github/workflows/assign-reviewer.yml new file mode 100644 index 00000000..f6f8d1a5 --- /dev/null +++ b/.github/workflows/assign-reviewer.yml @@ -0,0 +1,13 @@ +# Automatically assigns a reviewer to a PR, based on who owns the modified files +# Uses the ./.github/CODEOWNERS file to determine ownership of file patterns +on: [pull_request] +jobs: + autolabeler-codeowners: + runs-on: ubuntu-latest + name: Assign Reviewer + steps: + - uses: actions/checkout@v1 + - name: Find code owner, assign reviewer + uses: pratikmallya/autolabeler-codeowners@master + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} From c29e7105e22111288653e84250f5c90f1b33c6f2 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 7 Aug 2021 15:15:53 +0100 Subject: [PATCH 18/61] :adhesive_bandage: Fixed a bunch of minor UI things --- src/components/Configuration/JsonEditor.vue | 5 ++++- src/components/Settings/ThemeSelector.vue | 6 +++++- src/styles/color-themes.scss | 7 ++++++- src/views/Home.vue | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/Configuration/JsonEditor.vue b/src/components/Configuration/JsonEditor.vue index 99f0cffe..a9ae07f5 100644 --- a/src/components/Configuration/JsonEditor.vue +++ b/src/components/Configuration/JsonEditor.vue @@ -4,7 +4,6 @@
@@ -293,6 +292,10 @@ div.save-options { } } +.jsoneditor-container.min-box { + height: 58vh; +} + .jsoneditor, .jsoneditor-menu { border-color: var(--primary); } diff --git a/src/components/Settings/ThemeSelector.vue b/src/components/Settings/ThemeSelector.vue index 3b6dc3ea..f5574628 100644 --- a/src/components/Settings/ThemeSelector.vue +++ b/src/components/Settings/ThemeSelector.vue @@ -126,6 +126,7 @@ export default { From 030764c99e3d58d2b09359b1df0051d4aea30db3 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 11 Aug 2021 05:05:22 +0100 Subject: [PATCH 56/61] :construction: Checks if multi-tasking enabled, and loads in correct component --- src/views/Workspace.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/Workspace.vue b/src/views/Workspace.vue index 7d384d89..2878885c 100644 --- a/src/views/Workspace.vue +++ b/src/views/Workspace.vue @@ -1,7 +1,8 @@ @@ -9,6 +10,7 @@ import SideBar from '@/components/Workspace/SideBar'; import WebContent from '@/components/Workspace/WebContent'; +import MultiTaskingWebComtent from '@/components/Workspace/MultiTaskingWebComtent'; import Defaults from '@/utils/defaults'; import { GetTheme, ApplyLocalTheme, ApplyCustomVariables } from '@/utils/ThemeHelper'; @@ -24,9 +26,15 @@ export default { ApplyLocalTheme, ApplyCustomVariables, }), + computed: { + isMultiTaskingEnabled() { + return this.appConfig.enableMultiTasking || false; + }, + }, components: { SideBar, WebContent, + MultiTaskingWebComtent, }, methods: { launchApp(url) { From 6f3c9d36a183b0cb1e663c67deb30ccd6c3a2545 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 11 Aug 2021 05:06:42 +0100 Subject: [PATCH 57/61] :card_file_box: Adds new option to config, enableMultiTasking If set to true, will keep apps open in the background when in the workspace view. Useful for quickly switching between multiple sites, and preserving their state, but comes at the cost of performance. --- docs/configuring.md | 1 + src/utils/ConfigSchema.json | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/configuring.md b/docs/configuring.md index 900184a5..b763c2a1 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -72,6 +72,7 @@ To disallow any changes from being written to disk via the UI config editor, set **`externalStyleSheet`** | `string` or `string[]` | _Optional_ | Either a URL to an external stylesheet or an array or URLs, which can be applied as themes within the UI **`customCss`** | `string` | _Optional_ | Raw CSS that will be applied to the page. This can also be set from the UI. Please minify it first. **`hideComponents`** | `object` | _Optional_ | A list of key page components (header, footer, search, settings, etc) that are present by default, but can be removed using this option. See [`appConfig.hideComponents`](#appconfighideComponents-optional) +**`enableMultiTasking`** | `boolean` | _Optional_ | If set to true, will keep apps open in the background when in the workspace view. Useful for quickly switching between multiple sites, and preserving their state, but comes at the cost of performance. **`allowConfigEdit`** | `boolean` | _Optional_ | Should prevent / allow the user to write configuration changes to the conf.yml from the UI. When set to `false`, the user can only apply changes locally using the config editor within the app, whereas if set to `true` then changes can be written to disk directly through the UI. Defaults to `true`. Note that if authentication is enabled, the user must be of type `admin` in order to apply changes globally. **`enableErrorReporting`** | `boolean` | _Optional_ | Enable reporting of unexpected errors and crashes. This is off by default, and **no data will ever be captured unless you explicitly enable it**. Turning on error reporting helps previously unknown bugs get discovered and fixed. Dashy uses [Sentry](https://github.com/getsentry/sentry) for error reporting. Defaults to `false`. **`sentryDsn`** | `boolean` | _Optional_ | If you need to monitor errors in your instance, then you can use Sentry to collect and process bug reports. Sentry can be self-hosted, or used as SaaS, once your instance is setup, then all you need to do is pass in the DSN here, and enable error reporting. You can learn more on the [Sentry DSN Docs](https://docs.sentry.io/product/sentry-basics/dsn-explainer/). Note that this will only ever be used if `enableErrorReporting` is explicitly enabled. diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index 129445db..2bd605a5 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -239,6 +239,11 @@ } } }, + "enableMultiTasking": { + "type": "boolean", + "default": false, + "description": "If set to true, will keep apps opened in the workspace open in the background. Useful for switching between sites, but comes at the cost of performance" + }, "allowConfigEdit": { "type": "boolean", "default": true, From 21509c727d42863a710c6a507ceca6a848d70b96 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 11 Aug 2021 20:51:41 +0100 Subject: [PATCH 58/61] :sparkles: Implements multi-tasking functionality in Workspace view --- .../Workspace/MultiTaskingWebComtent.vue | 25 +++++++++++-------- src/components/Workspace/SideBarItem.vue | 6 ++--- src/components/Workspace/WebContent.vue | 12 ++++++--- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/components/Workspace/MultiTaskingWebComtent.vue b/src/components/Workspace/MultiTaskingWebComtent.vue index 2be51dd5..268bf54d 100644 --- a/src/components/Workspace/MultiTaskingWebComtent.vue +++ b/src/components/Workspace/MultiTaskingWebComtent.vue @@ -1,7 +1,5 @@ From 01dfa5771da38723c97133b33198800b81f71bb3 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 11 Aug 2021 21:06:20 +0100 Subject: [PATCH 59/61] :bookmark: Bumps to V 1.5.8 and updates changelog, Multi-tasking support --- .github/CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 001b7b16..b04d0a7c 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## ✨ 1.5.8 - Multi-Tasking Support in Workspace View [PR #146](https://github.com/Lissy93/dashy/pull/146) +- Adds option to keep launched apps open in the background, to reduce friction when switching between websites, Re: #144 +- This can be enabled by setting `appConfig.enableMultiTasking: true` +- Note that having many apps opened simultaneously, will have an impact on performance + ## ✨ 1.5.7 - Adds Support for Material Design Icons [PR #141](https://github.com/Lissy93/dashy/pull/141) - Enables user to use any icon from [materialdesignicons.com](https://dev.materialdesignicons.com/icons), Re: #139 - Also adds support for [simpleicons.org](https://simpleicons.org/) diff --git a/package.json b/package.json index 5854b783..d8394dc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Dashy", - "version": "1.5.7", + "version": "1.5.8", "license": "MIT", "main": "server", "scripts": { From c8df32817801941732ed0780a2d3753d234e0d6a Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 11 Aug 2021 21:19:36 +0100 Subject: [PATCH 60/61] :bug: Open in workspace when target set, Fixes #143 --- src/components/LinkItems/Item.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/LinkItems/Item.vue b/src/components/LinkItems/Item.vue index 7234c1fd..f4a433c6 100644 --- a/src/components/LinkItems/Item.vue +++ b/src/components/LinkItems/Item.vue @@ -3,7 +3,7 @@ Date: Wed, 11 Aug 2021 21:29:09 +0100 Subject: [PATCH 61/61] :whale: Re: #136 - Sets Docker base to alpine3.14 LTS --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9cde9c99..3539bd9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts-alpine +FROM node:lts-alpine3.14 # Define some ENV Vars ENV PORT=80 \