feat: windows styles

This commit is contained in:
DIYgod
2024-07-30 17:17:21 +08:00
parent 3b3e28f706
commit ea994cb2a0
4 changed files with 8 additions and 11 deletions
+4 -3
View File
@@ -44,13 +44,14 @@ function App() {
const windowsElectron = window.electron && getOS() === "Windows"
return (
<>
{window.electron && !windowsElectron && (
{window.electron && (
<div
className="drag-region absolute inset-x-0 top-0 h-12 shrink-0"
aria-hidden
/>
>
{windowsElectron && <Titlebar />}
</div>
)}
{windowsElectron && <Titlebar />}
<RootProviders>
<AppLayer />
</RootProviders>
+2 -1
View File
@@ -19,7 +19,8 @@ const $container = document.querySelector("#root") as HTMLElement
if (window.electron && getOS() === "Windows") {
$container.style.borderRadius = "12px"
$container.style.overflow = "hidden"
$container.style.paddingTop = "24px"
$container.style.paddingTop = "30px"
$container.style.background = "white"
}
ReactDOM.createRoot($container).render(
<React.StrictMode>
+1 -6
View File
@@ -10,12 +10,7 @@ export const Titlebar = () => {
update()
}, [location])
return (
<div className="drag-region fixed top-0 z-[99999] flex h-[24px] w-full items-center justify-end rounded-t-[12px] bg-background">
<div className="absolute inset-x-[90px] top-0 flex h-[24px] items-center gap-2">
<div className="flex w-full justify-center">
<span className="text-xs font-bold">{document.title}</span>
</div>
</div>
<div className="flex h-10 w-full items-center justify-end rounded-t-[12px] pr-1">
<button
className="no-drag-region flex h-[24px] w-[32px] items-center justify-center rounded duration-200 hover:bg-theme-item-active"
type="button"
+1 -1
View File
@@ -109,7 +109,7 @@ const FeedResponsiveResizerContainer = ({
<div
className={cn(
"shrink-0",
"absolute inset-y-0 z-10",
"absolute inset-y-0 z-10 rounded-l-[12px]",
!feedColumnShow ? "-translate-x-full" : "",
)}
style={{