disable the sort button when fewer than two items are present

This commit is contained in:
MaysWind
2026-03-01 23:01:23 +08:00
parent 4845fdedfd
commit d2ce801277
7 changed files with 30 additions and 12 deletions
+2 -1
View File
@@ -186,7 +186,7 @@
<f7-actions close-by-outside-click close-on-escape :opened="showMoreActionSheet" @actions:closed="showMoreActionSheet = false">
<f7-actions-group>
<f7-actions-button @click="setSortable()">{{ tt('Sort') }}</f7-actions-button>
<f7-actions-button :class="{ 'disabled': maxCategoryAccountCount < 2 }" @click="setSortable()">{{ tt('Sort') }}</f7-actions-button>
<f7-actions-button v-if="!showHidden" @click="showHidden = true">{{ tt('Show Hidden Accounts') }}</f7-actions-button>
<f7-actions-button v-if="showHidden" @click="showHidden = false">{{ tt('Hide Hidden Accounts') }}</f7-actions-button>
</f7-actions-group>
@@ -252,6 +252,7 @@ const {
customAccountCategoryOrder,
allCategorizedAccountsMap,
allAccountCount,
maxCategoryAccountCount,
netAssets,
totalAssets,
totalLiabilities,