π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π Fixes iframe widget refresh (#1571)
Alicia Sykes07dbcccc8371
diff --git a/src/components/Widgets/IframeWidget.vue b/src/components/Widgets/IframeWidget.vueindex 5c5f7b71..656b893e 100644--- a/src/components/Widgets/IframeWidget.vue+++ b/src/components/Widgets/IframeWidget.vue@@ -45,8 +45,17 @@ export default {/* Refreshes iframe contents, called by parent */update() {this.startLoading();- this.updateCount += 1;- (document.getElementById(this.frameId) || {}).src = this.frameUrl;+ const iframe = document.getElementById(this.frameId);+ if (iframe.contentWindow) {+ try {+ iframe.contentWindow.location.href = this.frameUrl;+ iframe.contentWindow.location.reload(true);+ } catch (e) {+ this.error('Failed to refresh iframe', e, true);+ }+ } else {+ this.error('Couldn\'t find iframe', null, true);+ }this.finishLoading();},},diff --git a/src/mixins/WidgetMixin.js b/src/mixins/WidgetMixin.jsindex 53019adf..a497dafb 100644--- a/src/mixins/WidgetMixin.js+++ b/src/mixins/WidgetMixin.js@@ -72,9 +72,9 @@ const WidgetMixin = {this.updater = setInterval(() => { this.update(); }, this.updateInterval);},/* Called when an error occurs. Logs to handler, and passes to parent component */- error(msg, stackTrace) {+ error(msg, stackTrace, quite = false) {ErrorHandler(msg, stackTrace);- if (!this.options.ignoreErrors) {+ if (!this.options.ignoreErrors && !quite) {this.$emit('error', msg);}},