From 46a1eda0299825871c505e7f4d43ddef8f12a77c Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 24 Jun 2023 20:01:47 +0800 Subject: [PATCH] add page settings page --- src/locales/en.js | 13 ++-- src/locales/zh_Hans.js | 13 ++-- src/router/mobile.js | 6 ++ src/views/mobile/SettingsPage.vue | 43 +------------ .../mobile/settings/PageSettingsPage.vue | 64 +++++++++++++++++++ 5 files changed, 89 insertions(+), 50 deletions(-) create mode 100644 src/views/mobile/settings/PageSettingsPage.vue diff --git a/src/locales/en.js b/src/locales/en.js index cb05a6b3..9a1be196 100644 --- a/src/locales/en.js +++ b/src/locales/en.js @@ -975,17 +975,20 @@ export default { 'Timezone': 'Timezone', 'System Default': 'System Default', 'Language Default': 'Language Default', - 'Auto Update Exchange Rates Data': 'Auto Update Exchange Rates Data', - 'Auto Get Current Geographic Location': 'Auto Get Current Geographic Location', + 'Auto-update Exchange Rates Data': 'Auto-update Exchange Rates Data', 'Enable Thousands Separator': 'Enable Thousands Separator', 'Currency Display Mode': 'Currency Display Mode', 'Currency Code': 'Currency Code', 'Currency Name': 'Currency Name', 'Currency Symbol': 'Currency Symbol', - 'Show Amount In Home Page': 'Show Amount In Home Page', 'Show Account Balance': 'Show Account Balance', - 'Show Total Amount In Transaction List Page': 'Show Total Amount In Transaction List Page', - 'Enable Animate': 'Enable Animate', + 'Page Settings': 'Page Settings', + 'Overview Page': 'Overview Page', + 'Transaction List Page': 'Transaction List Page', + 'Show Monthly Total Amount': 'Show Monthly Total Amount', + 'Transaction Edit Page': 'Transaction Edit Page', + 'Automatically Add Geolocation': 'Automatically Add Geolocation', + 'Enable Animation': 'Enable Animation', 'Use preset transaction categories': 'Use preset transaction categories', 'Preset Categories': 'Preset Categories', 'You have been successfully registered': 'You have been successfully registered', diff --git a/src/locales/zh_Hans.js b/src/locales/zh_Hans.js index c7ae4372..171562f2 100644 --- a/src/locales/zh_Hans.js +++ b/src/locales/zh_Hans.js @@ -975,17 +975,20 @@ export default { 'Timezone': '时区', 'System Default': '系统默认', 'Language Default': '语言默认', - 'Auto Update Exchange Rates Data': '自动更新汇率数据', - 'Auto Get Current Geographic Location': '自动获取当前地理位置', + 'Auto-update Exchange Rates Data': '自动更新汇率数据', 'Enable Thousands Separator': '启用千位分隔符', 'Currency Display Mode': '货币显示模式', 'Currency Code': '货币代码', 'Currency Name': '货币名称', 'Currency Symbol': '货币符号', - 'Show Amount In Home Page': '首页显示金额', 'Show Account Balance': '显示账户余额', - 'Show Total Amount In Transaction List Page': '交易列表页显示总金额', - 'Enable Animate': '启用动画', + 'Page Settings': '页面设置', + 'Overview Page': '概览页面', + 'Transaction List Page': '交易列表页面', + 'Show Monthly Total Amount': '显示月度总金额', + 'Transaction Edit Page': '交易编辑页面', + 'Automatically Add Geolocation': '自动添加地理位置', + 'Enable Animation': '启用动画', 'Use preset transaction categories': '使用预设交易分类', 'Preset Categories': '预设分类', 'You have been successfully registered': '注册成功', diff --git a/src/router/mobile.js b/src/router/mobile.js index fc836cdb..8b1e3999 100644 --- a/src/router/mobile.js +++ b/src/router/mobile.js @@ -17,6 +17,7 @@ import StatisticsAccountFilterSettingsPage from '@/views/mobile/statistics/Accou import StatisticsCategoryFilterSettingsPage from '@/views/mobile/statistics/CategoryFilterSettingsPage.vue'; import TextSizeSettingsPage from '@/views/mobile/settings/TextSizeSettingsPage.vue'; +import PageSettingsPage from '@/views/mobile/settings/PageSettingsPage.vue'; import SettingsPage from '@/views/mobile/SettingsPage.vue'; import ApplicationLockPage from '@/views/mobile/ApplicationLockPage.vue'; @@ -202,6 +203,11 @@ const routes = [ async: asyncResolve(TextSizeSettingsPage), beforeEnter: [checkLogin] }, + { + path: '/settings/page', + async: asyncResolve(PageSettingsPage), + beforeEnter: [checkLogin] + }, { path: '/settings', async: asyncResolve(SettingsPage), diff --git a/src/views/mobile/SettingsPage.vue b/src/views/mobile/SettingsPage.vue index 464ce4ed..702e552e 100644 --- a/src/views/mobile/SettingsPage.vue +++ b/src/views/mobile/SettingsPage.vue @@ -44,15 +44,10 @@ - {{ $t('Auto Update Exchange Rates Data') }} + {{ $t('Auto-update Exchange Rates Data') }} - - {{ $t('Auto Get Current Geographic Location') }} - - - {{ $t('Enable Thousands Separator') }} @@ -70,25 +65,17 @@ - - {{ $t('Show Amount In Home Page') }} - - - {{ $t('Show Account Balance') }} - - {{ $t('Show Total Amount In Transaction List Page') }} - - + - {{ $t('Enable Animate') }} + {{ $t('Enable Animation') }} @@ -172,14 +159,6 @@ export default { isEnableApplicationLock() { return this.settingsStore.appSettings.applicationLock; }, - isAutoGetCurrentGeoLocation: { - get: function () { - return this.settingsStore.appSettings.autoGetCurrentGeoLocation; - }, - set: function (value) { - this.settingsStore.setAutoGetCurrentGeoLocation(value); - } - }, isEnableThousandsSeparator: { get: function () { return this.settingsStore.appSettings.thousandsSeparator; @@ -196,14 +175,6 @@ export default { this.settingsStore.setCurrencyDisplayMode(value); } }, - showAmountInHomePage: { - get: function () { - return this.settingsStore.appSettings.showAmountInHomePage; - }, - set: function (value) { - this.settingsStore.setShowAmountInHomePage(value); - } - }, showAccountBalance: { get: function () { return this.settingsStore.appSettings.showAccountBalance; @@ -212,14 +183,6 @@ export default { this.settingsStore.setShowAccountBalance(value); } }, - showTotalAmountInTransactionListPage: { - get: function () { - return this.settingsStore.appSettings.showTotalAmountInTransactionListPage; - }, - set: function (value) { - this.settingsStore.setShowTotalAmountInTransactionListPage(value); - } - }, isEnableAnimate: { get: function () { return this.settingsStore.appSettings.animate; diff --git a/src/views/mobile/settings/PageSettingsPage.vue b/src/views/mobile/settings/PageSettingsPage.vue new file mode 100644 index 00000000..409ca368 --- /dev/null +++ b/src/views/mobile/settings/PageSettingsPage.vue @@ -0,0 +1,64 @@ + + +