mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-16 08:52:21 -05:00
move api calls to created event (#559)
Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -72,6 +72,13 @@ export default {
|
||||
selected: [],
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
if (this.tagSelector) {
|
||||
this.$store.dispatch("requestTags");
|
||||
} else {
|
||||
this.$store.dispatch("requestCategories");
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$emit(MOUNTED_EVENT);
|
||||
this.setInit(this.value);
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
this.selectedItem = this.$store.getters.getActiveLang;
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -122,7 +122,7 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
async created() {
|
||||
await this.$store.dispatch("requestCurrentGroup");
|
||||
await this.$store.dispatch("requestAllRecipes");
|
||||
await this.buildMealStore();
|
||||
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
} else return this.$t("settings.backup.partial-backup");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
this.resetData();
|
||||
this.getAvailableBackups();
|
||||
},
|
||||
|
||||
@@ -78,15 +78,21 @@ export default {
|
||||
hideImage: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getVersion();
|
||||
|
||||
created() {
|
||||
this.showSidebar = !this.isMobile;
|
||||
},
|
||||
|
||||
watch: {
|
||||
user() {
|
||||
this.hideImage = false;
|
||||
},
|
||||
isMain(val) {
|
||||
if (val) {
|
||||
this.$store.dispatch("requestCustomPages");
|
||||
} else {
|
||||
this.getVersion();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user