aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue
index 24f5b83..0641b2a 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -54,6 +54,7 @@
v-else-if="atSettings"
@update-title-size="updateTitleSize"
@update-content-size="updateContentSize"
+ @update-background-image-u-r-l="updateBackgroundImageURL"
:realTitleSize="parseInt(titleSize)"
:realContentSize="contentSize"
/>
@@ -93,7 +94,7 @@ export default {
snackbarText: "Default snackbar text (End-user shouldn't see this)",
bg: {
// backgroundColor: "grey",
- // backgroundImage: "url(https://wallpapercave.com/wp/wp9649930.jpg)",
+ backgroundImage: "",
backgroundPosition: "center",
},
}),
@@ -110,6 +111,12 @@ export default {
};
},
+ mounted() {
+ let backgroundImageURL =
+ JSON.parse(localStorage.getItem("backgroundImageURL")) || "";
+ this.updateBackgroundImageURL(backgroundImageURL);
+ },
+
methods: {
toggleDrawer() {
this.drawer = !this.drawer;
@@ -124,6 +131,9 @@ export default {
updateContentSize(s) {
this.contentSize = s;
},
+ updateBackgroundImageURL(s) {
+ this.bg.backgroundImage = s ? `url(${s})` : "";
+ },
},
};
</script>