mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 07:27:33 +08:00
don't show exchange rates data provider when use user custom exchange rates data
This commit is contained in:
@@ -27,12 +27,16 @@ export function useAboutPageBase() {
|
||||
|
||||
return formatUnixTimeToLongDateTime(parseInt(time));
|
||||
});
|
||||
|
||||
const exchangeRatesData = computed<LatestExchangeRateResponse | undefined>(() => exchangeRatesStore.latestExchangeRates.data);
|
||||
const isUserCustomExchangeRates = computed<boolean>(() => exchangeRatesStore.isUserCustomExchangeRates);
|
||||
|
||||
const mapProviderName = computed<string>(() => {
|
||||
const provider = getMapProvider();
|
||||
return provider ? tt(`mapprovider.${provider}`) : '';
|
||||
});
|
||||
const mapProviderWebsite = computed<string>(() => getMapWebsite());
|
||||
|
||||
const licenseLines = computed<string[]>(() => getLicense().replaceAll(/\r/g, '').split('\n'));
|
||||
const thirdPartyLicenses = computed<LicenseInfo[]>(() => getThirdPartyLicenses());
|
||||
|
||||
@@ -42,6 +46,7 @@ export function useAboutPageBase() {
|
||||
// computed states
|
||||
buildTime,
|
||||
exchangeRatesData,
|
||||
isUserCustomExchangeRates,
|
||||
mapProviderName,
|
||||
mapProviderWebsite,
|
||||
licenseLines,
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" v-if="exchangeRatesData">
|
||||
<v-col cols="12" v-if="exchangeRatesData && !isUserCustomExchangeRates">
|
||||
<v-card :title="tt('Exchange Rates Data')">
|
||||
<v-card-text>
|
||||
<v-row no-gutters>
|
||||
@@ -124,5 +124,14 @@ import { useI18n } from '@/locales/helpers.ts';
|
||||
import { useAboutPageBase } from '@/views/base/AboutPageBase.ts';
|
||||
|
||||
const { tt } = useI18n();
|
||||
const { version, buildTime, exchangeRatesData, mapProviderName, mapProviderWebsite, licenseLines, thirdPartyLicenses } = useAboutPageBase();
|
||||
const {
|
||||
version,
|
||||
buildTime,
|
||||
exchangeRatesData,
|
||||
isUserCustomExchangeRates,
|
||||
mapProviderName,
|
||||
mapProviderWebsite,
|
||||
licenseLines,
|
||||
thirdPartyLicenses
|
||||
} = useAboutPageBase();
|
||||
</script>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<f7-list-item :title="tt('License')" link="#" popup-open=".license-popup"></f7-list-item>
|
||||
</f7-list>
|
||||
|
||||
<f7-block-title class="margin-top" v-if="exchangeRatesData">{{ tt('Exchange Rates Data') }}</f7-block-title>
|
||||
<f7-list strong inset dividers v-if="exchangeRatesData">
|
||||
<f7-block-title class="margin-top" v-if="exchangeRatesData && !isUserCustomExchangeRates">{{ tt('Exchange Rates Data') }}</f7-block-title>
|
||||
<f7-list strong inset dividers v-if="exchangeRatesData && !isUserCustomExchangeRates">
|
||||
<f7-list-item external :title="tt('Provider')" :after="exchangeRatesData.dataSource"
|
||||
:link="exchangeRatesData.referenceUrl" target="_blank" v-if="exchangeRatesData.referenceUrl"></f7-list-item>
|
||||
<f7-list-item :title="tt('Provider')" :after="exchangeRatesData.dataSource" v-if="!exchangeRatesData.referenceUrl"></f7-list-item>
|
||||
@@ -62,7 +62,16 @@ import { useI18n } from '@/locales/helpers.ts';
|
||||
import { useAboutPageBase } from '@/views/base/AboutPageBase.ts';
|
||||
|
||||
const { tt } = useI18n();
|
||||
const { version, buildTime, exchangeRatesData, mapProviderName, mapProviderWebsite, licenseLines, thirdPartyLicenses } = useAboutPageBase();
|
||||
const {
|
||||
version,
|
||||
buildTime,
|
||||
exchangeRatesData,
|
||||
isUserCustomExchangeRates,
|
||||
mapProviderName,
|
||||
mapProviderWebsite,
|
||||
licenseLines,
|
||||
thirdPartyLicenses
|
||||
} = useAboutPageBase();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user