mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
code refactor
This commit is contained in:
@@ -152,19 +152,18 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :key="languageTag"
|
<tr :key="lang.languageTag" v-for="lang in allLanguages">
|
||||||
v-for="(languageContributors, languageTag) in contributors.translators"
|
<td>{{ lang.languageTag }}</td>
|
||||||
v-show="!!getLanguageInfo(languageTag)?.displayName">
|
<td>{{ lang.nativeDisplayName }}</td>
|
||||||
<td>{{ languageTag }}</td>
|
|
||||||
<td>{{ getLanguageInfo(languageTag)?.displayName }}</td>
|
|
||||||
<td>
|
<td>
|
||||||
<template :key="contributor" v-for="(contributor, index) in languageContributors">
|
<template :key="contributor"
|
||||||
|
v-for="(contributor, index) in contributors.translators[lang.languageTag] ?? []">
|
||||||
|
<span v-if="index > 0">, </span>
|
||||||
<a target="_blank" :href="`https://github.com/${contributor}`">
|
<a target="_blank" :href="`https://github.com/${contributor}`">
|
||||||
@{{ contributor }}
|
@{{ contributor }}
|
||||||
</a>
|
</a>
|
||||||
<span v-if="index < languageContributors.length - 1">, </span>
|
|
||||||
</template>
|
</template>
|
||||||
<span v-if="!languageContributors || languageContributors.length < 1">/</span>
|
<span v-if="!contributors.translators[lang.languageTag] || !contributors.translators[lang.languageTag]?.length">/</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -189,6 +188,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
import type { LanguageOption } from '@/locales/index.ts';
|
||||||
import { useI18n } from '@/locales/helpers.ts';
|
import { useI18n } from '@/locales/helpers.ts';
|
||||||
import { useAboutPageBase } from '@/views/base/AboutPageBase.ts';
|
import { useAboutPageBase } from '@/views/base/AboutPageBase.ts';
|
||||||
|
|
||||||
@@ -196,7 +198,7 @@ import {
|
|||||||
mdiWebRefresh
|
mdiWebRefresh
|
||||||
} from '@mdi/js';
|
} from '@mdi/js';
|
||||||
|
|
||||||
const { tt, getLanguageInfo } = useI18n();
|
const { tt, getAllLanguageOptions } = useI18n();
|
||||||
const {
|
const {
|
||||||
clientVersion,
|
clientVersion,
|
||||||
clientVersionMatchServerVersion,
|
clientVersionMatchServerVersion,
|
||||||
@@ -212,6 +214,9 @@ const {
|
|||||||
init
|
init
|
||||||
} = useAboutPageBase();
|
} = useAboutPageBase();
|
||||||
|
|
||||||
|
|
||||||
|
const allLanguages = computed<LanguageOption[]>(() => getAllLanguageOptions(false));
|
||||||
|
|
||||||
init();
|
init();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -88,19 +88,18 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr :key="languageTag"
|
<tr :key="lang.languageTag" v-for="lang in allLanguages">
|
||||||
v-for="(languageContributors, languageTag) in contributors.translators"
|
<td>{{ lang.languageTag }}</td>
|
||||||
v-show="!!getLanguageInfo(languageTag)?.displayName">
|
<td>{{ lang.nativeDisplayName }}</td>
|
||||||
<td>{{ languageTag }}</td>
|
|
||||||
<td>{{ getLanguageInfo(languageTag)?.displayName }}</td>
|
|
||||||
<td>
|
<td>
|
||||||
<template :key="contributor" v-for="(contributor, index) in languageContributors">
|
<template :key="contributor"
|
||||||
|
v-for="(contributor, index) in contributors.translators[lang.languageTag] ?? []">
|
||||||
|
<span v-if="index > 0">, </span>
|
||||||
<f7-link target="_blank" @click="openExternalUrl(`https://github.com/${contributor}`)">
|
<f7-link target="_blank" @click="openExternalUrl(`https://github.com/${contributor}`)">
|
||||||
@{{ contributor }}
|
@{{ contributor }}
|
||||||
</f7-link>
|
</f7-link>
|
||||||
<span v-if="index < languageContributors.length - 1">, </span>
|
|
||||||
</template>
|
</template>
|
||||||
<span v-if="!languageContributors || languageContributors.length < 1">/</span>
|
<span v-if="!contributors.translators[lang.languageTag] || !contributors.translators[lang.languageTag]?.length">/</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -133,11 +132,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
|
||||||
|
import type { LanguageOption } from '@/locales/index.ts';
|
||||||
import { useI18n } from '@/locales/helpers.ts';
|
import { useI18n } from '@/locales/helpers.ts';
|
||||||
import { useI18nUIComponents } from '@/lib/ui/mobile.ts';
|
import { useI18nUIComponents } from '@/lib/ui/mobile.ts';
|
||||||
import { useAboutPageBase } from '@/views/base/AboutPageBase.ts';
|
import { useAboutPageBase } from '@/views/base/AboutPageBase.ts';
|
||||||
|
|
||||||
const { tt, getLanguageInfo } = useI18n();
|
const { tt, getAllLanguageOptions } = useI18n();
|
||||||
const { showAlert, openExternalUrl } = useI18nUIComponents();
|
const { showAlert, openExternalUrl } = useI18nUIComponents();
|
||||||
const {
|
const {
|
||||||
clientVersion,
|
clientVersion,
|
||||||
@@ -157,6 +157,8 @@ const {
|
|||||||
|
|
||||||
const showRefreshBrowserCacheSheet = ref<boolean>(false);
|
const showRefreshBrowserCacheSheet = ref<boolean>(false);
|
||||||
const versionClickCount = ref<number>(0);
|
const versionClickCount = ref<number>(0);
|
||||||
|
|
||||||
|
const allLanguages = computed<LanguageOption[]>(() => getAllLanguageOptions(false));
|
||||||
const forceShowRefreshBrowserCacheMenu = computed<boolean>(() => versionClickCount.value >= 5);
|
const forceShowRefreshBrowserCacheMenu = computed<boolean>(() => versionClickCount.value >= 5);
|
||||||
|
|
||||||
function showVersion(): void {
|
function showVersion(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user