mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
show add transaction button in desktop navigation bar (#59)
This commit is contained in:
@@ -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
|
||||
}
|
||||
});
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user