Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions frontend/src/i18n/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,23 @@ export default {
'Switching the engine swaps in the native options and stages of that engine. Values changed under the current engine are not carried over, but they are kept and come back when you switch back.',
hsrStageMissingForEngine:
'The trailblaze power engine is now {engine}, and no stage is selected under it. Stages are stored per engine, so stages picked under the other engine are not carried over — pick them again. Switching back restores the previous selection.',
editHsrUser: 'Edit the HSR user',
addHsrUser: 'Add an HSR user',
hsrServerCnOfficial: 'CN official',
hsrWeekDone: 'Done this week',
hsrWeekNotDone: 'Not done this week',
hsrLastCompleted: 'Last completed: {date}',
hsrDynamicTaskCount: '{n} dynamic modules',
hsrReadFrom: 'Read from: {source}',
daily: 'Daily',
hsrEngineUnavailable: 'Unavailable',
hsrNativeConfigNotLoaded: 'Native configuration not loaded',
hsrTaskEnabled: 'Enabled',
hsrTaskNotEnabled: 'Not enabled',
hsrTaskFieldCount: '{n} options',
hsrTaskSwitchesOn: '{n} switches on',
hsrRepickStage: 'Pick the stage again',
notConfigured: 'Not configured',
howUseThis: 'How to use this',
whenSavingMasEncrypts:
'When saving, MAS encrypts the account password. Without SRA configured, or when the SRA module is unused, the password is not used for account switching.',
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/i18n/locales/ja-JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,23 @@ export default {
'実行エンジンを切り替えると、そのエンジン固有のネイティブ設定項目とステージに切り替わります。現在のエンジンで変更した値は引き継がれませんが保持され、戻すと再び表示されます。',
hsrStageMissingForEngine:
'現在の開拓力エンジンは {engine} で、このエンジンではまだステージが選ばれていません。ステージはエンジンごとに保存されるため、別のエンジンで選んだステージは引き継がれません。選び直してください。元のエンジンに戻すと以前の選択が復元されます。',
editHsrUser: 'HSR ユーザーを編集',
addHsrUser: 'HSR ユーザーを追加',
hsrServerCnOfficial: '公式サーバー',
hsrWeekDone: '今週完了',
hsrWeekNotDone: '今週未完了',
hsrLastCompleted: '最終完了:{date}',
hsrDynamicTaskCount: '動的 {n} 件',
hsrReadFrom: '読み込み元:{source}',
daily: '日課',
hsrEngineUnavailable: '利用不可',
hsrNativeConfigNotLoaded: 'ネイティブ設定を読み込めませんでした',
hsrTaskEnabled: '有効',
hsrTaskNotEnabled: '無効',
hsrTaskFieldCount: '設定 {n} 項目',
hsrTaskSwitchesOn: 'スイッチ {n} 個オン',
hsrRepickStage: 'ステージを選び直してください',
notConfigured: '未設定',
howUseThis: '使い方',
whenSavingMasEncrypts:
'保存時に MAS がアカウントのパスワードを暗号化します。SRA が未設定、または SRA モジュールを使わない場合、パスワードはアカウント切り替えに使われません。',
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/i18n/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,23 @@ export default {
'切换执行引擎会改用该引擎自己的一套原生配置项和体力副本;当前引擎下改过的值不会带过去,但会保留,切回时仍在。',
hsrStageMissingForEngine:
'当前体力执行引擎为 {engine},该引擎下尚未选择副本。副本按引擎分别保存,另一引擎下已选的副本不会自动带过来,请重新选择;切回原引擎时原选择仍保留。',
editHsrUser: '编辑 HSR 用户',
addHsrUser: '添加 HSR 用户',
hsrServerCnOfficial: '官服',
hsrWeekDone: '本周已完成',
hsrWeekNotDone: '本周未完成',
hsrLastCompleted: '最近完成:{date}',
hsrDynamicTaskCount: '动态 {n} 项',
hsrReadFrom: '读取自:{source}',
daily: '日常',
hsrEngineUnavailable: '不可用',
hsrNativeConfigNotLoaded: '未读取到原生配置',
hsrTaskEnabled: '已启用',
hsrTaskNotEnabled: '未启用',
hsrTaskFieldCount: '{n} 项配置',
hsrTaskSwitchesOn: '{n} 个开关已开',
hsrRepickStage: '请重新选择副本',
notConfigured: '未配置',
howUseThis: '使用说明',
whenSavingMasEncrypts:
'保存时 MAS 会自动加密账号密码。未配置 SRA 或未使用 SRA 模块时,账号密码不会用于切号。',
Expand Down
28 changes: 20 additions & 8 deletions frontend/src/views/EditView/User/HSRUserEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:script-name="scriptName"
:is-edit="isEdit"
script-edit-segment="hsr"
:current-label="isEdit ? '编辑 HSR 用户' : '添加 HSR 用户'"
:current-label="isEdit ? t('edit.editHsrUser') : t('edit.addHsrUser')"
:logo-src="hsrLogo"
@cancel="handleCancel"
/>
Expand Down Expand Up @@ -39,7 +39,7 @@
<template #label>
<a-tooltip :title="t('edit.thisNameAlsoWritten')">
<span class="form-label"
>用户名 <QuestionCircleOutlined class="help-icon"
>{{ t('edit.username') }} <QuestionCircleOutlined class="help-icon"
/></span>
</a-tooltip>
</template>
Expand Down Expand Up @@ -109,7 +109,7 @@
<template #label>
<a-tooltip :title="t('edit.daysLeft1Means')">
<span class="form-label"
>剩余天数 <QuestionCircleOutlined class="help-icon"
>{{ t('edit.daysLeft') }} <QuestionCircleOutlined class="help-icon"
/></span>
</a-tooltip>
</template>
Expand Down Expand Up @@ -219,13 +219,17 @@
<div class="progress-group">
<span class="progress-label">{{ t('edit.echoOfWar') }}</span>
<a-tag :color="eowCompletedThisWeek ? 'green' : 'orange'">
本周 {{ eowCompletedThisWeek ? '已完成' : '未完成' }}
{{ eowCompletedThisWeek ? t('edit.hsrWeekDone') : t('edit.hsrWeekNotDone') }}
</a-tag>
<span
v-if="hasValidCompletionDate(formData.Data.EchoOfWarLastCompletionDate)"
class="date-hint"
>
最近完成:{{ formData.Data.EchoOfWarLastCompletionDate }}
{{
t('edit.hsrLastCompleted', {
date: formData.Data.EchoOfWarLastCompletionDate,
})
}}
</span>
</div>
</a-col>
Expand All @@ -247,13 +251,19 @@
<div class="progress-group">
<span class="progress-label">{{ t('edit.weekly') }}</span>
<a-tag :color="formData.Data.WeeklyCompletedThisWeek ? 'green' : 'orange'">
本周 {{ formData.Data.WeeklyCompletedThisWeek ? '已完成' : '未完成' }}
{{
formData.Data.WeeklyCompletedThisWeek
? t('edit.hsrWeekDone')
: t('edit.hsrWeekNotDone')
}}
</a-tag>
<span
v-if="hasValidCompletionDate(formData.Data.WeeklyLastCompletionDate)"
class="date-hint"
>
最近完成:{{ formData.Data.WeeklyLastCompletionDate }}
{{
t('edit.hsrLastCompleted', { date: formData.Data.WeeklyLastCompletionDate })
}}
</span>
</div>
</a-col>
Expand Down Expand Up @@ -424,7 +434,9 @@ const hsrStageOptions = ref<HSRDynamicStageOptionsData | null>(null)
const hsrStageOptionsLoading = ref(false)
const hsrStageOptionsError = ref('')

const serverOptions = [{ value: 'CN-Official', label: '官服' }]
const serverOptions = computed(() => [
{ value: 'CN-Official', label: t('edit.hsrServerCnOfficial') },
])
const controlModeOptions = [
{ value: 'managed', label: t('edit.masManaged') },
{ value: 'direct', label: t('edit.scriptDirectControl') },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<a-col :xs="24" :lg="12" class="task-list-column">
<div class="column-header">
<span>{{ t('edit.taskModule') }}</span>
<a-typography-text type="secondary"
>动态 {{ snapshot.tasks.length }} 项</a-typography-text
>
<a-typography-text type="secondary">{{
t('edit.hsrDynamicTaskCount', { n: snapshot.tasks.length })
}}</a-typography-text>
</div>
<div class="task-list">
<button
Expand Down Expand Up @@ -125,7 +125,7 @@
class="panel-alert"
/>
<a-typography-text type="secondary" class="source-line">
读取自:{{ selectedForm.source }}
{{ t('edit.hsrReadFrom', { source: selectedForm.source }) }}
</a-typography-text>
<a-alert
v-if="selectedDroppedOverrides.length"
Expand Down Expand Up @@ -288,18 +288,27 @@ const engineOptions = computed(() =>
: []
)

const phaseLabel = (phase: string) => (phase === 'weekly' ? '周常' : '日常')
const phaseLabel = (phase: string) => (phase === 'weekly' ? t('edit.weekly') : t('edit.daily'))
const engineLabel = (engine?: HSREngine) =>
engine === 'M7A' ? '三月七' : engine === 'SRA' ? 'SRA' : '不可用'
engine === 'M7A'
? t('edit.directEngineM7a')
: engine === 'SRA'
? 'SRA'
: t('edit.hsrEngineUnavailable')
const engineColor = (engine?: HSREngine) =>
engine === 'M7A' ? 'purple' : engine === 'SRA' ? 'blue' : 'default'

const taskSummary = (task: HSRManagedTask) => {
const engine = mappedEngine(task)
const form = engine ? task.forms?.[engine] : undefined
if (!form) return '未读取到原生配置'
if (!form) return t('edit.hsrNativeConfigNotLoaded')
const enabled = form.fields.filter(field => field.type === 'boolean' && field.value).length
return `${props.taskSwitch[task.key] ? '已启用' : '未启用'} · ${form.fields.length} 项配置${enabled ? ` · ${enabled} 个开关已开` : ''}`
const parts = [
props.taskSwitch[task.key] ? t('edit.hsrTaskEnabled') : t('edit.hsrTaskNotEnabled'),
t('edit.hsrTaskFieldCount', { n: form.fields.length }),
]
if (enabled) parts.push(t('edit.hsrTaskSwitchesOn', { n: enabled }))
return parts.join(' · ')
}

const handleEngineChange = (value: string | number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,12 +588,12 @@ const activeChannel = computed<ActiveChannel>(() => {
})

// 刷取副本下拉的可见选项(4 类)
const activeChannelOptions = [
{ value: 'CalyxGolden', label: '拟造花萼(金)' },
{ value: 'CalyxCrimson', label: '拟造花萼(赤)' },
{ value: 'Relic', label: '侵蚀隧洞' },
{ value: 'Ornament', label: '饰品提取' },
]
const activeChannelOptions = computed(() => [
{ value: 'CalyxGolden', label: t('edit.calyxGolden') },
{ value: 'CalyxCrimson', label: t('edit.calyxCrimson') },
{ value: 'Relic', label: t('edit.cavernsCorrosion') },
{ value: 'Ornament', label: t('edit.ornamentExtraction') },
])

// 当前生效关卡读取:根据 activeChannel 读对应字段
const currentNativePayload = computed(() => {
Expand All @@ -603,14 +603,14 @@ const currentNativePayload = computed(() => {
// 当前生效关卡显示:副本类型 + 关卡名
// 格式:拟造花萼(金) 材料:武器经验(以太之蕾 翁法罗斯)
const currentStageDisplay = computed((): string => {
if (nativeEngineMismatch.value) return '请重新选择副本'
if (nativeEngineMismatch.value) return t('edit.hsrRepickStage')
const nativePayload = currentNativePayload.value
if (nativePayload?.label) {
return nativePayload.categoryLabel
? `${nativePayload.categoryLabel} ${nativePayload.label}`
: nativePayload.label
}
return '未配置'
return t('edit.notConfigured')
})

const currentStageColor = computed((): string => {
Expand Down
3 changes: 2 additions & 1 deletion res/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"HSR专项 MAS 管控任务的「一键从源配置导入」改名为「重置为源配置」并增加二次确认,明确该操作会清除用户在 MAS 里改过的全部覆盖配置、重新读取 SRA / 三月七助手当前配置 by [@qiyinxi](https://github.com/qiyinxi)",
"HSR专项 MAS 管控任务的配置项补齐中文名称、取值范围与填写说明(如货币战争刷开局的四个重开条件格式),三月七助手缺少配置说明文件时给出明确提示;切换执行引擎时明确提示配置项与副本按引擎分别保存、需要重新选择 by [@qiyinxi](https://github.com/qiyinxi)",
"HSR专项 体力副本在所指派引擎下未选择、执行引擎因缺少路径被自动改派时,改为在任务开始前提示并写入运行日志,不再跑完才在日志里体现 by [@qiyinxi](https://github.com/qiyinxi)",
"HSR专项 脚本页新增「SRA 配置档案」下拉,可指定 SRA 多份配置档案中的哪一份供 MAS 管控表单、脚本直控与导入快照使用;默认「自动」保持原有的优先 Default 行为,所选档案被删除时会回退并在脚本页、用户页与运行日志中提示 by [@qiyinxi](https://github.com/qiyinxi)"
"HSR专项 脚本页新增「SRA 配置档案」下拉,可指定 SRA 多份配置档案中的哪一份供 MAS 管控表单、脚本直控与导入快照使用;默认「自动」保持原有的优先 Default 行为,所选档案被删除时会回退并在脚本页、用户页与运行日志中提示 by [@qiyinxi](https://github.com/qiyinxi)",
"HSR专项 用户页仍以中文显示的一批界面文案(页面标题、用户名与剩余天数标签、历战余响与周常的本周完成状态、服务器与体力副本选项、管控任务列表的周常/日常与启用摘要等)接入多语言词表,英文与日文界面不再夹杂中文"
],
"开发流程": [
"新增 GitHub Issue 模板,Bug 反馈按脚本专项、MaaFW 专项与通用问题分区,并附需求建议等模板与常见问题、文档站、官方群链接 by [@qiyinxi](https://github.com/qiyinxi)",
Expand Down
Loading