move currency display type to user settings

This commit is contained in:
MaysWind
2024-06-30 15:39:49 +08:00
parent 445969c449
commit 59d03b54d7
19 changed files with 318 additions and 114 deletions
+2 -1
View File
@@ -383,7 +383,8 @@ export const useRootStore = defineStore('root', {
shortTimeFormat: profile.shortTimeFormat,
decimalSeparator: profile.decimalSeparator,
digitGroupingSymbol: profile.digitGroupingSymbol,
digitGrouping: profile.digitGrouping
digitGrouping: profile.digitGrouping,
currencyDisplayType: profile.currencyDisplayType
}).then(response => {
const data = response.data;
-5
View File
@@ -14,7 +14,6 @@ export const useSettingsStore = defineStore('settings', {
applicationLockWebAuthn: settings.isEnableApplicationLockWebAuthn(),
autoUpdateExchangeRatesData: settings.isAutoUpdateExchangeRatesData(),
autoGetCurrentGeoLocation: settings.isAutoGetCurrentGeoLocation(),
currencyDisplayMode: settings.getCurrencyDisplayMode(),
showAmountInHomePage: settings.isShowAmountInHomePage(),
timezoneUsedForStatisticsInHomePage: settings.getTimezoneUsedForStatisticsInHomePage(),
itemsCountInTransactionListPage: settings.getItemsCountInTransactionListPage(),
@@ -67,10 +66,6 @@ export const useSettingsStore = defineStore('settings', {
settings.setAutoGetCurrentGeoLocation(value);
this.appSettings.autoGetCurrentGeoLocation = value;
},
setCurrencyDisplayMode(value) {
settings.setCurrencyDisplayMode(value);
this.appSettings.currencyDisplayMode = value;
},
setShowAmountInHomePage(value) {
settings.setShowAmountInHomePage(value);
this.appSettings.showAmountInHomePage = value;
+4
View File
@@ -65,6 +65,10 @@ export const useUserStore = defineStore('user', {
currentUserDigitGrouping(state) {
const userInfo = state.currentUserInfo || {};
return userInfo.digitGrouping;
},
currentUserCurrencyDisplayType(state) {
const userInfo = state.currentUserInfo || {};
return userInfo.currencyDisplayType;
}
},
actions: {