diff --git a/src/react-app/routes/game/sect/archive/route.tsx b/src/react-app/routes/game/sect/archive/route.tsx index 96bef92e..1759063d 100644 --- a/src/react-app/routes/game/sect/archive/route.tsx +++ b/src/react-app/routes/game/sect/archive/route.tsx @@ -83,7 +83,7 @@ function ArchiveConversation({ messages.push({ id: 'catalog', speaker: actor.name, - body: `阁中现有${data.definition.methods.map((method) => `《${method.name}》`).join('、')},都可逐卷查问。`, + body: `阁中现有${data.definition.methods.map((method) => `${method.name}`).join('、')},都可逐卷查问。`, }); if (topic === 'limit' && data) messages.push({ diff --git a/src/react-app/routes/game/sect/components/PathsTab.tsx b/src/react-app/routes/game/sect/components/PathsTab.tsx index 825abfb9..4710fa92 100644 --- a/src/react-app/routes/game/sect/components/PathsTab.tsx +++ b/src/react-app/routes/game/sect/components/PathsTab.tsx @@ -199,6 +199,7 @@ function PathDrawer({ createMeridianDrafts(state), ); const [confirmUnlock, setConfirmUnlock] = useState(false); + const [confirmSave, setConfirmSave] = useState(false); const [discardConfirm, setDiscardConfirm] = useState(false); const draftsRef = useRef(drafts); const savedRef = useRef(saved); @@ -220,6 +221,7 @@ function PathDrawer({ mergeFreshMeridianState(draftsRef.current, savedRef.current, fresh), ); setSaved(fresh); + setConfirmSave(false); if (state) setSlot((current) => current ?? state.activeMeridianSlot); }, [state, stateSignature]); @@ -289,6 +291,7 @@ function PathDrawer({ sectJsonRequest('PUT', { nodeIds: drafts[slot] }), ); setSaved((current) => ({ ...current, [slot]: [...drafts[slot]] })); + setConfirmSave(false); }; const footer = discardConfirm ? ( @@ -349,6 +352,22 @@ function PathDrawer({ busy={busy} onConfirm={() => void unlockLayer()} /> + ) : meridianFooterAction === 'save' && confirmSave ? ( +
+

+ 本次选定保存后暂不可更改,重置功能尚未开放。 +

+
+ setConfirmSave(false)}>返回检查 + void saveDraft()} + > + {busy ? '保存中' : '确认保存'} + +
+
) : meridianFooterAction === 'save' ? (

@@ -358,9 +377,9 @@ function PathDrawer({ void saveDraft()} + onClick={() => setConfirmSave(true)} > - {busy ? '保存中' : `保存${terms.meridianLoadout}`} + {`保存${terms.meridianLoadout}`}

) : meridianFooterAction === 'resolve-dirty' ? ( @@ -405,6 +424,7 @@ function PathDrawer({ onChange={(value) => { setTab(value as DrawerTab); setConfirmUnlock(false); + setConfirmSave(false); setDiscardConfirm(false); }} /> @@ -520,18 +540,24 @@ function PathDrawer({ )} - {state ? ( + {state && + StandardSectRules.enabledMeridianLoadoutSlots.length > 1 ? ( ({ - value: String(value), - label: `${terms.meridianLoadout}${value}${state.activeMeridianSlot === value ? ' · 当前' : ''}${isMeridianDraftDirty(drafts, saved, value) ? ' · 未保存' : ''}`, - }))} + items={StandardSectRules.enabledMeridianLoadoutSlots.map( + (value) => ({ + value: String(value), + label: `${terms.meridianLoadout}${value}${state.activeMeridianSlot === value ? ' · 当前' : ''}${isMeridianDraftDirty(drafts, saved, value) ? ' · 未保存' : ''}`, + }), + )} activeValue={String(slot)} - onChange={(value) => setSlot(Number(value) as MeridianSlot)} + onChange={(value) => { + setConfirmSave(false); + setSlot(Number(value) as MeridianSlot); + }} /> - ) : ( + ) : !state ? ( 参悟第一层后,方可配置参悟方案。 - )} + ) : null}
{[...path.layers] @@ -550,13 +576,23 @@ function PathDrawer({ .filter((node) => node.layerId === layer.id) .map((node) => { const selected = drafts[slot].includes(node.id); + const savedNodeId = saved[slot].find( + (nodeId) => + path.nodes.find( + (candidate) => candidate.id === nodeId, + )?.layerId === layer.id, + ); + const selectionLocked = Boolean(savedNodeId); return (