mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-29 20:11:53 +03:00
✨ Adds option for widget labels (#769)
This commit is contained in:
parent
4210c985b7
commit
eff49995b9
@ -123,7 +123,7 @@ export default {
|
||||
if (emojiLookup[emojiCode]) {
|
||||
return emojiLookup[emojiCode];
|
||||
} else {
|
||||
this.imageNotFound(`No emoji found with name '${emojiCode}'`);
|
||||
// this.imageNotFound(`No emoji found with name '${emojiCode}'`);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
@ -18,6 +18,8 @@
|
||||
<p class="error-output">{{ errorMsg }}</p>
|
||||
<p class="retry-link" @click="update">Retry</p>
|
||||
</div>
|
||||
<!-- Widget Label -->
|
||||
<div class="widget-label" v-if="widgetOptions.label">{{ widgetOptions.label }}</div>
|
||||
<!-- Widget -->
|
||||
<div :class="`widget-wrap ${ error ? 'has-error' : '' }`">
|
||||
<component
|
||||
@ -142,11 +144,12 @@ export default {
|
||||
const options = this.widget.options || {};
|
||||
const timeout = this.widget.timeout || null;
|
||||
const ignoreErrors = this.widget.ignoreErrors || false;
|
||||
const label = this.widget.label || null;
|
||||
const useProxy = this.appConfig.widgetsAlwaysUseProxy || !!this.widget.useProxy;
|
||||
const updateInterval = this.widget.updateInterval !== undefined
|
||||
? this.widget.updateInterval : null;
|
||||
return {
|
||||
timeout, ignoreErrors, useProxy, updateInterval, ...options,
|
||||
timeout, ignoreErrors, label, useProxy, updateInterval, ...options,
|
||||
};
|
||||
},
|
||||
/* A unique string to reference the widget by */
|
||||
@ -219,7 +222,11 @@ export default {
|
||||
right: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional widget label
|
||||
.widget-label {
|
||||
color: var(--widget-text-color);
|
||||
}
|
||||
// Actual widget container
|
||||
.widget-wrap {
|
||||
&.has-error {
|
||||
cursor: not-allowed;
|
||||
|
Loading…
Reference in New Issue
Block a user