From 126ae5f155821999236f5ee1dac177c0d71e00bc Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 11 Aug 2021 05:04:32 +0100 Subject: [PATCH 1/5] :construction: Adds new component to handle multi-tasking --- .../Workspace/MultiTaskingWebComtent.vue | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/components/Workspace/MultiTaskingWebComtent.vue diff --git a/src/components/Workspace/MultiTaskingWebComtent.vue b/src/components/Workspace/MultiTaskingWebComtent.vue new file mode 100644 index 0000000000..2be51dd57d --- /dev/null +++ b/src/components/Workspace/MultiTaskingWebComtent.vue @@ -0,0 +1,57 @@ + + + + + From 030764c99e3d58d2b09359b1df0051d4aea30db3 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 11 Aug 2021 05:05:22 +0100 Subject: [PATCH 2/5] :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 7d384d89dc..2878885c5a 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 3/5] :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 900184a5ef..b763c2a1d7 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 129445dbf3..2bd605a5eb 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 4/5] :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 2be51dd57d..268bf54dcc 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 5/5] :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 001b7b1605..b04d0a7c4b 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 5854b783fb..d8394dc36d 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": {