Skip to content

Commit 58622e3

Browse files
committed
feat: add note about operators and groups in operation viewer
1 parent 89431ae commit 58622e3

File tree

2 files changed

+32
-15
lines changed

2 files changed

+32
-15
lines changed

src/components/viewer/OperationViewer.tsx

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
Button,
33
ButtonGroup,
4+
Callout,
45
Card,
56
Collapse,
67
Elevation,
@@ -577,7 +578,9 @@ function OperationViewerInner({
577578
<NonIdealState
578579
icon="tree"
579580
title={t.components.viewer.OperationViewer.comments_closed}
580-
description={t.components.viewer.OperationViewer.feel_the_silence}
581+
description={
582+
t.components.viewer.OperationViewer.comments_closed_note
583+
}
581584
/>
582585
) : (
583586
<CommentArea operationId={operation.id} />
@@ -594,17 +597,10 @@ function OperationViewerInnerDetails({ operation }: { operation: Operation }) {
594597
return (
595598
<div>
596599
<H4
597-
className="inline-flex items-center cursor-pointer hover:text-violet-500"
600+
className="inline-flex items-center cursor-pointer hover:opacity-80"
598601
onClick={() => setShowOperators((v) => !v)}
599602
>
600603
{t.components.viewer.OperationViewer.operators_and_groups}
601-
<Tooltip2
602-
className="!flex items-center"
603-
placement="top"
604-
content={t.components.viewer.OperationViewer.operator_group_tooltip}
605-
>
606-
<Icon icon="info-sign" size={12} className="text-zinc-500 ml-1" />
607-
</Tooltip2>
608604
<Icon
609605
icon="chevron-down"
610606
className={clsx(
@@ -613,6 +609,19 @@ function OperationViewerInnerDetails({ operation }: { operation: Operation }) {
613609
)}
614610
/>
615611
</H4>
612+
<details className="inline">
613+
<summary className="inline cursor-pointer">
614+
<Icon icon="help" size={14} className="ml-2 mb-1 opacity-50" />
615+
</summary>
616+
<Callout intent="primary" icon={null} className="mb-4">
617+
<p>
618+
{t.components.viewer.OperationViewer.operators_and_groups_note.jsx({
619+
operators: (s) => <b>{s}</b>,
620+
groups: (s) => <b>{s}</b>,
621+
})}
622+
</p>
623+
</Callout>
624+
</details>
616625
<Collapse isOpen={showOperators}>
617626
<div className="mt-2 flex flex-wrap gap-6">
618627
{!operation.parsedContent.opers?.length &&
@@ -666,7 +675,7 @@ function OperationViewerInnerDetails({ operation }: { operation: Operation }) {
666675
</Collapse>
667676

668677
<H4
669-
className="mt-6 inline-flex items-center cursor-pointer hover:text-violet-500"
678+
className="mt-6 inline-flex items-center cursor-pointer hover:opacity-80"
670679
onClick={() => setShowActions((v) => !v)}
671680
>
672681
{t.components.viewer.OperationViewer.action_sequence}

src/i18n/translations.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,17 +2988,17 @@
29882988
"cn": "评论区已关闭",
29892989
"en": "Comment section is closed"
29902990
},
2991-
"feel_the_silence": {
2991+
"comments_closed_note": {
29922992
"cn": "感受…宁静……",
2993-
"en": "Feel... the silence..."
2993+
"en": "Experience tranquility..."
29942994
},
29952995
"operators_and_groups": {
29962996
"cn": "干员与干员组",
29972997
"en": "Operators and Operator Groups"
29982998
},
2999-
"operator_group_tooltip": {
3000-
"cn": "干员组:组内干员可以任选其一,自动编队时按最高练度来选择",
3001-
"en": "Operator Group: Choose any operator in the group; auto-formation selects the highest level"
2999+
"operators_and_groups_note": {
3000+
"cn": "{{operators(干员)}}\n作业必需的干员。\n干员练度(等级、模组)仅供参考,MAA 的自动编队仅支持技能选择,其余信息暂未支持。\n\n{{groups(干员组)}}\n一系列可替换干员的编组。\n组内干员可以任选其一,MAA 自动编队时按最高练度来选择",
3001+
"en": "{{operators(Operators)}}\nOperators required for this Job. \nThe requirements (level and module) are for reference only. MAA's auto-formation only supports skill selection, and other information is not yet supported.\n\n{{groups(Operator Groups)}}\nGroups of interchangeable operators. \nYou can choose any operator in a group. MAA's auto-formation selects the one with the highest level."
30023002
},
30033003
"no_operators": {
30043004
"cn": "暂无干员",
@@ -3403,6 +3403,14 @@
34033403
}
34043404
},
34053405
"operator": {
3406+
"operator": {
3407+
"cn": "干员",
3408+
"en": "Operator"
3409+
},
3410+
"operator_group":{
3411+
"cn": "干员组",
3412+
"en": "Operator Group"
3413+
},
34063414
"skill_number": {
34073415
"cn": {
34083416
"1": "一技能",

0 commit comments

Comments
 (0)