Skip to content

Commit c469951

Browse files
committed
feat(titlebar): integrate custom titlebar UI; update app entry and global styles
1 parent 600d1e3 commit c469951

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/main.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ analytics.initialize();
1414
// Start resource monitoring (check every 2 minutes)
1515
resourceMonitor.startMonitoring(120000);
1616

17+
// Add a macOS-specific class to the <html> element to enable platform-specific styling
18+
// Browser-safe detection using navigator properties (works in Tauri and web preview)
19+
(() => {
20+
const isMacLike = typeof navigator !== "undefined" &&
21+
(navigator.platform?.toLowerCase().includes("mac") ||
22+
navigator.userAgent?.toLowerCase().includes("mac os x"));
23+
if (isMacLike) {
24+
document.documentElement.classList.add("is-macos");
25+
}
26+
})();
27+
1728
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
1829
<React.StrictMode>
1930
<PostHogProvider

src/styles.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ button:focus-visible,
339339
box-shadow: none !important;
340340
}
341341

342+
/* macOS-only: subtle window outline for transparent, custom-decorated window */
343+
html.is-macos body {
344+
/* Maintain rounded-corner shape and add a gentle 1px inner outline */
345+
box-shadow: inset 0 0 0 1px var(--color-border);
346+
}
347+
342348
/* Typography Utility Classes */
343349
.text-display-1 {
344350
font-size: var(--text-5xl);

0 commit comments

Comments
 (0)