support always showing transaction pictures in transaction edit page for mobile version

This commit is contained in:
MaysWind
2025-05-28 00:18:55 +08:00
parent 626d3895aa
commit b3a666f876
14 changed files with 38 additions and 3 deletions
+2
View File
@@ -29,6 +29,7 @@ export interface ApplicationSettings extends BaseApplicationSetting {
autoUpdateExchangeRatesData: boolean;
autoSaveTransactionDraft: string;
autoGetCurrentGeoLocation: boolean;
alwaysShowTransactionPicturesInMobileTransactionEditPage: boolean;
showAddTransactionButtonInDesktopNavbar: boolean;
showAmountInHomePage: boolean;
timezoneUsedForStatisticsInHomePage: number;
@@ -75,6 +76,7 @@ export const DEFAULT_APPLICATION_SETTINGS: ApplicationSettings = {
autoUpdateExchangeRatesData: true,
autoSaveTransactionDraft: 'disabled',
autoGetCurrentGeoLocation: false,
alwaysShowTransactionPicturesInMobileTransactionEditPage: false,
showAddTransactionButtonInDesktopNavbar: true,
showAmountInHomePage: true,
timezoneUsedForStatisticsInHomePage: TimezoneTypeForStatistics.Default.type,
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "Entwurf automatisch speichern",
"Show Confirmation Every Time": "Bestätigung jedes mal anzeigen",
"Automatically Add Geolocation": "Geolocation automatisch hinzufügen",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "Wechselkursdatenseite",
"Exchange Rate": "Wechselkurs",
"Enable Animation": "Animation aktivieren",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "Automatically Save Draft",
"Show Confirmation Every Time": "Show Confirmation Every Time",
"Automatically Add Geolocation": "Automatically Add Geolocation",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "Exchange Rates Data Page",
"Exchange Rate": "Exchange Rate",
"Enable Animation": "Enable Animation",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "Guardar borrador automáticamente",
"Show Confirmation Every Time": "Mostrar confirmación cada vez",
"Automatically Add Geolocation": "Agregar geolocalización automáticamente",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "Página de datos de tipos de cambio",
"Exchange Rate": "Tipo de cambio",
"Enable Animation": "Habilitar animación",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "Salva automaticamente bozza",
"Show Confirmation Every Time": "Mostra conferma ogni volta",
"Automatically Add Geolocation": "Aggiungi automaticamente geolocalizzazione",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "Pagina dati tassi di cambio",
"Exchange Rate": "Tasso di cambio",
"Enable Animation": "Abilita animazione",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "下書きの自動保存",
"Show Confirmation Every Time": "確認を毎回表示",
"Automatically Add Geolocation": "座標を自動的に追加",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "為替レートデータページ",
"Exchange Rate": "為替レート",
"Enable Animation": "アニメーションの有効",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "Автоматически сохранять черновик",
"Show Confirmation Every Time": "Показывать подтверждение каждый раз",
"Automatically Add Geolocation": "Автоматически добавлять геолокацию",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "Страница данных о курсах валют",
"Exchange Rate": "Курс обмена",
"Enable Animation": "Включить анимацию",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "Автоматично зберігати чернетку",
"Show Confirmation Every Time": "Показувати підтвердження щоразу",
"Automatically Add Geolocation": "Автоматично додавати геолокацію",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "Сторінка курсів валют",
"Exchange Rate": "Курс обміну",
"Enable Animation": "Увімкнути анімацію",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "Tự động lưu bản nháp",
"Show Confirmation Every Time": "Hiển thị xác nhận mỗi lần",
"Automatically Add Geolocation": "Tự động thêm vị trí địa lý",
"Always Show Transaction Pictures": "Always Show Transaction Pictures",
"Exchange Rates Data Page": "Trang dữ liệu tỷ giá hối đoái",
"Exchange Rate": "Tỷ giá hối đoái",
"Enable Animation": "Bật hoạt ảnh",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "自动保存草稿",
"Show Confirmation Every Time": "每次提示确认",
"Automatically Add Geolocation": "自动添加地理位置",
"Always Show Transaction Pictures": "总是显示交易图片",
"Exchange Rates Data Page": "汇率数据页面",
"Exchange Rate": "汇率",
"Enable Animation": "启用动画",
+1
View File
@@ -1852,6 +1852,7 @@
"Automatically Save Draft": "自動儲存草稿",
"Show Confirmation Every Time": "每次提示確認",
"Automatically Add Geolocation": "自動新增地理位置",
"Always Show Transaction Pictures": "總是顯示交易圖片",
"Exchange Rates Data Page": "匯率資料頁面",
"Exchange Rate": "匯率",
"Enable Animation": "啟用動畫",
+6
View File
@@ -54,6 +54,11 @@ export const useSettingsStore = defineStore('settings', () => {
appSettings.value.autoGetCurrentGeoLocation = value;
}
function setAlwaysShowTransactionPicturesInMobileTransactionEditPage(value: boolean): void {
updateApplicationSettingsValue('alwaysShowTransactionPicturesInMobileTransactionEditPage', value);
appSettings.value.alwaysShowTransactionPicturesInMobileTransactionEditPage = value;
}
function setShowAddTransactionButtonInDesktopNavbar(value: boolean): void {
updateApplicationSettingsValue('showAddTransactionButtonInDesktopNavbar', value);
appSettings.value.showAddTransactionButtonInDesktopNavbar = value;
@@ -171,6 +176,7 @@ export const useSettingsStore = defineStore('settings', () => {
setAutoUpdateExchangeRatesData,
setAutoSaveTransactionDraft,
setAutoGetCurrentGeoLocation,
setAlwaysShowTransactionPicturesInMobileTransactionEditPage,
setShowAddTransactionButtonInDesktopNavbar,
setShowAmountInHomePage,
setTimezoneUsedForStatisticsInHomePage,
+17 -2
View File
@@ -61,10 +61,16 @@
v-model="autoSaveTransactionDraft">
</list-item-selection-popup>
</f7-list-item>
<f7-list-item>
<span>{{ tt('Automatically Add Geolocation') }}</span>
<f7-toggle :checked="isAutoGetCurrentGeoLocation" @toggle:change="isAutoGetCurrentGeoLocation = $event"></f7-toggle>
</f7-list-item>
<f7-list-item>
<span>{{ tt('Always Show Transaction Pictures') }}</span>
<f7-toggle :checked="alwaysShowTransactionPicturesInMobileTransactionEditPage" @toggle:change="alwaysShowTransactionPicturesInMobileTransactionEditPage = $event"></f7-toggle>
</f7-list-item>
</f7-list>
<f7-block-title>{{ tt('Exchange Rates Data Page') }}</f7-block-title>
@@ -92,11 +98,15 @@
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { ref, computed } from 'vue';
import { useI18n } from '@/locales/helpers.ts';
import { useAppSettingPageBase } from '@/views/base/settings/AppSettingsPageBase.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { findNameByValue, findDisplayNameByType } from '@/lib/common.ts';
const { tt } = useI18n();
const {
allTimezoneTypesUsedForStatistics,
@@ -111,9 +121,14 @@ const {
currencySortByInExchangeRatesPage
} = useAppSettingPageBase();
import { findNameByValue, findDisplayNameByType } from '@/lib/common.ts';
const settingsStore = useSettingsStore();
const showTimezoneUsedForStatisticsInHomePagePopup = ref<boolean>(false);
const showAutoSaveTransactionDraftPopup = ref<boolean>(false);
const showCurrencySortByInExchangeRatesPagePopup = ref<boolean>(false);
const alwaysShowTransactionPicturesInMobileTransactionEditPage = computed<boolean>({
get: () => settingsStore.appSettings.alwaysShowTransactionPicturesInMobileTransactionEditPage,
set: (value) => settingsStore.setAlwaysShowTransactionPicturesInMobileTransactionEditPage(value)
});
</script>
+3 -1
View File
@@ -620,7 +620,9 @@ const showScheduledStartDateSheet = ref<boolean>(false);
const showScheduledEndDateSheet = ref<boolean>(false);
const showGeoLocationMapSheet = ref<boolean>(false);
const showTransactionTagSheet = ref<boolean>(false);
const showTransactionPictures = ref<boolean>(false);
const showTransactionPictures = ref<boolean>(pageTypeAndMode?.type === TransactionEditPageType.Transaction
&& (pageTypeAndMode?.mode === TransactionEditPageMode.Add || pageTypeAndMode?.mode === TransactionEditPageMode.Edit)
&& settingsStore.appSettings.alwaysShowTransactionPicturesInMobileTransactionEditPage);
const isDarkMode = computed<boolean>(() => environmentsStore.framework7DarkMode || false);