From 0ad92a999c287c2c5d395f2c64fb2116e5a8155d Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 17 Jul 2023 00:35:27 +0800 Subject: [PATCH] modify style --- src/views/desktop/ExchangeRatesPage.vue | 6 +- src/views/desktop/TransactionTagsPage.vue | 122 +++++++++------------- 2 files changed, 55 insertions(+), 73 deletions(-) diff --git a/src/views/desktop/ExchangeRatesPage.vue b/src/views/desktop/ExchangeRatesPage.vue index f5998f60..5a668dd1 100644 --- a/src/views/desktop/ExchangeRatesPage.vue +++ b/src/views/desktop/ExchangeRatesPage.vue @@ -67,8 +67,8 @@ - {{ $t('Currency') }} - {{ $t('Amount') }} + {{ $t('Currency') }} + {{ $t('Amount') }} @@ -89,7 +89,7 @@ {{ exchangeRate.currencyDisplayName }} {{ exchangeRate.currencyCode }} - {{ getDisplayConvertedAmount(exchangeRate) }} + {{ getDisplayConvertedAmount(exchangeRate) }} diff --git a/src/views/desktop/TransactionTagsPage.vue b/src/views/desktop/TransactionTagsPage.vue index d3570b3b..25a51312 100644 --- a/src/views/desktop/TransactionTagsPage.vue +++ b/src/views/desktop/TransactionTagsPage.vue @@ -40,7 +40,7 @@ {{ $t('Tag Title') }} - {{ $t('Operation') }} + {{ $t('Operation') }} @@ -88,57 +88,48 @@ - - + - - {{ $t('Edit') }} + {{ $t('Edit') }} - - - {{ $t('More') }} - - - - - - - - + v-if="editingTag.id !== tag.id" + @click="hide(tag, !tag.hidden)"> + {{ tag.hidden ? $t('Show') : $t('Hide') }} - + {{ $t('Delete') }} + + - - {{ $t('Save') }} + v-if="editingTag.id === tag.id" @click="save(editingTag)"> + {{ $t('Save') }} - - - {{ $t('Cancel') }} + v-if="editingTag.id === tag.id" @click="cancelSave(editingTag)"> + {{ $t('Cancel') }} @@ -146,40 +137,29 @@ - + - - + - - {{ $t('Save') }} + {{ $t('Save') }} - - - {{ $t('Cancel') }} + {{ $t('Cancel') }} @@ -221,6 +201,8 @@ export default { loading: true, updating: false, tagUpdating: {}, + tagHiding: {}, + tagRemoving: {}, showHidden: false, icons: { refresh: mdiRefresh, @@ -363,17 +345,17 @@ export default { const self = this; self.updating = true; - self.tagUpdating[tag.id] = true; + self.tagHiding[tag.id] = true; self.transactionTagsStore.hideTag({ tag: tag, hidden: hidden }).then(() => { self.updating = false; - self.tagUpdating[tag.id] = false; + self.tagHiding[tag.id] = false; }).catch(error => { self.updating = false; - self.tagUpdating[tag.id] = false; + self.tagHiding[tag.id] = false; if (!error.processed) { self.$refs.snackbar.showError(error); @@ -385,16 +367,16 @@ export default { self.$refs.confirmDialog.open('Are you sure you want to delete this tag?').then(() => { self.updating = true; - self.tagUpdating[tag.id] = true; + self.tagRemoving[tag.id] = true; self.transactionTagsStore.deleteTag({ tag: tag }).then(() => { self.updating = false; - self.tagUpdating[tag.id] = false; + self.tagRemoving[tag.id] = false; }).catch(error => { self.updating = false; - self.tagUpdating[tag.id] = false; + self.tagRemoving[tag.id] = false; if (!error.processed) { self.$refs.snackbar.showError(error);