From 1f0ebff2418db2f5b7b40dbb3793847f9ecb9b2b Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 26 Jan 2025 23:56:42 +0100 Subject: [PATCH] Fix UI not reacting to settings updates --- src/csui/PlayerOverlay.vue | 5 +++++ src/csui/Popup.vue | 4 ++++ src/csui/src/res-common/common.scss | 6 ++++++ src/install/first-time/App.vue | 4 ++++ src/install/updated/App.vue | 4 ++++ 5 files changed, 23 insertions(+) diff --git a/src/csui/PlayerOverlay.vue b/src/csui/PlayerOverlay.vue index f8e1217..4a66f94 100644 --- a/src/csui/PlayerOverlay.vue +++ b/src/csui/PlayerOverlay.vue @@ -585,6 +585,11 @@ export default { handleBusTunnelIn(payload) { this.eventBus.send(payload.action, payload.config, payload.routingData); + }, + + updateConfig() { + this.settings.init(); + this.$nextTick( () => this.$forceUpdate()); } } } diff --git a/src/csui/Popup.vue b/src/csui/Popup.vue index 29e2d7f..4fef7ec 100644 --- a/src/csui/Popup.vue +++ b/src/csui/Popup.vue @@ -334,6 +334,10 @@ export default { }, getRandomColor() { return `rgb(${Math.floor(Math.random() * 128)}, ${Math.floor(Math.random() * 128)}, ${Math.floor(Math.random() * 128)})`; + }, + updateConfig() { + this.settings.init(); + this.$nextTick( () => this.$forceUpdate()); } } } diff --git a/src/csui/src/res-common/common.scss b/src/csui/src/res-common/common.scss index e195100..26bd323 100644 --- a/src/csui/src/res-common/common.scss +++ b/src/csui/src/res-common/common.scss @@ -4,6 +4,12 @@ div, p, span { font-size: 16px; } +.disabled { + pointer-events: none; + /* color: #666; */ + filter: contrast(50%) brightness(40%) grayscale(100%); +} + .warning-box { display: flex; flex-direction: row; diff --git a/src/install/first-time/App.vue b/src/install/first-time/App.vue index 55db685..0e56988 100644 --- a/src/install/first-time/App.vue +++ b/src/install/first-time/App.vue @@ -94,6 +94,10 @@ export default { components: { }, methods: { + updateConfig() { + this.settings.init(); + this.$nextTick( () => this.$forceUpdate()); + } } } diff --git a/src/install/updated/App.vue b/src/install/updated/App.vue index 114f2a4..809c74f 100644 --- a/src/install/updated/App.vue +++ b/src/install/updated/App.vue @@ -95,6 +95,10 @@ export default { components: { }, methods: { + updateConfig() { + this.settings.init(); + this.$nextTick( () => this.$forceUpdate()); + } } }