mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 16:07:33 +08:00
remember last selected file type in import transaction dialog (#412)
This commit is contained in:
@@ -250,6 +250,27 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
updateUserApplicationCloudSettingValue('alwaysShowTransactionPicturesInMobileTransactionEditPage', value);
|
||||
}
|
||||
|
||||
// Import Transaction Dialog
|
||||
function setRememberLastSelectedFileTypeInImportTransactionDialog(value: boolean): void {
|
||||
updateApplicationSettingsValue('rememberLastSelectedFileTypeInImportTransactionDialog', value);
|
||||
appSettings.value.rememberLastSelectedFileTypeInImportTransactionDialog = value;
|
||||
updateUserApplicationCloudSettingValue('rememberLastSelectedFileTypeInImportTransactionDialog', value);
|
||||
|
||||
if (!value) {
|
||||
setLastSelectedFileTypeInImportTransactionDialog('');
|
||||
}
|
||||
}
|
||||
|
||||
function setLastSelectedFileTypeInImportTransactionDialog(value: string): void {
|
||||
if (!appSettings.value.rememberLastSelectedFileTypeInImportTransactionDialog) {
|
||||
value = '';
|
||||
}
|
||||
|
||||
updateApplicationSettingsValue('lastSelectedFileTypeInImportTransactionDialog', value);
|
||||
appSettings.value.lastSelectedFileTypeInImportTransactionDialog = value;
|
||||
updateUserApplicationCloudSettingValue('lastSelectedFileTypeInImportTransactionDialog', value);
|
||||
}
|
||||
|
||||
// Insights Explorer Page
|
||||
function setInsightsExplorerDefaultDateRangeType(value: number): void {
|
||||
updateApplicationSettingsValue('insightsExplorerDefaultDateRangeType', value);
|
||||
@@ -498,6 +519,9 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
setAutoSaveTransactionDraft,
|
||||
setAutoGetCurrentGeoLocation,
|
||||
setAlwaysShowTransactionPicturesInMobileTransactionEditPage,
|
||||
// -- Import Transaction Dialog
|
||||
setRememberLastSelectedFileTypeInImportTransactionDialog,
|
||||
setLastSelectedFileTypeInImportTransactionDialog,
|
||||
// -- Insights Explorer Page
|
||||
setInsightsExplorerDefaultDateRangeType,
|
||||
setShowTagInInsightsExplorerPage,
|
||||
|
||||
Reference in New Issue
Block a user