Skip to content

Commit

Permalink
Fix files not saving state
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohan committed Nov 10, 2023
1 parent 718b408 commit a111113
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion resources/js/components/shared/ModuleControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ export default {
},
},
};
</script>
</script>
2 changes: 0 additions & 2 deletions resources/js/components/shared/SettingStack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,3 @@ export default {
},
};
</script>
<style></style>
34 changes: 17 additions & 17 deletions resources/js/components/shared/settings/SettingsBackground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<assets-fieldtype
handle="settings_background_image"
:config="inline.background.image.config"
:meta="undefined"
:meta="inline.background.image.meta || {}"
:value="inline.background.image.value"
@input="
updateField({
Expand All @@ -87,21 +87,16 @@
<assets-fieldtype
handle="settings_background_video_mp4"
:config="inline.background.video.mp4.config"
:meta="undefined"
:value="inline.background.video.mp4.value"
:key="inline.background.video.mp4.value"
:meta="inline.background.video.mp4.meta || {}"
@input="
updateField({
type: 'asset',
path: 'inline.background.video.mp4',
val: $event,
})
"
@meta-updated="
updateMeta({
path: `inline.background.video.mp4.meta`,
val: $event,
})
"
/>
</div>
<div
Expand All @@ -112,21 +107,16 @@
<assets-fieldtype
handle="settings_background_video_webm"
:config="inline.background.video.webm.config"
:meta="undefined"
:meta="inline.background.video.webm.meta || {}"
:value="inline.background.video.webm.value"
:key="inline.background.video.webm.value"
@input="
updateField({
type: 'asset',
path: 'inline.background.video.webm',
val: $event,
})
"
@meta-updated="
updateMeta({
path: `inline.background.video.webm.meta`,
val: $event,
})
"
/>
</div>
</vue-tab>
Expand Down Expand Up @@ -204,7 +194,8 @@ export default {
icon: "assets",
listable: "hidden",
},
value: this.getDeep(`inline.background.video.mp4`) || [],
meta: {},
value: [],
},
webm: {
config: {
Expand All @@ -219,7 +210,8 @@ export default {
icon: "assets",
listable: "hidden",
},
value: this.getDeep(`inline.background.video.webm`) || [],
meta: {},
value: [],
},
},
},
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a111113

Please sign in to comment.