code refactor

This commit is contained in:
MaysWind
2022-07-25 00:22:04 +08:00
parent 785ec9bdb1
commit 0dfb3d00e9
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -17,7 +17,7 @@
smart-select :smart-select-params="{ openIn: 'popup', pageTitle: $t('Base Currency'), searchbar: true, searchbarPlaceholder: $t('Currency Name'), searchbarDisableText: $t('Cancel'), closeOnSelect: true, popupCloseLinkText: $t('Done'), scrollToSelectedItem: true }"
>
<f7-block slot="title" class="no-padding no-margin">
<span>{{ `currency.${baseCurrency}` | localized }}&nbsp;</span>
<span>{{ $t(`currency.${baseCurrency}`) }}&nbsp;</span>
<small class="smaller">{{ baseCurrency }}</small>
</f7-block>
<select v-model="baseCurrency">
@@ -56,7 +56,7 @@
:after="getConvertedAmount(exchangeRate) | exchangeRate"
swipeout>
<f7-block slot="title" class="no-padding no-margin">
<span>{{ exchangeRate.currencyDisplayName }}&nbsp;</span>
<span style="margin-right: 5px">{{ exchangeRate.currencyDisplayName }}</span>
<small class="smaller">{{ exchangeRate.currencyCode }}</small>
</f7-block>
<f7-swipeout-actions right>
+2 -2
View File
@@ -90,7 +90,7 @@
smart-select :smart-select-params="{ openIn: 'popup', pageTitle: $t('Default Currency'), searchbar: true, searchbarPlaceholder: $t('Currency Name'), searchbarDisableText: $t('Cancel'), closeOnSelect: true, popupCloseLinkText: $t('Done'), scrollToSelectedItem: true }"
>
<f7-block slot="title" class="no-padding no-margin">
<span>{{ `currency.${user.defaultCurrency}` | localized }}&nbsp;</span>
<span>{{ $t(`currency.${user.defaultCurrency}`) }}&nbsp;</span>
<small class="smaller">{{ user.defaultCurrency }}</small>
</f7-block>
<select autocomplete="transaction-currency" v-model="user.defaultCurrency">
@@ -110,7 +110,7 @@
<select v-model="user.firstDayOfWeek">
<option v-for="weekDay in allWeekDays"
:key="weekDay.type"
:value="weekDay.type">{{ `datetime.${weekDay.name}.long` | localized }}</option>
:value="weekDay.type">{{ $t(`datetime.${weekDay.name}.long`) }}</option>
</select>
</f7-list-item>
</f7-list>
+2 -2
View File
@@ -128,7 +128,7 @@
smart-select :smart-select-params="{ openIn: 'popup', searchbar: true, searchbarPlaceholder: $t('Currency Name'), searchbarDisableText: $t('Cancel'), closeOnSelect: true, popupCloseLinkText: $t('Done'), scrollToSelectedItem: true }"
>
<f7-block slot="title" class="no-padding no-margin">
<span>{{ `currency.${account.currency}` | localized }}&nbsp;</span>
<span>{{ $t(`currency.${account.currency}`) }}&nbsp;</span>
<small class="smaller">{{ account.currency }}</small>
</f7-block>
<select autocomplete="transaction-currency" v-model="account.currency">
@@ -282,7 +282,7 @@
smart-select :smart-select-params="{ openIn: 'popup', searchbar: true, searchbarPlaceholder: $t('Currency Name'), searchbarDisableText: $t('Cancel'), closeOnSelect: true, popupCloseLinkText: $t('Done'), scrollToSelectedItem: true }"
>
<f7-block slot="title" class="no-padding no-margin">
<span>{{ `currency.${subAccount.currency}` | localized }}&nbsp;</span>
<span>{{ $t(`currency.${subAccount.currency}`) }}&nbsp;</span>
<small class="smaller">{{ subAccount.currency }}</small>
</f7-block>
<select autocomplete="transaction-currency" v-model="subAccount.currency">
+2 -2
View File
@@ -292,7 +292,7 @@
{{ transaction.day }}
</span>
<span class="transaction-day-of-week full-line flex-direction-column">
{{ `datetime.${transaction.dayOfWeek}.short` | localized }}
{{ $t(`datetime.${transaction.dayOfWeek}.short`) }}
</span>
</div>
<div class="transaction-icon display-flex align-items-center">
@@ -366,7 +366,7 @@
<f7-list-item v-for="dateRange in allDateRanges"
:key="dateRange.type"
:class="{ 'list-item-selected': query.dateType === dateRange.type }"
:title="dateRange.name | localized"
:title="$t(dateRange.name)"
@click="changeDateFilter(dateRange.type)">
<f7-icon slot="after" class="list-item-checked-icon" f7="checkmark_alt" v-if="query.dateType === dateRange.type"></f7-icon>
<div slot="footer"
+3 -3
View File
@@ -86,7 +86,7 @@
smart-select :smart-select-params="{ openIn: 'popup', pageTitle: $t('Default Currency'), searchbar: true, searchbarPlaceholder: $t('Currency Name'), searchbarDisableText: $t('Cancel'), closeOnSelect: true, popupCloseLinkText: $t('Done'), scrollToSelectedItem: true }"
>
<f7-block slot="title" class="no-padding no-margin">
<span>{{ `currency.${newProfile.defaultCurrency}` | localized }}&nbsp;</span>
<span>{{ $t(`currency.${newProfile.defaultCurrency}`) }}&nbsp;</span>
<small class="smaller">{{ newProfile.defaultCurrency }}</small>
</f7-block>
<select autocomplete="transaction-currency" v-model="newProfile.defaultCurrency">
@@ -127,7 +127,7 @@
<select v-model="newProfile.firstDayOfWeek">
<option v-for="weekDay in allWeekDays"
:key="weekDay.type"
:value="weekDay.type">{{ `datetime.${weekDay.name}.long` | localized }}</option>
:value="weekDay.type">{{ $t(`datetime.${weekDay.name}.long`) }}</option>
</select>
</f7-list-item>
@@ -140,7 +140,7 @@
<select v-model="newProfile.transactionEditScope">
<option v-for="option in allTransactionEditScopeTypes"
:key="option.value"
:value="option.value">{{ option.name | localized }}</option>
:value="option.value">{{ $t(option.name) }}</option>
</select>
</f7-list-item>