feat(browser): 被搁置的导入提供「重启并完成导入」一键按钮
This commit is contained in:
@@ -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 ${
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user