补全翻译

This commit is contained in:
谦君
2025-12-27 01:04:14 +08:00
parent 7cc885c62a
commit 66783f896c
20 changed files with 371 additions and 406 deletions

View File

@@ -1,6 +1,12 @@
<template>
<Dialog :open="true" @update:open="handleClose">
<DialogContent class="max-w-2xl p-0 overflow-hidden bg-gradient-to-b from-background to-background/95">
<!-- 可访问性标题隐藏 -->
<VisuallyHidden>
<DialogTitle>{{ t('campaign.dialogue.title') }}</DialogTitle>
<DialogDescription>{{ t('campaign.dialogue.description') }}</DialogDescription>
</VisuallyHidden>
<!-- 对话框头部 - 星空效果 -->
<div class="absolute inset-0 pointer-events-none overflow-hidden">
<div class="stars-bg" />
@@ -80,7 +86,8 @@
<script setup lang="ts">
import { ref, computed, watch, onMounted, onUnmounted } from 'vue'
import { useI18n } from '@/composables/useI18n'
import { Dialog, DialogContent } from '@/components/ui/dialog'
import { Dialog, DialogContent, DialogTitle, DialogDescription } from '@/components/ui/dialog'
import { VisuallyHidden } from 'reka-ui'
import { Button } from '@/components/ui/button'
import type { StoryDialogue, DialogueChoice } from '@/types/game'
import { User, Bot, HelpCircle, MessageCircle, ChevronRight } from 'lucide-vue-next'

View File

@@ -14,11 +14,11 @@
// 使用纯色背景,在 Android WebView 中更可靠
const colors = {
metal: 'bg-slate-500',
crystal: 'bg-cyan-500',
deuterium: 'bg-green-500',
darkMatter: 'bg-purple-700',
energy: 'bg-yellow-500'
metal: 'bg-gradient-to-br from-slate-400 to-slate-600',
crystal: 'bg-gradient-to-br from-cyan-400 to-blue-600',
deuterium: 'bg-gradient-to-br from-green-400 to-emerald-600',
darkMatter: 'bg-gradient-to-br from-purple-600 to-indigo-900',
energy: 'bg-gradient-to-br from-yellow-400 to-orange-500'
}
const sizes = {

View File

@@ -152,7 +152,11 @@ const handleTest = async () => {
testResult.value = null
try {
testResult.value = await testWebDAVConnection(config.value)
const result = await testWebDAVConnection(config.value)
testResult.value = {
success: result.success,
message: t(result.messageKey)
}
} finally {
isTesting.value = false
}

View File

@@ -121,7 +121,7 @@ const loadFiles = async () => {
if (result.success && result.files) {
files.value = result.files
} else {
error.value = result.message || t('settings.webdav.loadFailed')
error.value = t(result.messageKey) || t('settings.webdav.loadFailed')
}
} catch (e) {
error.value = e instanceof Error ? e.message : String(e)
@@ -174,7 +174,7 @@ const handleDelete = async (fileName: string) => {
selectedFile.value = null
}
} else {
toast.error(result.message || t('settings.webdav.deleteFailed'))
toast.error(t(result.messageKey) || t('settings.webdav.deleteFailed'))
}
}
</script>