Compare commits

...

7 Commits

8 changed files with 53 additions and 6 deletions

View File

@ -2,7 +2,9 @@
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"windows": [
"main"
],
"permissions": [
"path:default",
"event:default",
@ -12,6 +14,7 @@
"resources:default",
"menu:default",
"tray:default",
"shell:allow-open"
"shell:allow-open",
"window:allow-start-dragging"
]
}
}

View File

@ -13,7 +13,13 @@
{
"title": "BugWork",
"width": 1200,
"height": 800
"height": 800,
"minWidth": 1200,
"minHeight": 800,
"titleBarStyle": "Overlay",
"decorations": true,
"hiddenTitle": true,
"transparent": false
}
],
"security": {
@ -31,4 +37,4 @@
"icons/icon.ico"
]
}
}
}

View File

@ -0,0 +1,17 @@
import { css } from "@emotion/react";
import styled from "@emotion/styled";
const Handler = styled.div(({ theme }) =>
css({
position: "fixed",
top: 0,
left: 0,
right: 0,
height: theme.spacings.xxs * 24,
zIndex: 1,
})
);
export function WindowMoveHandler() {
return <Handler data-tauri-drag-region />;
}

View File

@ -0,0 +1 @@
export { WindowMoveHandler } from "./WindowMoveHandler/WindowMoveHandler";

View File

@ -13,6 +13,7 @@ export const globalStyle = (theme) =>
MozOsxFontSmoothing: "grayscale",
WebkitTextSizeAdjust: "100%",
backgroundColor: theme.backgroundColor.light,
overflow: "hidden",
[mq.dark]: {
backgroundColor: theme.backgroundColor.dark,
},

0
src/hooks/index.tsx Normal file
View File

View File

@ -1,3 +1,22 @@
import { WindowMoveHandler } from "@/components";
import { flex } from "@/style-predefines";
import { css } from "@emotion/react";
import styled from "@emotion/styled";
const LayoutContainer = styled.div(({ theme }) =>
css({
height: "100vh",
width: "100vw",
paddingTop: theme.spacings.xxs * 24,
...flex(theme, "row", "flex-start", "stretch"),
overflow: "hidden",
})
);
export function MainLayout() {
return <div></div>;
return (
<LayoutContainer>
<WindowMoveHandler />
</LayoutContainer>
);
}

0
src/states/index.tsx Normal file
View File