sort currencies in exchange rates page

This commit is contained in:
MaysWind
2024-11-15 00:22:05 +08:00
parent 92cc683b8e
commit 934f90cdff
10 changed files with 149 additions and 8 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ export default {
return exchangeRatesLastUpdateTime ? this.$locale.formatUnixTimeToLongDate(this.userStore, exchangeRatesLastUpdateTime) : '';
},
availableExchangeRates() {
return this.$locale.getAllDisplayExchangeRates(this.exchangeRatesData);
return this.$locale.getAllDisplayExchangeRates(this.settingsStore, this.exchangeRatesData);
}
},
created() {
@@ -177,6 +177,28 @@
</v-form>
</v-card>
</v-col>
<v-col cols="12">
<v-card :title="$t('Exchange Rates Data Page')">
<v-form>
<v-card-text>
<v-row>
<v-col cols="12" md="6">
<v-select
item-title="displayName"
item-value="type"
persistent-placeholder
:label="$t('Sort by')"
:placeholder="$t('Sort by')"
:items="allCurrencySortingTypes"
v-model="currencySortByInExchangeRatesPage"
/>
</v-col>
</v-row>
</v-card-text>
</v-form>
</v-card>
</v-col>
</v-row>
</template>
@@ -206,6 +228,9 @@ export default {
allTimezoneTypesUsedForStatistics() {
return this.$locale.getAllTimezoneTypesUsedForStatistics(this.timeZone);
},
allCurrencySortingTypes() {
return this.$locale.getAllCurrencySortingTypes();
},
theme: {
get: function () {
return this.settingsStore.appSettings.theme;
@@ -310,6 +335,14 @@ export default {
set: function (value) {
this.settingsStore.setAutoGetCurrentGeoLocation(value);
}
},
currencySortByInExchangeRatesPage: {
get: function () {
return this.settingsStore.appSettings.currencySortByInExchangeRatesPage;
},
set: function (value) {
this.settingsStore.setCurrencySortByInExchangeRatesPage(value);
}
}
},
setup() {