mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-26 23:24:38 +02:00
🐛 Fixes unable to add new app bug (#390)
This commit is contained in:
parent
2ec59660de
commit
d10e6a8987
@ -12,11 +12,11 @@
|
|||||||
@openContextMenu="openContextMenu"
|
@openContextMenu="openContextMenu"
|
||||||
>
|
>
|
||||||
<!-- If no items, show message -->
|
<!-- If no items, show message -->
|
||||||
<div v-if="sectionType === 'empty'" class="no-items">
|
<div v-if="isEmpty" class="no-items">
|
||||||
{{ $t('home.no-items-section') }}
|
{{ $t('home.no-items-section') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- Item Container -->
|
<!-- Item Container -->
|
||||||
<div v-else-if="sectionType === 'item'"
|
<div v-if="hasItems"
|
||||||
:class="`there-are-items ${isGridLayout? 'item-group-grid': ''} inner-size-${itemSize}`"
|
:class="`there-are-items ${isGridLayout? 'item-group-grid': ''} inner-size-${itemSize}`"
|
||||||
:style="gridStyle" :id="`section-${groupId}`"
|
:style="gridStyle" :id="`section-${groupId}`"
|
||||||
> <!-- Show for each item -->
|
> <!-- Show for each item -->
|
||||||
@ -58,7 +58,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="sectionType === 'widget'"
|
v-if="hasWidgets"
|
||||||
:class="`widget-list ${isWide? 'wide' : ''}`">
|
:class="`widget-list ${isWide? 'wide' : ''}`">
|
||||||
<WidgetBase
|
<WidgetBase
|
||||||
v-for="(widget, widgetIndx) in widgets"
|
v-for="(widget, widgetIndx) in widgets"
|
||||||
@ -154,11 +154,15 @@ export default {
|
|||||||
sortOrder() {
|
sortOrder() {
|
||||||
return this.displayData.sortBy || defaultSortOrder;
|
return this.displayData.sortBy || defaultSortOrder;
|
||||||
},
|
},
|
||||||
/* A section can contain either items or widgets */
|
hasItems() {
|
||||||
sectionType() {
|
if (this.isEditMode) return true;
|
||||||
if (this.widgets && this.widgets.length > 0) return 'widget';
|
return this.items && this.items.length > 0;
|
||||||
if (this.items && this.items.length > 0) return 'item';
|
},
|
||||||
return 'empty';
|
hasWidgets() {
|
||||||
|
return this.widgets && this.widgets.length > 0;
|
||||||
|
},
|
||||||
|
isEmpty() {
|
||||||
|
return !this.hasItems && !this.hasWidgets;
|
||||||
},
|
},
|
||||||
/* If the sortBy attribute is specified, then return sorted data */
|
/* If the sortBy attribute is specified, then return sorted data */
|
||||||
sortedItems() {
|
sortedItems() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user