mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-03-13 00:18:13 -04:00
✨ Feature(custom): update manual source URL based on language configuration
This commit is contained in:
parent
8b21e8407c
commit
3587bc5225
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<webview
|
<webview
|
||||||
src="https://piclist.cn/app.html"
|
:src="srcUrl"
|
||||||
disablewebsecurity
|
disablewebsecurity
|
||||||
allowpopups
|
allowpopups
|
||||||
autosize="on"
|
autosize="on"
|
||||||
@ -9,6 +9,25 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { getConfig } from '@/utils/dataSender'
|
||||||
|
import { onMounted, ref } from 'vue'
|
||||||
|
import { II18nLanguage } from '~/universal/types/enum'
|
||||||
|
import { configPaths } from '~/universal/utils/configPaths'
|
||||||
|
|
||||||
|
const srcUrl = ref('https://piclist.cn/app.html')
|
||||||
|
|
||||||
|
const updateUrl = async () => {
|
||||||
|
const lang = await getConfig(configPaths.settings.language) || II18nLanguage.ZH_CN
|
||||||
|
srcUrl.value = lang === II18nLanguage.ZH_CN ? 'https://piclist.cn/app.html' : 'https://piclist.cn/en/app.html'
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
updateUrl()
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
name: 'DocumentPage'
|
name: 'DocumentPage'
|
||||||
|
Loading…
Reference in New Issue
Block a user