Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

πŸ› Don't show right-click text when context menu disabled (#2279)

Alicia Sykesf18f7034cdc5
diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json
index 02bb86da..772cf3d9 100644
--- a/src/assets/locales/en.json
+++ b/src/assets/locales/en.json
@@ -369,6 +369,7 @@
"edit-section-title": "Edit Section",
"add-section-title": "Add New Section",
"edit-tooltip": "Click to Edit, or right-click for more options",
+ "edit-tooltip-basic": "Click to Edit",
"remove-confirm": "Are you sure you want to remove this section? This action can be undone later.",
"missing-name-err": "A section name is required",
"duplicate-name-err": "A section named '{name}' already exists"
diff --git a/src/components/LinkItems/Collapsable.vue b/src/components/LinkItems/Collapsable.vue
index 648d47c6..44f94aee 100644
--- a/src/components/LinkItems/Collapsable.vue
+++ b/src/components/LinkItems/Collapsable.vue
@@ -185,7 +185,10 @@ export default {
this.$emit('navigateToSection');
},
editTooltip() {
- const content = this.$t('interactive-editor.edit-section.edit-tooltip');
+ const key = this.disableContextMenu
+ ? 'interactive-editor.edit-section.edit-tooltip-basic'
+ : 'interactive-editor.edit-section.edit-tooltip';
+ const content = this.$t(key);
return { content, delay: { show: 100, hide: 0 } };
},
toggleTooltip() {
diff --git a/src/components/LinkItems/Item.vue b/src/components/LinkItems/Item.vue
index 1237ce6b..b8cd2805 100644
--- a/src/components/LinkItems/Item.vue
+++ b/src/components/LinkItems/Item.vue
@@ -183,7 +183,10 @@ export default {
if (provider) parts.push(`<b>Provider</b>: ${provider}`);
if (description) parts.push(description);
if (hotkey) parts.push(`Press '${hotkey}' to launch`);
- const editText = this.$t('interactive-editor.edit-section.edit-tooltip');
+ const editKey = this.appConfig.disableContextMenu
+ ? 'interactive-editor.edit-section.edit-tooltip-basic'
+ : 'interactive-editor.edit-section.edit-tooltip';
+ const editText = this.$t(editKey);
return {
content: (this.isEditMode ? editText : parts.join('<br>')),
html: true,