You've already forked pages
forked from didirus/AstralRinth
* Navbar wireup * Fix height issue * Fix syncing * working branch * Added root directories to breadcrumbs * fix jre detect --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me>
24 lines
484 B
JavaScript
24 lines
484 B
JavaScript
import { defineStore } from 'pinia'
|
|
|
|
export const useBreadcrumbs = defineStore('breadcrumbsStore', {
|
|
state: () => ({
|
|
names: new Map(),
|
|
context: null,
|
|
rootContext: null,
|
|
}),
|
|
actions: {
|
|
getName(route) {
|
|
return this.names.get(route) ?? route
|
|
},
|
|
setName(route, title) {
|
|
this.names.set(route, title)
|
|
},
|
|
setContext(context) {
|
|
this.context = context
|
|
},
|
|
setRootContext(context) {
|
|
this.rootContext = context
|
|
},
|
|
},
|
|
})
|