From 0bdb5b4721b16c145871f177a8207a2734440475 Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 5 May 2021 16:19:43 +0100 Subject: [PATCH] Actually save stream settings to local storage After some refactoring, I lost the code that actually saved stream settings to local storage. This commit restores that functionality. --- .../settingsComponents/streamSettings.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/streamSettings.vue b/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/streamSettings.vue index 2136ad5a..60b7cdb7 100644 --- a/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/streamSettings.vue +++ b/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/streamSettings.vue @@ -95,13 +95,22 @@ export default { // Cache the stream settings to local storage for persistence // (the next 3 functions all relate to this) disableStream: function(newValue) { - console.log(`disableStream updated to ${newValue} and saved in local storage`); + console.log( + `disableStream updated to ${newValue} and saved in local storage` + ); + this.setLocalStorageObj("disableStream", newValue); }, autoGpuPreview: function(newValue) { - console.log(`GPU preview updated to ${newValue} and saved in local storage`); + console.log( + `GPU preview updated to ${newValue} and saved in local storage` + ); + this.setLocalStorageObj("autoGpuPreview", newValue); }, trackWindow: function(newValue) { - console.log(`trackWindow updated to ${newValue} and saved in local storage`); + console.log( + `trackWindow updated to ${newValue} and saved in local storage` + ); + this.setLocalStorageObj("trackWindow", newValue); } },