mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-06 13:44:21 +08:00
- Introduced a new setting `show_dock_icon` in the `DesktopSettings` interface. - Updated `AppLifecycleSettingsCard` to manage dock icon visibility with a toggle switch. - Enhanced the API to read and write the new dock icon visibility setting. - Added corresponding translations for the new setting in both English and Chinese locales. - Updated tests to ensure the default behavior of showing the dock icon and proper round-trip functionality for settings.
21 lines
685 B
TypeScript
21 lines
685 B
TypeScript
import { Outlet } from "react-router-dom";
|
|
import { desktopPlatform } from "../native/platform";
|
|
import styles from "./AppFrame.module.scss";
|
|
import { AppHeader } from "./AppHeader";
|
|
|
|
const currentPlatform = desktopPlatform();
|
|
document.documentElement.dataset.platform = currentPlatform;
|
|
|
|
export function AppFrame() {
|
|
const platform = currentPlatform;
|
|
const platformClasses = platform === "windows" ? [styles.windows] : [];
|
|
const nativeDesktop = "__TAURI_INTERNALS__" in window;
|
|
|
|
return (
|
|
<div className={[styles.shell, ...platformClasses].filter(Boolean).join(" ")}>
|
|
<AppHeader platform={platform} nativeDesktop={nativeDesktop} />
|
|
<Outlet />
|
|
</div>
|
|
);
|
|
}
|