tauri: add basic custom titlebar (#5438)

This commit is contained in:
Brendan Allan 2025-12-12 23:37:17 +08:00 committed by GitHub
commit 59d4041aa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 107 additions and 9 deletions

View file

@ -14,7 +14,7 @@
<meta property="og:image" content="/social-share.png" />
<meta property="twitter:image" content="/social-share.png" />
</head>
<body class="antialiased overscroll-none select-none text-12-regular">
<body class="antialiased overscroll-none select-none text-12-regular overflow-hidden">
<script>
;(function () {
const savedTheme = localStorage.getItem("theme") || "oc-1"
@ -22,7 +22,7 @@
})()
</script>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="root" class="flex flex-col h-screen"></div>
<script src="/src/entry.tsx" type="module"></script>
</body>
</html>

View file

@ -426,7 +426,7 @@ export default function Layout(props: ParentProps) {
}
return (
<div class="relative h-screen flex flex-col">
<div class="relative flex-1 flex flex-col">
<header class="h-12 shrink-0 bg-background-base border-b border-border-weak-base flex" data-tauri-drag-region>
<A
href="/"
@ -512,7 +512,7 @@ export default function Layout(props: ParentProps) {
</Show>
</div>
</header>
<div class="h-[calc(100vh-3rem)] flex">
<div class="h-[calc(100%-3rem)] flex">
<div
classList={{
"relative @container w-12 pb-5 shrink-0 bg-background-base": true,