✨ Adds widget compatibility into workspace view
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
<template>
|
||||
<div class="work-space">
|
||||
<SideBar :sections="sections" @launch-app="launchApp" :initUrl="getInitialUrl()" />
|
||||
<SideBar
|
||||
:sections="sections"
|
||||
@launch-app="launchApp"
|
||||
@launch-widget="launchWidget"
|
||||
:initUrl="getInitialUrl()"
|
||||
/>
|
||||
<WebContent :url="url" v-if="!isMultiTaskingEnabled" />
|
||||
<MultiTaskingWebComtent :url="url" v-else />
|
||||
<WidgetView :widgets="widgets" v-if="widgets" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -10,6 +16,7 @@
|
||||
import HomeMixin from '@/mixins/HomeMixin';
|
||||
import SideBar from '@/components/Workspace/SideBar';
|
||||
import WebContent from '@/components/Workspace/WebContent';
|
||||
import WidgetView from '@/components/Workspace/WidgetView';
|
||||
import MultiTaskingWebComtent from '@/components/Workspace/MultiTaskingWebComtent';
|
||||
import Defaults from '@/utils/defaults';
|
||||
import { GetTheme, ApplyLocalTheme, ApplyCustomVariables } from '@/utils/ThemeHelper';
|
||||
@@ -19,6 +26,7 @@ export default {
|
||||
mixins: [HomeMixin],
|
||||
data: () => ({
|
||||
url: '',
|
||||
widgets: null,
|
||||
GetTheme,
|
||||
ApplyLocalTheme,
|
||||
ApplyCustomVariables,
|
||||
@@ -37,6 +45,7 @@ export default {
|
||||
components: {
|
||||
SideBar,
|
||||
WebContent,
|
||||
WidgetView,
|
||||
MultiTaskingWebComtent,
|
||||
},
|
||||
methods: {
|
||||
@@ -46,6 +55,11 @@ export default {
|
||||
} else {
|
||||
this.url = options.url;
|
||||
}
|
||||
this.widgets = null;
|
||||
},
|
||||
launchWidget(widgets) {
|
||||
this.url = '';
|
||||
this.widgets = widgets;
|
||||
},
|
||||
setTheme() {
|
||||
const theme = this.GetTheme();
|
||||
|
||||
Reference in New Issue
Block a user