show notification in frontend

This commit is contained in:
MaysWind
2024-08-05 23:59:57 +08:00
parent 051c319890
commit 0e946a4b3b
12 changed files with 133 additions and 5 deletions
+8
View File
@@ -306,6 +306,10 @@ export default {
self.exchangeRatesStore.getLatestExchangeRates({ silent: true, force: false });
}
if (authResponse.notificationContent) {
self.rootStore.setNotificationContent(authResponse.notificationContent);
}
self.$router.replace('/');
}).catch(error => {
self.logining = false;
@@ -355,6 +359,10 @@ export default {
self.exchangeRatesStore.getLatestExchangeRates({ silent: true, force: false });
}
if (authResponse.notificationContent) {
self.rootStore.setNotificationContent(authResponse.notificationContent);
}
self.$router.replace('/');
}).catch(error => {
self.verifying = false;
+4
View File
@@ -463,6 +463,10 @@ export default {
self.exchangeRatesStore.getLatestExchangeRates({ silent: true, force: false });
}
if (response.notificationContent) {
self.rootStore.setNotificationContent(response.notificationContent);
}
self.submitting = false;
if (self.usePresetCategories && !response.presetCategoriesSaved) {
+8
View File
@@ -188,6 +188,10 @@ export default {
setExpenseAndIncomeAmountColor(response.user.expenseAmountColor, response.user.incomeAmountColor);
}
if (response.notificationContent) {
self.rootStore.setNotificationContent(response.notificationContent);
}
});
if (self.settingsStore.appSettings.autoUpdateExchangeRatesData) {
@@ -233,6 +237,10 @@ export default {
setExpenseAndIncomeAmountColor(response.user.expenseAmountColor, response.user.incomeAmountColor);
}
if (response.notificationContent) {
self.rootStore.setNotificationContent(response.notificationContent);
}
});
if (self.settingsStore.appSettings.autoUpdateExchangeRatesData) {
+8
View File
@@ -315,6 +315,10 @@ export default {
self.exchangeRatesStore.getLatestExchangeRates({ silent: true, force: false });
}
if (authResponse.notificationContent) {
self.rootStore.setNotificationContent(authResponse.notificationContent);
}
router.refreshPage();
}).catch(error => {
self.logining = false;
@@ -378,6 +382,10 @@ export default {
self.exchangeRatesStore.getLatestExchangeRates({ silent: true, force: false });
}
if (authResponse.notificationContent) {
self.rootStore.setNotificationContent(authResponse.notificationContent);
}
self.show2faSheet = false;
router.refreshPage();
}).catch(error => {
+4
View File
@@ -333,6 +333,10 @@ export default {
self.exchangeRatesStore.getLatestExchangeRates({ silent: true, force: false });
}
if (response.notificationContent) {
self.rootStore.setNotificationContent(response.notificationContent);
}
self.submitting = false;
self.$hideLoading();
+8
View File
@@ -141,6 +141,10 @@ export default {
setExpenseAndIncomeAmountColor(response.user.expenseAmountColor, response.user.incomeAmountColor);
}
if (response.notificationContent) {
self.rootStore.setNotificationContent(response.notificationContent);
}
});
if (self.settingsStore.appSettings.autoUpdateExchangeRatesData) {
@@ -191,6 +195,10 @@ export default {
setExpenseAndIncomeAmountColor(response.user.expenseAmountColor, response.user.incomeAmountColor);
}
if (response.notificationContent) {
self.rootStore.setNotificationContent(response.notificationContent);
}
});
if (self.settingsStore.appSettings.autoUpdateExchangeRatesData) {