feat(filters): add filters for the main page
This commit is contained in:
@@ -15,6 +15,7 @@ import { register } from 'swiper/element/bundle';
|
||||
import 'swiper/element/bundle';
|
||||
import 'swiper/css/bundle';
|
||||
import AppLoading from "@/AppLoading.vue";
|
||||
import {useProductFiltersStore} from "@/stores/ProductFiltersStore.js";
|
||||
register();
|
||||
|
||||
const pinia = createPinia();
|
||||
@@ -30,6 +31,11 @@ const appLoading = createApp(AppLoading);
|
||||
appLoading.mount('#app');
|
||||
|
||||
settings.load()
|
||||
.then(async () => {
|
||||
console.debug('Load default filters for the main page');
|
||||
const filtersStore = useProductFiltersStore();
|
||||
filtersStore.applied = await filtersStore.fetchFiltersForMainPage();
|
||||
})
|
||||
.then(() => {
|
||||
if (settings.app_enabled === false) {
|
||||
throw new Error('App disabled (maintenance mode)');
|
||||
|
||||
Reference in New Issue
Block a user