diff --git a/src/lib/common.ts b/src/lib/common.ts index c7ac5bc9..ac9b5eb0 100644 --- a/src/lib/common.ts +++ b/src/lib/common.ts @@ -1,4 +1,4 @@ -import type { TypeAndName, TypeAndDisplayName } from '@/core/base.ts'; +import type { NameValue, TypeAndName, TypeAndDisplayName} from '@/core/base.ts'; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type export function isFunction(val: unknown): val is Function { @@ -303,6 +303,16 @@ export function getItemByKeyValue(src: Record[] | Record .item-after { + max-width: 70%; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + display: block; +} + .login-page-fixed-bottom { background-color: inherit !important; } diff --git a/src/views/base/settings/AppSettingsPageBase.ts b/src/views/base/settings/AppSettingsPageBase.ts index 07393c78..7a707110 100644 --- a/src/views/base/settings/AppSettingsPageBase.ts +++ b/src/views/base/settings/AppSettingsPageBase.ts @@ -7,21 +7,37 @@ import { useTransactionsStore } from '@/stores/transaction.ts'; import { useOverviewStore } from '@/stores/overview.ts'; import { useStatisticsStore } from '@/stores/statistics.ts'; -import type { TypeAndDisplayName } from '@/core/base.ts'; +import type { NameValue, TypeAndDisplayName } from '@/core/base.ts'; import type { LocalizedTimezoneInfo } from '@/core/timezone.ts'; export function useAppSettingPageBase() { - const { getAllTimezones, getAllTimezoneTypesUsedForStatistics, getAllCurrencySortingTypes, setTimeZone } = useI18n(); + const { tt, getAllTimezones, getAllTimezoneTypesUsedForStatistics, getAllCurrencySortingTypes, setTimeZone } = useI18n(); const settingsStore = useSettingsStore(); const transactionsStore = useTransactionsStore(); const overviewStore = useOverviewStore(); const statisticsStore = useStatisticsStore(); + const allThemes = computed(() => { + return [ + { name: tt('System Default'), value: 'auto' }, + { name: tt('Light'), value: 'light' }, + { name: tt('Dark'), value: 'dark' } + ]; + }); + const allTimezones = computed(() => getAllTimezones(true)); const allTimezoneTypesUsedForStatistics = computed(() => getAllTimezoneTypesUsedForStatistics()); const allCurrencySortingTypes = computed(() => getAllCurrencySortingTypes()); + const allAutoSaveTransactionDraftTypes = computed(() => { + return [ + { name: tt('Disabled'), value: 'disabled' }, + { name: tt('Enabled'), value: 'enabled' }, + { name: tt('Show Confirmation Every Time'), value: 'confirmation' } + ]; + }); + const timeZone = computed({ get: () => settingsStore.appSettings.timeZone, set: (value) => { @@ -94,9 +110,11 @@ export function useAppSettingPageBase() { return { // computed states + allThemes, allTimezones, allTimezoneTypesUsedForStatistics, allCurrencySortingTypes, + allAutoSaveTransactionDraftTypes, timeZone, isAutoUpdateExchangeRatesData, showAccountBalance, diff --git a/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue b/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue index 93a7c400..a304f22f 100644 --- a/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue +++ b/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue @@ -7,16 +7,12 @@ @@ -147,16 +143,12 @@ @@ -219,9 +211,11 @@ const theme = useTheme(); const { tt, getAllEnableDisableOptions } = useI18n(); const { + allThemes, allTimezones, allTimezoneTypesUsedForStatistics, allCurrencySortingTypes, + allAutoSaveTransactionDraftTypes, timeZone, isAutoUpdateExchangeRatesData, showAccountBalance, diff --git a/src/views/mobile/SettingsPage.vue b/src/views/mobile/SettingsPage.vue index a8c16422..55c30b0b 100644 --- a/src/views/mobile/SettingsPage.vue +++ b/src/views/mobile/SettingsPage.vue @@ -1,5 +1,5 @@ diff --git a/src/views/mobile/statistics/SettingsPage.vue b/src/views/mobile/statistics/SettingsPage.vue index db842cb3..aed363af 100644 --- a/src/views/mobile/statistics/SettingsPage.vue +++ b/src/views/mobile/statistics/SettingsPage.vue @@ -3,25 +3,43 @@ {{ tt('Common Settings') }} - + - + :after="findDisplayNameByType(allChartDataTypes, defaultChartDataType)" + @click="showDefaultChartDataTypePopup = true" + > + + - + :after="findDisplayNameByType(allTimezoneTypesUsedForStatistics, defaultTimezoneType)" + @click="showDefaultTimezoneTypePopup = true" + > + + @@ -29,55 +47,93 @@ - + :after="findDisplayNameByType(allSortingTypes, defaultSortingType)" + @click="showDefaultSortingTypePopup = true" + > + + {{ tt('Categorical Analysis Settings') }} - + :after="findDisplayNameByType(allCategoricalChartTypes, defaultCategoricalChartType)" + @click="showDefaultCategoricalChartTypePopup = true" + > + + - + :after="findDisplayNameByType(allCategoricalChartDateRanges, defaultCategoricalChartDateRange)" + @click="showDefaultCategoricalChartDateRangePopup = true" + > + + {{ tt('Trend Analysis Settings') }} - + :after="findDisplayNameByType(allTrendChartDateRanges, defaultTrendChartDateRange)" + @click="showDefaultTrendChartDateRangePopup = true" + > + + diff --git a/src/views/mobile/transactions/EditPage.vue b/src/views/mobile/transactions/EditPage.vue index 0472f41b..e3ea7f28 100644 --- a/src/views/mobile/transactions/EditPage.vue +++ b/src/views/mobile/transactions/EditPage.vue @@ -301,16 +301,13 @@ - + + (false); const removingPictureId = ref(null); const transactionDateTimeSheetMode = ref('time'); const showTimeInDefaultTimezone = ref(false); +const showTimezonePopup = ref(false); const showGeoLocationActionSheet = ref(false); const showMoreActionSheet = ref(false); const showSourceAmountSheet = ref(false); diff --git a/src/views/mobile/users/UserProfilePage.vue b/src/views/mobile/users/UserProfilePage.vue index bdd42a35..f2b9c3ca 100644 --- a/src/views/mobile/users/UserProfilePage.vue +++ b/src/views/mobile/users/UserProfilePage.vue @@ -111,16 +111,23 @@ - + + @@ -173,153 +180,230 @@ - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + @@ -418,8 +502,20 @@ const currentPassword = ref(''); const loadingError = ref(null); const showInputPasswordSheet = ref(false); const showAccountSheet = ref(false); +const showEditableTransactionRangePopup = ref(false); const showLanguagePopup = ref(false); const showDefaultCurrencyPopup = ref(false); +const showFirstDayOfWeekPopup = ref(false); +const showLongDateFormatPopup = ref(false); +const showShortDateFormatPopup = ref(false); +const showLongTimeFormatPopup = ref(false); +const showShortTimeFormatPopup = ref(false); +const showCurrencyDisplayTypePopup = ref(false); +const showDigitGroupingPopup = ref(false); +const showDigitGroupingSymbolPopup = ref(false); +const showDecimalSeparatorPopup = ref(false); +const showExpenseAmountColorPopup = ref(false); +const showIncomeAmountColorPopup = ref(false); const showMoreActionSheet = ref(false); const allLanguages = computed(() => getAllLanguageOptions(true));