mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-26 23:24:38 +02:00
💄 Show provider in tooltip, if available
This commit is contained in:
parent
27dd60a812
commit
3141565cc9
@ -63,6 +63,7 @@ export default {
|
|||||||
color: String, // Optional text and icon color, specified in hex code
|
color: String, // Optional text and icon color, specified in hex code
|
||||||
backgroundColor: String, // Optional item background color
|
backgroundColor: String, // Optional item background color
|
||||||
url: String, // URL to the resource, optional but recommended
|
url: String, // URL to the resource, optional but recommended
|
||||||
|
provider: String, // Optional provider name, for external apps
|
||||||
hotkey: Number, // Shortcut for quickly launching app
|
hotkey: Number, // Shortcut for quickly launching app
|
||||||
target: { // Where resource will open, either 'newtab', 'sametab' or 'modal'
|
target: { // Where resource will open, either 'newtab', 'sametab' or 'modal'
|
||||||
type: String,
|
type: String,
|
||||||
@ -131,14 +132,16 @@ export default {
|
|||||||
},
|
},
|
||||||
/* Returns configuration object for the tooltip */
|
/* Returns configuration object for the tooltip */
|
||||||
getTooltipOptions() {
|
getTooltipOptions() {
|
||||||
if (!this.description) return {}; // If no description, then skip
|
if (!this.description && !this.provider) return {}; // If no description, then skip
|
||||||
const hotkeyText = this.hotkey ? `\nPress '${this.hotkey}' to launch` : '';
|
const description = this.description ? this.description : '';
|
||||||
|
const providerText = this.provider ? `<b>Provider</b>: ${this.provider}` : '';
|
||||||
|
const lb1 = description && providerText ? '<br>' : '';
|
||||||
|
const hotkeyText = this.hotkey ? `<br>Press '${this.hotkey}' to launch` : '';
|
||||||
return {
|
return {
|
||||||
disabled: !this.description,
|
content: providerText + lb1 + description + hotkeyText,
|
||||||
content: this.description + hotkeyText,
|
|
||||||
trigger: 'hover focus',
|
trigger: 'hover focus',
|
||||||
hideOnTargetClick: true,
|
hideOnTargetClick: true,
|
||||||
html: false,
|
html: true,
|
||||||
placement: this.statusResponse ? 'left' : 'auto',
|
placement: this.statusResponse ? 'left' : 'auto',
|
||||||
delay: { show: 600, hide: 200 },
|
delay: { show: 600, hide: 200 },
|
||||||
classes: 'item-description-tooltip',
|
classes: 'item-description-tooltip',
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
:statusCheckHeaders="item.statusCheckHeaders"
|
:statusCheckHeaders="item.statusCheckHeaders"
|
||||||
:itemSize="newItemSize"
|
:itemSize="newItemSize"
|
||||||
:hotkey="item.hotkey"
|
:hotkey="item.hotkey"
|
||||||
|
:provider="item.provider"
|
||||||
:enableStatusCheck="shouldEnableStatusCheck(item.statusCheck)"
|
:enableStatusCheck="shouldEnableStatusCheck(item.statusCheck)"
|
||||||
:statusCheckInterval="getStatusCheckInterval()"
|
:statusCheckInterval="getStatusCheckInterval()"
|
||||||
:statusCheckAllowInsecure="item.statusCheckAllowInsecure"
|
:statusCheckAllowInsecure="item.statusCheckAllowInsecure"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user