diff --git a/src/components/Widgets/CryptoPriceChart.vue b/src/components/Widgets/CryptoPriceChart.vue
index e8a07bdd..33531e28 100644
--- a/src/components/Widgets/CryptoPriceChart.vue
+++ b/src/components/Widgets/CryptoPriceChart.vue
@@ -6,7 +6,6 @@
import { Chart } from 'frappe-charts/dist/frappe-charts.min.esm';
import axios from 'axios';
import WidgetMixin from '@/mixins/WidgetMixin';
-import ErrorHandler from '@/utils/ErrorHandler';
import { widgetApiEndpoints } from '@/utils/defaults';
export default {
@@ -67,6 +66,7 @@ export default {
methods: {
/* Extends mixin, and updates data. Called by parent component */
update() {
+ this.startLoading();
this.fetchData();
},
/* Create new chart, using the crypto data */
@@ -98,11 +98,14 @@ export default {
try {
this.lineStatuses = this.processData(response.data);
} catch (chartingError) {
- ErrorHandler('Unable to plot results on chart', chartingError);
+ this.error('Unable to plot results on chart', chartingError);
}
})
.catch((dataFetchError) => {
- ErrorHandler('Unable to fetch crypto data', dataFetchError);
+ this.error('Unable to fetch crypto data', dataFetchError);
+ })
+ .finally(() => {
+ this.finishLoading();
});
},
/* Generate price history in a format that can be consumed by the chart
diff --git a/src/components/Widgets/CryptoWatchList.vue b/src/components/Widgets/CryptoWatchList.vue
index 47dd8adc..da603b35 100644
--- a/src/components/Widgets/CryptoWatchList.vue
+++ b/src/components/Widgets/CryptoWatchList.vue
@@ -21,7 +21,6 @@
@@ -129,15 +162,14 @@ export default {
.widget-base {
position: relative;
padding-top: 0.75rem;
- button.update-btn {
- height: 1.5rem;
+ button.action-btn {
+ height: 1rem;
min-width: auto;
- width: 2rem;
+ width: 1.75rem;
margin: 0;
padding: 0.1rem 0;
position: absolute;
- right: -0.25rem;
- top: -0.25rem;
+ top: 0;
border: none;
opacity: var(--dimming-factor);
color: var(--widget-text-color);
@@ -145,6 +177,27 @@ export default {
opacity: 1;
color: var(--widget-background-color);
}
+ &.update-btn {
+ right: -0.25rem;
+ }
+ &.open-btn {
+ right: 1.75rem;
+ }
+ }
+
+ .widget-error {
+ p.error-msg {
+ color: var(--warning);
+ font-weight: bold;
+ font-size: 1rem;
+ margin: 0 auto 0.5rem auto;
+ }
+ p.error-output {
+ font-family: var(--font-monospace);
+ color: var(--widget-text-color);
+ font-size: 0.85rem;
+ margin: 0.5rem auto;
+ }
}
}
diff --git a/src/components/Widgets/WidgetGroup.vue b/src/components/Widgets/WidgetGroup.vue
deleted file mode 100644
index 7efcebf2..00000000
--- a/src/components/Widgets/WidgetGroup.vue
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/components/Widgets/XkcdComic.vue b/src/components/Widgets/XkcdComic.vue
index 3831f985..9674f4ee 100644
--- a/src/components/Widgets/XkcdComic.vue
+++ b/src/components/Widgets/XkcdComic.vue
@@ -10,7 +10,6 @@