From 842bfccc1b92613212589b66db39a24ad29975ed Mon Sep 17 00:00:00 2001 From: hermes Date: Mon, 26 Oct 2026 17:39:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(qa):=20=E5=90=91=E5=AF=BC=E8=A1=A5?= =?UTF-8?q?=E4=B8=8A=20Partner=20Portal=20=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PP 一个门户一条来源:已接入时只做说明不重复登记,未接入时提示需服务端放置只读凭据。 --- web/src/SourceWizard.tsx | 18 ++++++++++++++---- web/src/SystemSettings.tsx | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/web/src/SourceWizard.tsx b/web/src/SourceWizard.tsx index e43cbf5..0daaa90 100644 --- a/web/src/SourceWizard.tsx +++ b/web/src/SourceWizard.tsx @@ -21,17 +21,19 @@ type SourceKind = 'wiki' | 'drive' | 'pp' const kinds: { key: SourceKind; title: string; detail: string; icon: string }[] = [ { key: 'wiki', title: '钉钉知识库', detail: '组织 / 我的知识库', icon: '库' }, { key: 'drive', title: '钉盘', detail: '我的文件 / 组织空间', icon: '盘' }, - // PP 的登记端点还没建(凭据在服务端,向导不录密码),暂留在下方清单里管理, - // 端点就绪后再作为第三张卡放进来——避免点到最后保存不出去。 + { key: 'pp', title: 'Partner Portal', detail: '公开只读资料中心', icon: '↧' }, ] const steps = ['类型', '授权', '范围', '校验', '保存'] as const export function SourceWizard({ registeredNames, + ppConnected, onRegistered, }: { registeredNames: string[] + // PP 是一个门户一条来源:已接入时向导只做说明,不重复登记。 + ppConnected: boolean onRegistered: () => void }) { const [open, setOpen] = useState(false) @@ -208,7 +210,11 @@ export function SourceWizard({ {step === 2 ? (
{kind === 'pp' ? ( -

PP 只有一个公开只读门户,添加即可接入;文件清单在首次扫描时生成。

+

+ {ppConnected + ? '已接入 PP 资料下载中心(一个门户一条来源),无需重复添加;刷新与归档在下方清单里做。' + : 'PP 需要服务端放置只读凭据后才能接入;凭据到位后联系我开通,向导本身不录密码。'} +

) : loading ? (

正在列举当前账号可见的来源…

) : loadError ? ( @@ -284,7 +290,11 @@ export function SourceWizard({ - {step < 3 ? ( + {kind === 'pp' ? ( + + ) : step < 3 ? ( diff --git a/web/src/SystemSettings.tsx b/web/src/SystemSettings.tsx index 51c03ab..542ecb9 100644 --- a/web/src/SystemSettings.tsx +++ b/web/src/SystemSettings.tsx @@ -509,6 +509,7 @@ export function SystemSettingsView({ {identity?.role === 'admin' ? ( item.name)} + ppConnected={connections.some((item) => item.source_type === 'pp')} onRegistered={onSourcesChanged} /> ) : null}