diff --git a/src/components/LinkItems/ItemGroup.vue b/src/components/LinkItems/ItemGroup.vue
index a375d7d6..e94a2794 100644
--- a/src/components/LinkItems/ItemGroup.vue
+++ b/src/components/LinkItems/ItemGroup.vue
@@ -70,7 +70,7 @@ export default {
return this.displayData.itemSize || this.itemSize;
},
isGridLayout() {
- return this.displayData.layout === 'grid'
+ return this.displayData.sectionLayout === 'grid'
|| !!(this.displayData.itemCountX || this.displayData.itemCountY);
},
gridStyle() {
diff --git a/src/components/PageStrcture/Footer.vue b/src/components/PageStrcture/Footer.vue
index 3debd4f6..2f97d23e 100644
--- a/src/components/PageStrcture/Footer.vue
+++ b/src/components/PageStrcture/Footer.vue
@@ -29,6 +29,9 @@ export default {
diff --git a/src/components/Workspace/SideBarItem.vue b/src/components/Workspace/SideBarItem.vue
new file mode 100644
index 00000000..cb0c33fb
--- /dev/null
+++ b/src/components/Workspace/SideBarItem.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
diff --git a/src/components/Workspace/WebContent.vue b/src/components/Workspace/WebContent.vue
new file mode 100644
index 00000000..4831142b
--- /dev/null
+++ b/src/components/Workspace/WebContent.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/router.js b/src/router.js
index b32aa255..7921c7ef 100644
--- a/src/router.js
+++ b/src/router.js
@@ -3,8 +3,10 @@ import Router from 'vue-router';
import Home from '@/views/Home.vue';
import Login from '@/views/Login.vue';
+import Workspace from '@/views/Workspace.vue';
import { isLoggedIn } from '@/utils/Auth';
import { appConfig, pageInfo, sections } from '@/utils/ConfigAccumalator';
+import { metaTagData } from '@/utils/defaults';
Vue.use(Router);
@@ -26,12 +28,17 @@ const router = new Router({
},
meta: {
title: pageInfo.title || 'Home Page',
- metaTags: [
- {
- name: 'description',
- content: 'A simple static homepage for you\'re server',
- },
- ],
+ metaTags: metaTagData,
+ },
+ },
+ {
+ path: '/workspace',
+ name: 'workspace',
+ component: Workspace,
+ props: { appConfig, pageInfo, sections },
+ meta: {
+ title: pageInfo.title || 'Dashy Workspace',
+ metaTags: metaTagData,
},
},
{
diff --git a/src/styles/color-palette.scss b/src/styles/color-palette.scss
index 3dee2b69..cccc4aa5 100644
--- a/src/styles/color-palette.scss
+++ b/src/styles/color-palette.scss
@@ -87,4 +87,6 @@
--about-page-color: var(--white);
--about-page-background: #0b1021;
--about-page-accent: var(--primary);
+ --side-bar-background: var(--background-darker);
+ --side-bar-color: var(--primary);
}
diff --git a/src/utils/ConfigAccumalator.js b/src/utils/ConfigAccumalator.js
index 2ecec4ac..2edd44d9 100644
--- a/src/utils/ConfigAccumalator.js
+++ b/src/utils/ConfigAccumalator.js
@@ -8,13 +8,17 @@ import Defaults, { localStorageKeys } from '@/utils/defaults';
import conf from '../../public/conf.yml';
export const appConfig = (() => {
+ let usersAppConfig = Defaults.appConfig;
if (localStorage[localStorageKeys.APP_CONFIG]) {
- return JSON.parse(localStorage[localStorageKeys.APP_CONFIG]);
+ usersAppConfig = JSON.parse(localStorage[localStorageKeys.APP_CONFIG]);
} else if (conf.appConfig) {
- return conf.appConfig;
- } else {
- return Defaults.appConfig;
+ usersAppConfig = conf.appConfig;
}
+ usersAppConfig.layout = localStorage[localStorageKeys.LAYOUT_ORIENTATION]
+ || conf.appConfig.layout || Defaults.layout;
+ usersAppConfig.iconSize = localStorage[localStorageKeys.ICON_SIZE]
+ || conf.appConfig.iconSize || Defaults.iconSize;
+ return usersAppConfig;
})();
export const pageInfo = (() => {
diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json
index 7c8f5035..1f458dfa 100644
--- a/src/utils/ConfigSchema.json
+++ b/src/utils/ConfigSchema.json
@@ -69,6 +69,25 @@
"pattern": "^[a-z0-9]{10}$",
"description": "API key for font-awesome"
},
+ "layout": {
+ "enum": [
+ "horizontal",
+ "vertical",
+ "auto",
+ "sidebar"
+ ],
+ "default": "auto",
+ "description": "Specifies sections layout orientation on the home screen"
+ },
+ "iconSize": {
+ "enum": [
+ "small",
+ "medium",
+ "large"
+ ],
+ "default": "medium",
+ "description": "The size of each link item / icon"
+ },
"cssThemes": {
"type": "array",
"description": "Theme names to be added to the dropdown",
@@ -195,7 +214,7 @@
"default": 1,
"description": "The amount of space that the section spans horizontally"
},
- "layout": {
+ "sectionLayout": {
"enum": [
"grid",
"auto"
diff --git a/src/utils/defaults.js b/src/utils/defaults.js
index b95351b0..3a51a497 100644
--- a/src/utils/defaults.js
+++ b/src/utils/defaults.js
@@ -77,4 +77,7 @@ module.exports = {
},
backupEndpoint: 'https://dashy-sync-service.as93.net',
splashScreenTime: 1900,
+ metaTagData: [
+ { name: 'description', content: 'A simple static homepage for you\'re server' },
+ ],
};
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 62b4ec4a..db3e207c 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -64,14 +64,14 @@ export default {
}),
computed: {
layoutOrientation: {
- get: () => localStorage[localStorageKeys.LAYOUT_ORIENTATION] || Defaults.layout,
+ get() { return this.appConfig.layout || Defaults.layout; },
set: function setLayout(layout) {
localStorage.setItem(localStorageKeys.LAYOUT_ORIENTATION, layout);
this.layout = layout;
},
},
iconSize: {
- get: () => localStorage[localStorageKeys.ICON_SIZE] || Defaults.iconSize,
+ get() { return this.appConfig.iconSize || Defaults.iconSize; },
set: function setIconSize(iconSize) {
localStorage.setItem(localStorageKeys.ICON_SIZE, iconSize);
this.itemSizeBound = iconSize;
diff --git a/src/views/Workspace.vue b/src/views/Workspace.vue
new file mode 100644
index 00000000..3afabfa8
--- /dev/null
+++ b/src/views/Workspace.vue
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+