From ecf6a844ddecc67016c115736f6e8317e715960e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 22 Nov 2020 14:26:25 +0100 Subject: [PATCH] Added support for refreshSeconds on dashboard level --- .../backend/http/webapp/src/views/Dashboard.vue | 15 +++++++++++++++ .../http/webapp/src/widgets/Calendar/Index.vue | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/platypush/backend/http/webapp/src/views/Dashboard.vue b/platypush/backend/http/webapp/src/views/Dashboard.vue index f59bbfa02f..fa308cdb36 100644 --- a/platypush/backend/http/webapp/src/views/Dashboard.vue +++ b/platypush/backend/http/webapp/src/views/Dashboard.vue @@ -20,6 +20,15 @@ export default { name: 'Dashboard', mixins: [Utils], components: {Widget, Loading}, + props: { + // Refresh interval in seconds. + refreshSeconds: { + type: Number, + required: false, + default: 0, + }, + }, + data() { return { widgets: [], @@ -75,6 +84,12 @@ export default { mounted() { this.refreshDashboard() + if (this.refreshSeconds) { + const self = this + setTimeout(() => { + self.refreshDashboard() + }, parseInt((this.refreshSeconds*1000).toFixed(0))) + } } } diff --git a/platypush/backend/http/webapp/src/widgets/Calendar/Index.vue b/platypush/backend/http/webapp/src/widgets/Calendar/Index.vue index 36697368b2..c58ccdd715 100644 --- a/platypush/backend/http/webapp/src/widgets/Calendar/Index.vue +++ b/platypush/backend/http/webapp/src/widgets/Calendar/Index.vue @@ -99,7 +99,7 @@ export default { } .event { - font-size: .95em; + font-size: .9em; } .event-list {