Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

Merge branch 'agent/claude/lan-config-issues'

longmeidaoe25336abf2ea
diff --cc frontend/src/react/settings/cloud-proxy-settings.tsx
index e30b7f73c,3a31b597e..880b6c815
--- a/frontend/src/react/settings/cloud-proxy-settings.tsx
+++ b/frontend/src/react/settings/cloud-proxy-settings.tsx
@@@ -47,19 -46,13 +47,20 @@@ export function CloudProxySettings({ re
window.addEventListener('focus', focus);
return () => window.removeEventListener('focus', focus);
}, []);
+ // 等待块按上次画好时的内容高度占位,首屏骨架用同一个值:账号读回来时整页不再往下推。
+ const body = useRef<HTMLDivElement>(null);
+ useLayoutEffect(() => {
+ if (!loading && body.current) rememberSectionHeight('cloud-proxy', body.current.offsetHeight);
+ }, [loading, state]);
return <Section title="CloudDrive 代理">
<Stack>
- <Help>API 代理用于列目录和查询文件信息,数据代理用于读取视频及配套文件。保存后,同一网盘账号在 CloudDrive 中的其他读取也会使用此设置。</Help>
- {loading ? <div data-skeleton aria-busy="true" aria-label="正在读取网盘代理"><div className="h-24 w-full rounded-2lg bg-background-tertiary-default" /></div> : null}
+ <Help>{CLOUD_PROXY_HELP}</Help>
+ <div ref={body} className="flex min-w-0 flex-col gap-4">
+ {loading ? <div data-skeleton aria-busy="true" aria-label="正在读取网盘代理"><div className="h-(--remembered-h) w-full rounded-2lg bg-background-tertiary-default"
+ style={{ '--remembered-h': `${rememberedSectionHeight('cloud-proxy', 96)}px` } as CSSProperties} /></div> : null}
{action.error ? <Note tone="error" title="没有读取配置">{action.error} <LinkButton href="/settings/downloads" size="small">下载设置</LinkButton></Note> : null}
- {state?.accounts.length === 0 && !state.unlinked?.length ? <Help>还没有使用 CloudDrive 的媒体库。</Help> : null}
+ {state?.configured === false ? <Help>填写 CloudDrive2 地址和 API 令牌后,在这里设置各网盘账号的代理。 <LinkButton href="/settings/downloads" size="small">下载设置</LinkButton></Help>
+ : state?.accounts.length === 0 && !state.unlinked?.length ? <Help>还没有使用 CloudDrive 的媒体库。</Help> : null}
{state?.unlinked?.map(library => <div key={library.root} className="flex min-w-0 flex-col gap-1">
<FieldLabel><span className="inline-flex items-center gap-2"><SourceMark mark={sourceMark(library.location)} />{library.name}</span></FieldLabel>
<Help>尚未匹配 CloudDrive 账号</Help>