diff --git a/src/App.vue b/src/App.vue index 83c7a959..7a438946 100644 --- a/src/App.vue +++ b/src/App.vue @@ -68,6 +68,7 @@ export default { diff --git a/src/components/Workspace/SideBarItem.vue b/src/components/Workspace/SideBarItem.vue index cb0c33fb..5988a1f4 100644 --- a/src/components/Workspace/SideBarItem.vue +++ b/src/components/Workspace/SideBarItem.vue @@ -1,14 +1,14 @@ @@ -42,6 +51,14 @@ div.side-bar-item { color: var(--side-bar-color); background: var(--side-bar-background); text-align: center; + &.text-only { + background: none; + border: none; + box-shadow: none; + p.small-title { + margin: 0.1rem auto; + font-size: 0.6rem; + } + } } - diff --git a/src/components/Workspace/SideBarSection.vue b/src/components/Workspace/SideBarSection.vue new file mode 100644 index 00000000..b0410291 --- /dev/null +++ b/src/components/Workspace/SideBarSection.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/components/Workspace/WebContent.vue b/src/components/Workspace/WebContent.vue index 4831142b..db6a44e8 100644 --- a/src/components/Workspace/WebContent.vue +++ b/src/components/Workspace/WebContent.vue @@ -20,9 +20,9 @@ export default { iframe { position: absolute; - left: 3rem; - height: calc(100% - 6.3rem); - width: calc(100% - 3rem); + left: var(--side-bar-width); + height: calc(100% - var(--header-height)); + width: calc(100% - var(--side-bar-width)); border: none; background: white; } diff --git a/src/views/Workspace.vue b/src/views/Workspace.vue index 3afabfa8..5ee3ce30 100644 --- a/src/views/Workspace.vue +++ b/src/views/Workspace.vue @@ -1,6 +1,6 @@ @@ -9,11 +9,13 @@ import SideBar from '@/components/Workspace/SideBar'; import WebContent from '@/components/Workspace/WebContent'; +import Defaults, { localStorageKeys } from '@/utils/defaults'; export default { name: 'Workspace', props: { sections: Array, + appConfig: Object, }, data: () => ({ url: '', @@ -22,6 +24,27 @@ export default { SideBar, WebContent, }, + methods: { + launchApp(url) { + this.url = url; + }, + setTheme() { + const theme = localStorage[localStorageKeys.THEME] || this.confTheme || Defaults.theme; + const htmlTag = document.getElementsByTagName('html')[0]; + if (htmlTag.hasAttribute('data-theme')) htmlTag.removeAttribute('data-theme'); + htmlTag.setAttribute('data-theme', theme); + }, + initiateFontAwesome() { + const fontAwesomeScript = document.createElement('script'); + const faKey = this.appConfig.fontAwesomeKey || Defaults.fontAwesomeKey; + fontAwesomeScript.setAttribute('src', `https://kit.fontawesome.com/${faKey}.js`); + document.head.appendChild(fontAwesomeScript); + }, + }, + mounted() { + this.setTheme(); + this.initiateFontAwesome(); + }, };