29 lines
707 B
JavaScript
29 lines
707 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); // TODO: toto nejspis nebude potreba!
|
|
|
|
const resetAfterRouteChange = () => {
|
|
pageTitle.value = null;
|
|
appStatus.value = 200;
|
|
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,
|
|
resetAfterRouteChange, setPageTitle, setBreadcrumbs
|
|
}
|
|
})
|