mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
fix: remove top gap and redundant StatusBar in desktop app
- Move Tauri title bar padding into TabBar instead of main container, eliminating the double spacing (38px gap + 36px tab bar) - Remove StatusBar entirely (project/model info already in ChatInput) - TabBar renders a drag region spacer even when no tabs are open Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a16eae3871
commit
ed7b0b2629
@ -6,7 +6,6 @@ import { useSettingsStore } from '../../stores/settingsStore'
|
||||
import { useKeyboardShortcuts } from '../../hooks/useKeyboardShortcuts'
|
||||
import { initializeDesktopServerUrl } from '../../lib/desktopRuntime'
|
||||
import { TabBar } from './TabBar'
|
||||
import { StatusBar } from './StatusBar'
|
||||
import { useTabStore } from '../../stores/tabStore'
|
||||
import { useChatStore } from '../../stores/chatStore'
|
||||
|
||||
@ -101,10 +100,9 @@ export function AppShell() {
|
||||
/>
|
||||
)}
|
||||
<Sidebar />
|
||||
<main id="content-area" className={`flex-1 flex flex-col overflow-hidden relative ${isTauri ? 'pt-[38px]' : ''}`}>
|
||||
<main id="content-area" className="flex-1 flex flex-col overflow-hidden relative">
|
||||
<TabBar />
|
||||
<ContentRouter />
|
||||
<StatusBar />
|
||||
</main>
|
||||
<ToastContainer />
|
||||
</div>
|
||||
|
||||
@ -4,6 +4,7 @@ import { useChatStore } from '../../stores/chatStore'
|
||||
import { useTranslation } from '../../i18n'
|
||||
|
||||
const TAB_WIDTH = 180
|
||||
const isTauri = typeof window !== 'undefined' && ('__TAURI_INTERNALS__' in window || '__TAURI__' in window)
|
||||
|
||||
export function TabBar() {
|
||||
const tabs = useTabStore((s) => s.tabs)
|
||||
@ -96,10 +97,13 @@ export function TabBar() {
|
||||
}
|
||||
}
|
||||
|
||||
if (tabs.length === 0) return null
|
||||
if (tabs.length === 0) {
|
||||
// Still need drag region space in Tauri even with no tabs
|
||||
return isTauri ? <div className="h-[38px] flex-shrink-0" data-tauri-drag-region /> : null
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-center border-b border-[var(--color-border)] bg-[var(--color-surface)] min-h-[36px] select-none">
|
||||
<div className={`flex items-center border-b border-[var(--color-border)] bg-[var(--color-surface)] min-h-[36px] select-none ${isTauri ? 'pt-[38px]' : ''}`} data-tauri-drag-region>
|
||||
{canScrollLeft && (
|
||||
<button onClick={() => scroll('left')} className="flex-shrink-0 w-7 h-full flex items-center justify-center text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)]">
|
||||
<span className="material-symbols-outlined text-[16px]">chevron_left</span>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user