From a11111326e19e4a72acad5284278d8677fcacc5a Mon Sep 17 00:00:00 2001 From: Yohan Date: Fri, 10 Nov 2023 13:09:27 +1100 Subject: [PATCH] Fix files not saving state --- .../js/components/shared/ModuleControls.vue | 2 +- .../js/components/shared/SettingStack.vue | 2 -- .../shared/settings/SettingsBackground.vue | 34 +++++++++---------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/resources/js/components/shared/ModuleControls.vue b/resources/js/components/shared/ModuleControls.vue index 96d459e..7d51049 100644 --- a/resources/js/components/shared/ModuleControls.vue +++ b/resources/js/components/shared/ModuleControls.vue @@ -141,4 +141,4 @@ export default { }, }, }; - \ No newline at end of file + diff --git a/resources/js/components/shared/SettingStack.vue b/resources/js/components/shared/SettingStack.vue index 369cd66..e1cfb60 100644 --- a/resources/js/components/shared/SettingStack.vue +++ b/resources/js/components/shared/SettingStack.vue @@ -103,5 +103,3 @@ export default { }, }; - - \ No newline at end of file diff --git a/resources/js/components/shared/settings/SettingsBackground.vue b/resources/js/components/shared/settings/SettingsBackground.vue index 31d58e7..c6de060 100644 --- a/resources/js/components/shared/settings/SettingsBackground.vue +++ b/resources/js/components/shared/settings/SettingsBackground.vue @@ -60,7 +60,7 @@
@@ -204,7 +194,8 @@ export default { icon: "assets", listable: "hidden", }, - value: this.getDeep(`inline.background.video.mp4`) || [], + meta: {}, + value: [], }, webm: { config: { @@ -219,7 +210,8 @@ export default { icon: "assets", listable: "hidden", }, - value: this.getDeep(`inline.background.video.webm`) || [], + meta: {}, + value: [], }, }, }, @@ -296,6 +288,14 @@ export default { }, }, mounted() { + Object.keys(this.inline.background.video).forEach((key) => { + this.inline.background.video[key].value = this.getDeep( + `inline.background.video.${key}` + ); + this.inline.background.video[key].meta.data[0] = { + id: this.getDeep(`inline.background.video.${key}.0`), + } + }); const val = this.getDeep(`inline.background.gradient.value`); if (val) { this.gradientToggle = true;