test
This commit is contained in:
parent
efd21a7297
commit
441676be27
97 changed files with 10764 additions and 223 deletions
20
frontend/src/stores/ui.ts
Normal file
20
frontend/src/stores/ui.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { defineStore } from "pinia";
|
||||
|
||||
export interface GlobalErrorState {
|
||||
message: string;
|
||||
requestId: string | null;
|
||||
}
|
||||
|
||||
export const useUiStore = defineStore("ui", {
|
||||
state: () => ({
|
||||
globalError: null as GlobalErrorState | null,
|
||||
}),
|
||||
actions: {
|
||||
setGlobalError(error: GlobalErrorState): void {
|
||||
this.globalError = error;
|
||||
},
|
||||
clearGlobalError(): void {
|
||||
this.globalError = null;
|
||||
},
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue