π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
Displays a tab view in the config modal, with raw YAML for downloading
Alicia Sykes0e9aef3f30d9
diff --git a/README.md b/README.mdindex ab1228ce..8aa0df70 100644--- a/README.md+++ b/README.md@@ -162,12 +162,13 @@ There are a few self-hosted web apps, that serve a similar purpose to Dashy. Inc### Credits π-The app makes use of the following components, kudos to their respective authors+And the app itself is built with [Vue.js](https://github.com/vuejs/vue) ++It makes use of the following components, kudos to their respective authors- [`vue-select`](https://github.com/sagalbot/vue-select) - Dropdown component by @sagalbot- [`vue-js-modal`](https://github.com/euvl/vue-js-modal) - Modal component by @euvl- [`v-tooltip`](https://github.com/Akryum/v-tooltip) - Tooltip component by @Akryum--And the app itself is built with [Vue.js](https://github.com/vuejs/vue) +- [`vue-material-tabs`](https://github.com/jairoblatt/vue-material-tabs) - Tab view component by @jairoblatt### License πdiff --git a/package.json b/package.jsonindex 414174c6..e5415113 100644--- a/package.json+++ b/package.json@@ -10,11 +10,13 @@"dependencies": {"connect": "^3.7.0","register-service-worker": "^1.6.2",+ "remedial": "^1.0.8","serve-static": "^1.14.1","v-tooltip": "^2.1.3","vue": "^2.6.10","vue-cli-plugin-yaml": "^1.0.2","vue-js-modal": "^2.0.0-rc.6",+ "vue-material-tabs": "^0.0.7","vue-router": "^3.0.3","vue-select": "^3.11.2"},@@ -61,4 +63,4 @@"> 1%","last 2 versions"]-}\ No newline at end of file+}diff --git a/src/components/LinkItems/Item.vue b/src/components/LinkItems/Item.vueindex b0b8ff34..54a968a3 100644--- a/src/components/LinkItems/Item.vue+++ b/src/components/LinkItems/Item.vue@@ -100,7 +100,6 @@ export default {.item {flex-grow: 1;- position: relative;color: var(--item-text-color);vertical-align: middle;margin: 0.5rem;@@ -116,6 +115,7 @@ export default {&:hover {box-shadow: var(--item-hover-shadow);background: var(--item-background-hover);+ position: relative;}&:focus {outline: 2px solid var(--primary);diff --git a/src/components/LinkItems/ItemIcon.vue b/src/components/LinkItems/ItemIcon.vueindex ada43964..265e61a7 100644--- a/src/components/LinkItems/ItemIcon.vue+++ b/src/components/LinkItems/ItemIcon.vue@@ -99,7 +99,7 @@ export default {<style lang="scss">.tile-icon {width: 60px;- filter: var(--item-icon-transform);+ // filter: var(--item-icon-transform);&.broken { display: none; }}i.fas, i.fab, i.far, i.fal, i.fad {diff --git a/src/components/Settings/ConfigEditor.vue b/src/components/Settings/ConfigEditor.vueindex 71cda9f4..26a17c40 100644--- a/src/components/Settings/ConfigEditor.vue+++ b/src/components/Settings/ConfigEditor.vue@@ -5,7 +5,16 @@<IconSpanner v-tooltip="tooltip('Update configuration locally')" @click="showEditor()" /></div><modal :name="modalName" :resizable="true" width="80%" height="80%">- <p>Hello</p>+ <Tabs>+ <TabItem name="Edit">+ <div class="first-tab">Todo</div>+ </TabItem>+ <TabItem name="Download">+ <div class="second-tab">+ <pre>{{this.jsonParser(this.sections)}}</pre>+ </div>+ </TabItem>+ </Tabs></modal></div></template>@@ -13,6 +22,7 @@<script>import IconSpanner from '@/assets/interface-icons/config-editor.svg';+import JsonToYaml from '@/utils/JsonToYaml';export default {name: 'ConfigEditor',@@ -20,13 +30,14 @@ export default {return {modalName: 'CONF-EDITOR',input: '',+ jsonParser: JsonToYaml,};},components: {IconSpanner,},props: {- initialConfig: Object,+ sections: Array,},methods: {showEditor: function show() {diff --git a/src/components/Settings/SettingsContainer.vue b/src/components/Settings/SettingsContainer.vueindex 9fb96619..3811fe77 100644--- a/src/components/Settings/SettingsContainer.vue+++ b/src/components/Settings/SettingsContainer.vue@@ -6,7 +6,7 @@:confTheme="getInitialTheme()" :userThemes="getUserThemes()" /><LayoutSelector :displayLayout="displayLayout" @layoutUpdated="updateDisplayLayout"/><ItemSizeSelector :iconSize="iconSize" @iconSizeUpdated="updateIconSize" />- <ConfigEditor />+ <ConfigEditor :sections="sections" /></div><KeyboardShortcutInfo /></section>@@ -28,6 +28,7 @@ export default {iconSize: String,availableThemes: Object,appConfig: Object,+ sections: Array,},components: {SearchBar,diff --git a/src/main.js b/src/main.jsindex edee5f31..7ccb802d 100644--- a/src/main.js+++ b/src/main.js@@ -3,6 +3,7 @@ import Vue from 'vue';import VTooltip from 'v-tooltip'; // A Vue directive for Popper.js, tooltip componentimport VModal from 'vue-js-modal'; // Modal componentimport VSelect from 'vue-select'; // Select dropdown component+import VTabs from 'vue-material-tabs'; // Tab view component, used on the config pageimport App from './App.vue';import router from './router';@@ -10,6 +11,7 @@ import './registerServiceWorker';Vue.use(VTooltip);Vue.use(VModal);+Vue.use(VTabs);Vue.component('v-select', VSelect);Vue.config.productionTip = false;diff --git a/src/utils/defaults.js b/src/utils/defaults.jsindex ab27a523..bb4cbc85 100644--- a/src/utils/defaults.js+++ b/src/utils/defaults.js@@ -44,5 +44,6 @@ module.exports = {COLLAPSE_STATE: 'collapseState',ICON_SIZE: 'iconSize',THEME: 'theme',+ CONF_SECTIONS: 'confSections',},};diff --git a/src/views/Home.vue b/src/views/Home.vueindex 1555b709..236f6207 100644--- a/src/views/Home.vue+++ b/src/views/Home.vue@@ -9,13 +9,14 @@:iconSize="itemSizeBound":availableThemes="getExternalCSSLinks()":appConfig="appConfig"+ :sections="getSections(sections)"class="filter-container"/><!-- Main content, section for each group of items --><div v-if="checkTheresData(sections)":class="`item-group-container orientation-${layout} item-size-${itemSizeBound}`"><ItemGroup- v-for="(section, index) in sections"+ v-for="(section, index) in getSections(sections)":key="index":title="section.name":displayData="getDisplayData(section)"@@ -73,7 +74,16 @@ export default {methods: {/* Returns true if there is one or more sections in the config */checkTheresData(sections) {- return sections && sections.length >= 1;+ const localSections = localStorage[localStorageKeys.CONF_SECTIONS];+ return (sections && sections.length >= 1) || (localSections && localSections.length >= 1);+ },+ /* Returns sections from local storage if available, otherwise uses the conf.yml */+ getSections(sections) {+ // If the user has stored sections in local storage, return those+ const localSections = localStorage[localStorageKeys.CONF_SECTIONS];+ if (localSections && localSections.length >= 1) return localSections;+ // Otherwise, return the usuall data from conf.yml+ return sections;},/* Updates local data with search value, triggered from filter comp */searching(searchValue) {diff --git a/yarn.lock b/yarn.lockindex 19ac5d6e..5884cfdf 100644--- a/yarn.lock+++ b/yarn.lock@@ -7314,6 +7314,11 @@ [email protected]:resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=+remedial@^1.0.8:+ version "1.0.8"+ resolved "https://registry.yarnpkg.com/remedial/-/remedial-1.0.8.tgz#a5e4fd52a0e4956adbaf62da63a5a46a78c578a0"+ integrity sha512-/62tYiOe6DzS5BqVsNpH/nkGlX45C/Sp6V+NtiN6JQNS1Viay7cWkazmRkrQrdFj2eshDe96SIQNIoMxqhzBOg==+remove-trailing-separator@^1.0.1:version "1.1.0"resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"@@ -8756,6 +8761,11 @@ vue-loader@^15.9.2:vue-hot-reload-api "^2.3.0"vue-style-loader "^4.1.0"+vue-material-tabs@^0.0.7:+ version "0.0.7"+ resolved "https://registry.yarnpkg.com/vue-material-tabs/-/vue-material-tabs-0.0.7.tgz#5f3fa04ad35384af68582f7c89ad4cecac89207b"+ integrity sha512-02X5paTksYKrGvSRpMdkctRO9qhvJFD5VEGxd0xjOX4sYz6mZSAez0Z/+aYf7Z5ziY+eJ9dMQmxaLn9DVKQRJw==+vue-resize@^1.0.1:version "1.0.1"resolved "https://registry.yarnpkg.com/vue-resize/-/vue-resize-1.0.1.tgz#c120bed4e09938771d622614f57dbcf58a5147ee"