15 lines
375 B
TypeScript
15 lines
375 B
TypeScript
// Ported from legacy henza_pwa/src/store/loadingStore.ts — a single global
|
|
// loading flag, converted from the hand-rolled ref-class to Pinia.
|
|
import { defineStore } from 'pinia'
|
|
|
|
export const useLoadingStore = defineStore('loading', {
|
|
state: () => ({
|
|
loading: false,
|
|
}),
|
|
actions: {
|
|
setLoading(loading: boolean) {
|
|
this.loading = loading
|
|
},
|
|
},
|
|
})
|