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

View File

@ -13,7 +13,13 @@
{ {
"title": "BugWork", "title": "BugWork",
"width": 1200, "width": 1200,
"height": 800 "height": 800,
"minWidth": 1200,
"minHeight": 800,
"titleBarStyle": "Overlay",
"decorations": true,
"hiddenTitle": true,
"transparent": false
} }
], ],
"security": { "security": {

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", MozOsxFontSmoothing: "grayscale",
WebkitTextSizeAdjust: "100%", WebkitTextSizeAdjust: "100%",
backgroundColor: theme.backgroundColor.light, backgroundColor: theme.backgroundColor.light,
overflow: "hidden",
[mq.dark]: { [mq.dark]: {
backgroundColor: theme.backgroundColor.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() { export function MainLayout() {
return <div></div>; return (
<LayoutContainer>
<WindowMoveHandler />
</LayoutContainer>
);
} }

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