29 lines
729 B
JavaScript
29 lines
729 B
JavaScript
import {defineStore} from 'pinia'
|
|
import {ref} from "vue";
|
|
|
|
export const useAppStore = defineStore('App', () => {
|
|
const pageTitle = ref(null);
|
|
const breadcrumbs = ref(null);
|
|
const appStatus = ref(200);
|
|
|
|
const resetBeforeRouteChange = () => {
|
|
// pageTitle.value = null;
|
|
// appStatus.value = 200; // tohle dela problem pri renderu 404 na serveru
|
|
// breadcrumbs.value = null;
|
|
};
|
|
|
|
const setPageTitle = (value) => {
|
|
// TODO: je toto vubec potreba?
|
|
pageTitle.value = value;
|
|
}
|
|
const setBreadcrumbs = (items) => {
|
|
// TODO: je toto vubec potreba?
|
|
breadcrumbs.value = items;
|
|
}
|
|
|
|
return {
|
|
pageTitle, breadcrumbs, appStatus,
|
|
resetBeforeRouteChange, setPageTitle, setBreadcrumbs
|
|
}
|
|
})
|