chore: 保存工作副本——客户端授权新契约(双端点/验签/令牌/周检)与桌面会话可靠性改进
This commit is contained in:
1 parent
f71eef0eba
commit
ae6093c9b3
163 files changed
+4911
-2494
No files matched your search
+6
-15
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* 窗口拖拽约定(Tauri overlay title bar):
|
||||
* - 仅使用 data-tauri-drag-region 处理拖拽和双击缩放
|
||||
* - 不叠加 CSS app-region 或 React 双击处理,避免一次双击切换两次
|
||||
* - 不要再叠加 startDragging() 或 CSS app-region: drag,两者会抢鼠标导致窗口拖不动
|
||||
* - 标签栏空白区也由 Tauri 原生拖拽区处理
|
||||
*
|
||||
* RDP/VNC 全屏时只隐藏 chrome,保持 TabContent 挂载,避免会话 remount 立刻退出全屏。
|
||||
@@ -19,7 +19,6 @@ import StatusBar from '../components/layout/StatusBar'
|
||||
import type { Session } from '../stores'
|
||||
import { useDesktopFullscreenStore } from '../stores/desktopFullscreenStore'
|
||||
import { getDesktopPlatform } from '../platform/runtime'
|
||||
import { startWindowDragging } from '../platform/tauri'
|
||||
|
||||
export interface AppShellProps {
|
||||
activeTabId: string | null
|
||||
@@ -47,10 +46,6 @@ function TitleBar() {
|
||||
return (
|
||||
<header
|
||||
data-tauri-drag-region
|
||||
onMouseDown={(event) => {
|
||||
if (event.button !== 0) return
|
||||
void startWindowDragging()
|
||||
}}
|
||||
className="bg-dark-900/95 relative z-20 flex h-10 flex-shrink-0 select-none items-center border-b border-dark-800"
|
||||
>
|
||||
<div data-tauri-drag-region className="h-full w-[78px] flex-shrink-0" aria-hidden />
|
||||
@@ -127,11 +122,7 @@ export default function AppShell({
|
||||
const desktopFullscreen = useDesktopFullscreenStore((state) => state.active)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`flex h-screen flex-col overflow-hidden text-content-primary ${
|
||||
desktopFullscreen ? 'bg-black' : 'bg-dark-900'
|
||||
}`}
|
||||
>
|
||||
<div className={`app-shell text-content-primary ${desktopFullscreen ? 'bg-black' : 'bg-dark-900'}`}>
|
||||
{!desktopFullscreen && <TitleBar />}
|
||||
|
||||
<div className="flex min-h-0 flex-1 overflow-hidden">
|
||||
@@ -145,7 +136,7 @@ export default function AppShell({
|
||||
|
||||
{!desktopFullscreen && (
|
||||
<aside
|
||||
className={`titlebar-no-drag h-full flex-shrink-0 transition-[width,transform] duration-200 ease-in-out ${
|
||||
className={`titlebar-no-drag h-full min-h-0 flex-shrink-0 transition-[width,transform] duration-200 ease-in-out ${
|
||||
isMobile
|
||||
? `fixed inset-y-0 left-0 top-10 z-50 ${mobileSidebarOpen ? 'translate-x-0' : '-translate-x-full'}`
|
||||
: desktopSidebarHidden
|
||||
@@ -163,7 +154,7 @@ export default function AppShell({
|
||||
</aside>
|
||||
)}
|
||||
|
||||
<main className={`flex min-w-0 flex-1 flex-col ${desktopFullscreen ? 'bg-black' : 'bg-dark-800'}`}>
|
||||
<main className={`flex min-h-0 min-w-0 flex-1 flex-col ${desktopFullscreen ? 'bg-black' : 'bg-dark-800'}`}>
|
||||
{!desktopFullscreen && (
|
||||
<div className="flex items-stretch">
|
||||
{isMobile && <MobileMenuButton onClick={onToggleMobileSidebar} />}
|
||||
@@ -188,12 +179,12 @@ export default function AppShell({
|
||||
</div>
|
||||
|
||||
{!desktopFullscreen && (
|
||||
<div className="titlebar-no-drag">
|
||||
<div className="titlebar-no-drag flex-shrink-0">
|
||||
<StatusBar />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="titlebar-no-drag">{children}</div>
|
||||
<div className="contents">{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user