mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 00:34:28 +08:00
show notification in frontend
This commit is contained in:
@@ -17,6 +17,9 @@ import logger from '@/lib/logger.js';
|
||||
import { isObject, isString } from '@/lib/common.js';
|
||||
|
||||
export const useRootStore = defineStore('root', {
|
||||
state: () => ({
|
||||
currentNotification: null
|
||||
}),
|
||||
actions: {
|
||||
resetAllStates(resetUserInfoAndSettings) {
|
||||
if (resetUserInfoAndSettings) {
|
||||
@@ -24,6 +27,8 @@ export const useRootStore = defineStore('root', {
|
||||
exchangeRatesStore.resetLatestExchangeRates();
|
||||
}
|
||||
|
||||
this.setNotificationContent(null);
|
||||
|
||||
const statisticsStore = useStatisticsStore();
|
||||
statisticsStore.resetTransactionStatistics();
|
||||
|
||||
@@ -511,6 +516,9 @@ export const useRootStore = defineStore('root', {
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
setNotificationContent(content) {
|
||||
this.currentNotification = content;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user