π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π¨ Open section btn moved to section head
Alicia Sykes31481f8f5154
diff --git a/src/components/LinkItems/Collapsable.vue b/src/components/LinkItems/Collapsable.vueindex a650f77f..1dac6cc9 100644--- a/src/components/LinkItems/Collapsable.vue+++ b/src/components/LinkItems/Collapsable.vue@@ -22,6 +22,8 @@</label><Icon v-if="icon" :icon="icon" size="small" :url="title" class="section-icon" /><h3>{{ title }}</h3>+ <OpenIcon v-if="title" @click.prevent.stop="navigateToSection"+ v-tooltip="openTooltip()" class="header-action" /><EditModeIcon v-if="isEditMode" @click="openEditModal"v-tooltip="editTooltip()" class="header-action" /><EllipseIcon @click.prevent.stop="openContextMenu" @contextmenu.prevent@@ -42,6 +44,7 @@ import { localStorageKeys } from '@/utils/config/defaults';import Icon from '@/components/LinkItems/ItemIcon.vue';import EditModeIcon from '@/assets/interface-icons/interactive-editor-edit-mode.svg';import EllipseIcon from '@/assets/interface-icons/ellipse.svg';+import OpenIcon from '@/assets/interface-icons/open-new-tab.svg';export default {name: 'CollapsableContainer',@@ -56,11 +59,12 @@ export default {customStyles: { type: String, default: '' }, // Optional custom stylingscutToHeight: Boolean, // To set section height with content height},- emits: ['openEditSection', 'openContextMenu'],+ emits: ['openEditSection', 'openContextMenu', 'navigateToSection'],components: {Icon,EditModeIcon,EllipseIcon,+ OpenIcon,},directives: {longPress,@@ -163,6 +167,9 @@ export default {openContextMenu(e) {this.$emit('openContextMenu', e);},+ navigateToSection() {+ this.$emit('navigateToSection');+ },editTooltip() {const content = this.$t('interactive-editor.edit-section.edit-tooltip');return { content, delay: { show: 100, hide: 0 } };@@ -173,6 +180,9 @@ export default {optionsTooltip() {return { content: this.$t('context-menus.section.section-options'), delay: { show: 200, hide: 0 } };},+ openTooltip() {+ return { content: this.$t('context-menus.section.open-section'), delay: { show: 200, hide: 0 } };+ },},};</script>diff --git a/src/components/LinkItems/Section.vue b/src/components/LinkItems/Section.vueindex b64ac6ea..819751d1 100644--- a/src/components/LinkItems/Section.vue+++ b/src/components/LinkItems/Section.vue@@ -10,6 +10,7 @@:cutToHeight="displayData.cutToHeight"@openEditSection="openEditSection"@openContextMenu="openContextMenu"+ @navigateToSection="navigateToSection":id="sectionRef":ref="sectionRef">@@ -66,7 +67,6 @@:key="widgetIndx":widget="widget":index="index"- @navigateToSection="navigateToSection"/></div><!-- Modal for opening in modal view -->diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vueindex 31b4353c..bc64eaa3 100644--- a/src/components/Widgets/WidgetBase.vue+++ b/src/components/Widgets/WidgetBase.vue@@ -1,13 +1,9 @@<template><div :class="`widget-base ${ loading ? 'is-loading' : '' }`">- <!-- Update and Full-Page Action Buttons -->+ <!-- Update Action Button --><Button :click="update" class="action-btn update-btn" v-if="!hideControls && !loading"><UpdateIcon /></Button>- <Button :click="fullScreenWidget"- class="action-btn open-btn" v-if="!hideControls && !error && !loading">- <OpenIcon />- </Button><!-- Loading Spinner --><div v-if="loading" class="loading"><LoadingAnimation v-if="loading" class="loader" />@@ -39,7 +35,6 @@ import { defineAsyncComponent } from 'vue';import ErrorHandler from '@/utils/logging/ErrorHandler';import Button from '@/components/FormElements/Button';import UpdateIcon from '@/assets/interface-icons/widget-update.svg';-import OpenIcon from '@/assets/interface-icons/open-new-tab.svg';import LoadingAnimation from '@/assets/interface-icons/loader.svg';const widgetModules = import.meta.glob('./*.vue');@@ -142,14 +137,12 @@ export default {// Register form elementsButton,UpdateIcon,- OpenIcon,LoadingAnimation,},props: {widget: { type: Object, required: true },index: { type: Number, required: true },},- emits: ['navigateToSection'],data: () => ({loading: false,error: false,@@ -213,10 +206,6 @@ export default {this.error = true;this.errorMsg = msg;},- /* Opens current widget in full-page */- fullScreenWidget() {- this.$emit('navigateToSection');- },/* Toggles loading state */setLoaderState(loading) {this.loading = loading;@@ -254,7 +243,6 @@ export default {}&.update-btn { right: -0.25rem; }- &.open-btn { right: 1.25rem; }}// Optional widget label