mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-05 03:33:19 -05:00
move api calls to created event (#559)
Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -48,32 +48,16 @@ export default {
|
||||
},
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
async created() {
|
||||
// Initial API Requests
|
||||
this.$store.dispatch("initTheme");
|
||||
this.$store.dispatch("requestRecentRecipes");
|
||||
this.$store.dispatch("refreshToken");
|
||||
this.$store.dispatch("requestCurrentGroup");
|
||||
this.$store.dispatch("requestUserData");
|
||||
this.$store.dispatch("requestCategories");
|
||||
this.$store.dispatch("requestCurrentGroup");
|
||||
this.$store.dispatch("requestTags");
|
||||
this.darkModeSystemCheck();
|
||||
this.darkModeAddEventListener();
|
||||
this.$store.dispatch("requestAppInfo");
|
||||
this.$store.dispatch("requestCustomPages");
|
||||
this.$store.dispatch("requestSiteSettings");
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
refreshing: false,
|
||||
registration: null,
|
||||
snackBtnText: "",
|
||||
snackWithBtnText: "",
|
||||
snackWithButtons: false,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
// Listen for swUpdated event and display refresh snackbar as required.
|
||||
document.addEventListener("swUpdated", this.showRefreshUI, { once: true });
|
||||
// Refresh all open app tabs when a new service worker is installed.
|
||||
@@ -86,6 +70,21 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.darkModeSystemCheck();
|
||||
this.darkModeAddEventListener();
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
refreshing: false,
|
||||
registration: null,
|
||||
snackBtnText: "",
|
||||
snackWithBtnText: "",
|
||||
snackWithButtons: false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
// For Later!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user