mirror of https://github.com/Lissy93/dashy.git
🐛 Fixes status check dot in edit mode (#301)
This commit is contained in:
parent
e9344fc122
commit
2acf3965d2
|
@ -5,7 +5,7 @@
|
||||||
@contextmenu.prevent
|
@contextmenu.prevent
|
||||||
:href="hyperLinkHref"
|
:href="hyperLinkHref"
|
||||||
:target="anchorTarget"
|
:target="anchorTarget"
|
||||||
:class="`item ${!icon? 'short': ''} size-${itemSize} ${isAddNew ? 'add-new' : ''}`"
|
:class="`item ${makeClassList}`"
|
||||||
v-tooltip="getTooltipOptions()"
|
v-tooltip="getTooltipOptions()"
|
||||||
rel="noopener noreferrer" tabindex="0"
|
rel="noopener noreferrer" tabindex="0"
|
||||||
:id="`link-${id}`"
|
:id="`link-${id}`"
|
||||||
|
@ -30,8 +30,10 @@
|
||||||
:statusSuccess="statusResponse ? statusResponse.successStatus : undefined"
|
:statusSuccess="statusResponse ? statusResponse.successStatus : undefined"
|
||||||
:statusText="statusResponse ? statusResponse.message : undefined"
|
:statusText="statusResponse ? statusResponse.message : undefined"
|
||||||
/>
|
/>
|
||||||
|
<!-- Edit icon (displayed only when in edit mode) -->
|
||||||
<EditModeIcon v-if="isEditMode" class="edit-mode-item" @click="openItemSettings()" />
|
<EditModeIcon v-if="isEditMode" class="edit-mode-item" @click="openItemSettings()" />
|
||||||
</a>
|
</a>
|
||||||
|
<!-- Right-click context menu -->
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
:show="contextMenuOpen && !isAddNew"
|
:show="contextMenuOpen && !isAddNew"
|
||||||
v-click-outside="closeContextMenu"
|
v-click-outside="closeContextMenu"
|
||||||
|
@ -43,6 +45,7 @@
|
||||||
@openMoveItemMenu="openMoveItemMenu"
|
@openMoveItemMenu="openMoveItemMenu"
|
||||||
@openDeleteItem="openDeleteItem"
|
@openDeleteItem="openDeleteItem"
|
||||||
/>
|
/>
|
||||||
|
<!-- Edit and move item menu modals -->
|
||||||
<MoveItemTo v-if="isEditMode" :itemId="id" />
|
<MoveItemTo v-if="isEditMode" :itemId="id" />
|
||||||
<EditItem v-if="editMenuOpen" :itemId="id"
|
<EditItem v-if="editMenuOpen" :itemId="id"
|
||||||
@closeEditMenu="closeEditMenu"
|
@closeEditMenu="closeEditMenu"
|
||||||
|
@ -114,6 +117,14 @@ export default {
|
||||||
accumulatedTarget() {
|
accumulatedTarget() {
|
||||||
return this.target || this.appConfig.defaultOpeningMethod || defaultOpeningMethod;
|
return this.target || this.appConfig.defaultOpeningMethod || defaultOpeningMethod;
|
||||||
},
|
},
|
||||||
|
/* Based on item props, adjust class names */
|
||||||
|
makeClassList() {
|
||||||
|
const {
|
||||||
|
icon, itemSize, isAddNew, isEditMode,
|
||||||
|
} = this;
|
||||||
|
return `size-${itemSize} ${!icon ? 'short' : ''} `
|
||||||
|
+ `${isAddNew ? 'add-new' : ''} ${isEditMode ? 'is-edit-mode' : ''}`;
|
||||||
|
},
|
||||||
/* Convert config target value, into HTML anchor target attribute */
|
/* Convert config target value, into HTML anchor target attribute */
|
||||||
anchorTarget() {
|
anchorTarget() {
|
||||||
if (this.isEditMode) return '_self';
|
if (this.isEditMode) return '_self';
|
||||||
|
@ -521,13 +532,18 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Adjust positioning of status indicator, when in edit mode */
|
||||||
|
a.item.is-edit-mode {
|
||||||
|
&.size-medium .status-indicator { top: 1rem; }
|
||||||
|
&.size-small .status-indicator { right: 1rem; }
|
||||||
|
&.size-large .status-indicator { top: 1.5rem; }
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- An un-scoped style tag, since tooltip is outside this DOM tree -->
|
<!-- An un-scoped style tag, since tooltip is outside this DOM tree -->
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
.disabled-link {
|
.disabled-link {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue