chore: Undo accidental formattnig

This commit is contained in:
Jimmeh 2024-03-06 19:11:17 +00:00
parent 98ed7d1190
commit 4471e316ff
1 changed files with 19 additions and 18 deletions

View File

@ -1,18 +1,10 @@
<template> <template>
<div :class="`widget-base ${loading ? 'is-loading' : ''}`"> <div :class="`widget-base ${loading ? 'is-loading' : ''}`">
<!-- Update and Full-Page Action Buttons --> <!-- Update and Full-Page Action Buttons -->
<Button <Button :click="update" class="action-btn update-btn" v-if="!hideControls && !loading">
:click="update"
class="action-btn update-btn"
v-if="!hideControls && !loading"
>
<UpdateIcon /> <UpdateIcon />
</Button> </Button>
<Button <Button :click="fullScreenWidget" class="action-btn open-btn" v-if="!hideControls && !error && !loading">
:click="fullScreenWidget"
class="action-btn open-btn"
v-if="!hideControls && !error && !loading"
>
<OpenIcon /> <OpenIcon />
</Button> </Button>
<!-- Loading Spinner --> <!-- Loading Spinner -->
@ -31,13 +23,8 @@
</div> </div>
<!-- Widget --> <!-- Widget -->
<div :class="`widget-wrap ${error ? 'has-error' : ''}`"> <div :class="`widget-wrap ${error ? 'has-error' : ''}`">
<component <component v-bind:is="component" :options="widgetOptions" @loading="setLoaderState" @error="handleError"
v-bind:is="component" :ref="widgetRef" />
:options="widgetOptions"
@loading="setLoaderState"
@error="handleError"
:ref="widgetRef"
/>
</div> </div>
</div> </div>
</template> </template>
@ -124,7 +111,7 @@ const COMPAT = {
'synology-download': 'SynologyDownload', 'synology-download': 'SynologyDownload',
'system-info': 'SystemInfo', 'system-info': 'SystemInfo',
'tfl-status': 'TflStatus', 'tfl-status': 'TflStatus',
'uptime-kuma':'UptimeKuma', 'uptime-kuma': 'UptimeKuma',
'wallet-balance': 'WalletBalance', 'wallet-balance': 'WalletBalance',
weather: 'Weather', weather: 'Weather',
'weather-forecast': 'WeatherForecast', 'weather-forecast': 'WeatherForecast',
@ -216,11 +203,13 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/styles/media-queries.scss"; @import "@/styles/media-queries.scss";
.widget-base { .widget-base {
position: relative; position: relative;
padding: 0.75rem 0.5rem 0.5rem 0.5rem; padding: 0.75rem 0.5rem 0.5rem 0.5rem;
background: var(--widget-base-background); background: var(--widget-base-background);
box-shadow: var(--widget-base-shadow, none); box-shadow: var(--widget-base-shadow, none);
// Refresh and full-page action buttons // Refresh and full-page action buttons
button.action-btn { button.action-btn {
height: 1rem; height: 1rem;
@ -233,21 +222,26 @@ export default {
border: none; border: none;
opacity: var(--dimming-factor); opacity: var(--dimming-factor);
color: var(--widget-text-color); color: var(--widget-text-color);
&:hover { &:hover {
opacity: 1; opacity: 1;
color: var(--widget-background-color); color: var(--widget-background-color);
} }
&.update-btn { &.update-btn {
right: -0.25rem; right: -0.25rem;
} }
&.open-btn { &.open-btn {
right: 1.75rem; right: 1.75rem;
} }
} }
// Optional widget label // Optional widget label
.widget-label { .widget-label {
color: var(--widget-text-color); color: var(--widget-text-color);
} }
// Actual widget container // Actual widget container
.widget-wrap { .widget-wrap {
&.has-error { &.has-error {
@ -255,11 +249,13 @@ export default {
opacity: 0.5; opacity: 0.5;
border-radius: var(--curve-factor); border-radius: var(--curve-factor);
background: #ffff0040; background: #ffff0040;
&:hover { &:hover {
background: none; background: none;
} }
} }
} }
// Error message output // Error message output
.widget-error { .widget-error {
p.error-msg { p.error-msg {
@ -268,12 +264,14 @@ export default {
font-size: 1rem; font-size: 1rem;
margin: 0 auto 0.5rem auto; margin: 0 auto 0.5rem auto;
} }
p.error-output { p.error-output {
font-family: var(--font-monospace); font-family: var(--font-monospace);
color: var(--widget-text-color); color: var(--widget-text-color);
font-size: 0.85rem; font-size: 0.85rem;
margin: 0.5rem auto; margin: 0.5rem auto;
} }
p.retry-link { p.retry-link {
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
@ -282,14 +280,17 @@ export default {
margin: 0; margin: 0;
} }
} }
// Loading spinner // Loading spinner
.loading { .loading {
margin: 0.2rem auto; margin: 0.2rem auto;
text-align: center; text-align: center;
svg.loader { svg.loader {
width: 100px; width: 100px;
} }
} }
// Hide widget contents while loading // Hide widget contents while loading
&.is-loading { &.is-loading {
.widget-wrap { .widget-wrap {