feat(browser): 被搁置的导入提供「重启并完成导入」一键按钮

This commit is contained in:
Rick Ye
2026-09-11 18:33:40 +08:00
parent 6259a2bba6
commit d0b97f16b2
6 changed files with 22 additions and 0 deletions
@@ -118,6 +118,17 @@ export function BrowserImportForm(): JSX.Element {
{error && (
<div className="mt-3 rounded border border-red/40 bg-red-tint px-2.5 py-2 text-[11.5px] text-red">{error}</div>
)}
{result?.deferred && (
<div className="mt-3 flex items-center justify-end">
<button
type="button"
onClick={() => void window.api.appRelaunch()}
className="rounded bg-accent px-3.5 py-1.5 text-[12px] font-medium text-page transition-opacity hover:opacity-90"
>
重启并完成导入
</button>
</div>
)}
{result && (
<div
className={`mt-3 rounded border px-2.5 py-2 text-[11.5px] leading-relaxed ${
+1
View File
@@ -58,6 +58,7 @@ declare global {
stop: () => Promise<void>
getState: () => Promise<SessionState>
versions: () => Promise<{ app: string; electron: string; node: string; chrome: string; user: string }>
appRelaunch: () => Promise<void>
listSessions: () => Promise<SessionMeta[]>
newSession: () => Promise<void>
openSession: (path: string) => Promise<void>