show add transaction button in desktop navigation bar (#59)

This commit is contained in:
MaysWind
2025-03-09 20:15:04 +08:00
parent 6632dd64b3
commit a29ff0d553
13 changed files with 110 additions and 9 deletions
+22
View File
@@ -0,0 +1,22 @@
import { ref } from 'vue';
import { defineStore } from 'pinia';
export const useDesktopPageStore = defineStore('desktopPages', () => {
const showAddTransactionDialogInTransactionList = ref<boolean>(false);
function setShowAddTransactionDialogInTransactionList(): void {
showAddTransactionDialogInTransactionList.value = true;
}
function resetShowAddTransactionDialogInTransactionList(): void {
showAddTransactionDialogInTransactionList.value = false;
}
return {
// states
showAddTransactionDialogInTransactionList,
// functions
setShowAddTransactionDialogInTransactionList,
resetShowAddTransactionDialogInTransactionList
}
});
+6
View File
@@ -54,6 +54,11 @@ export const useSettingsStore = defineStore('settings', () => {
appSettings.value.autoGetCurrentGeoLocation = value;
}
function setShowAddTransactionButtonInDesktopNavbar(value: boolean): void {
updateApplicationSettingsValue('showAddTransactionButtonInDesktopNavbar', value);
appSettings.value.showAddTransactionButtonInDesktopNavbar = value;
}
function setShowAmountInHomePage(value: boolean): void {
updateApplicationSettingsValue('showAmountInHomePage', value);
appSettings.value.showAmountInHomePage = value;
@@ -166,6 +171,7 @@ export const useSettingsStore = defineStore('settings', () => {
setAutoUpdateExchangeRatesData,
setAutoSaveTransactionDraft,
setAutoGetCurrentGeoLocation,
setShowAddTransactionButtonInDesktopNavbar,
setShowAmountInHomePage,
setTimezoneUsedForStatisticsInHomePage,
setItemsCountInTransactionListPage,