diff --git a/cc-haha/desktop/src-tauri/capabilities/default.json b/cc-haha/desktop/src-tauri/capabilities/default.json index b532e82..6beae47 100644 --- a/cc-haha/desktop/src-tauri/capabilities/default.json +++ b/cc-haha/desktop/src-tauri/capabilities/default.json @@ -9,6 +9,8 @@ "core:window:allow-minimize", "core:window:allow-start-dragging", "core:window:allow-toggle-maximize", + "core:window:allow-is-maximized", + "core:event:default", "shell:allow-open", { "identifier": "shell:allow-execute", diff --git a/cc-haha/desktop/src-tauri/tauri.conf.json b/cc-haha/desktop/src-tauri/tauri.conf.json index c9330e6..6cf6421 100644 --- a/cc-haha/desktop/src-tauri/tauri.conf.json +++ b/cc-haha/desktop/src-tauri/tauri.conf.json @@ -12,14 +12,16 @@ "app": { "windows": [ { - "title": "HeiCode", + "title": "Heicode", "width": 1440, "height": 960, "minWidth": 960, "minHeight": 640, - "decorations": true, + "decorations": false, "transparent": false, - "acceptFirstMouse": true + "acceptFirstMouse": true, + "titleBarStyle": "Overlay", + "hiddenTitle": true } ], "security": { diff --git a/cc-haha/desktop/src/components/layout/TitleBar.tsx b/cc-haha/desktop/src/components/layout/TitleBar.tsx index 47ee7e7..3241297 100644 --- a/cc-haha/desktop/src/components/layout/TitleBar.tsx +++ b/cc-haha/desktop/src/components/layout/TitleBar.tsx @@ -1,5 +1,9 @@ import { useUIStore } from '../../stores/uiStore' import { useTranslation } from '../../i18n' +import { WindowControls } from './WindowControls' + +const isMacHost = typeof navigator !== 'undefined' + && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent || '') export function TitleBar() { const { activeView, setActiveView } = useUIStore() @@ -10,12 +14,12 @@ export function TitleBar() { className="h-[var(--titlebar-height)] flex items-center border-b border-[var(--color-border)] bg-[var(--color-surface)] select-none" data-tauri-drag-region > - {/* macOS traffic light spacer */} -
+ {/* macOS traffic-light spacer (native overlay buttons appear here) */} + {isMacHost ? : } {/* Logo */}- {t('login.subtitle')} -
+ {/* Chrome strip — drag region + window controls */} ++ {t('login.subtitle')} +
+ {t('login.baseUrl.label')}
+
{provider.baseUrl}
{local ? (
@@ -107,7 +105,7 @@ export function ProviderLoginCard({ provider }: Props) {
+
{provider.promoText}
) : null} @@ -117,7 +115,7 @@ export function ProviderLoginCard({ provider }: Props) { type="button" onClick={handleOAuth} disabled={!provider.oauthEnabled || isLoggingIn || busy !== null} - className="rounded-md bg-[image:var(--gradient-btn-primary)] px-4 py-2.5 text-sm text-[var(--color-btn-primary-fg)] shadow-[var(--shadow-button-primary)] transition-opacity hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50" + className="group/btn relative overflow-hidden rounded-[var(--radius-md)] border border-[var(--color-primary)]/40 bg-[var(--color-primary)] px-4 py-2.5 text-sm font-medium text-[var(--color-on-primary)] shadow-[var(--shadow-button-primary)] transition-all duration-200 hover:bg-[var(--color-primary-fixed-dim)] hover:shadow-[0_8px_24px_rgba(197,165,114,0.28)] disabled:cursor-not-allowed disabled:border-[var(--color-border)] disabled:bg-[var(--color-surface-container-high)] disabled:text-[var(--color-text-tertiary)] disabled:shadow-none" > {busy === 'oauth' ? t('login.oauth.opening') @@ -133,7 +131,7 @@ export function ProviderLoginCard({ provider }: Props) {