fix terminal popup release behavior (#1403)

This commit is contained in:
陈大猫
2026-06-11 14:48:52 +08:00
committed by GitHub
parent afefbd953f
commit 9013a7e312
29 changed files with 705 additions and 84 deletions

View File

@@ -81,6 +81,36 @@ function SettingsWindowFallback() {
);
}
function TerminalPopupWindowFallback() {
return (
<div
style={{
width: '100vw',
height: '100vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: '#0b1015',
color: '#d7e0ea',
}}
>
<svg width="28" height="28" viewBox="0 0 28 28" aria-label="Loading" style={{ opacity: 0.8 }}>
<circle cx="14" cy="14" r="11" fill="none" stroke="currentColor" strokeWidth="2" opacity="0.18" />
<path d="M25 14a11 11 0 0 0-11-11" fill="none" stroke="currentColor" strokeLinecap="round" strokeWidth="2">
<animateTransform
attributeName="transform"
dur="0.75s"
from="0 14 14"
repeatCount="indefinite"
to="360 14 14"
type="rotate"
/>
</path>
</svg>
</div>
);
}
const rootElement = document.getElementById('root');
if (!rootElement) {
throw new Error("Could not find root element to mount to");
@@ -129,7 +159,7 @@ const renderApp = () => {
root.render(
<ToastProvider>
<TooltipProvider delayDuration={300}>
<Suspense fallback={<div style={{ padding: 12, color: '#fff' }}>Loading terminal</div>}>
<Suspense fallback={<TerminalPopupWindowFallback />}>
<LazyTerminalPopupPage />
</Suspense>
</TooltipProvider>