-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
647 additions
and
475 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","webview:allow-print","app:default","image:default","resources:default","menu:default","tray:default","shell:allow-open","fs:default","fs:write-all",{"identifier":"fs:scope","allow":[{"path":"**"}]},"shell:default","dialog:allow-save","dialog:allow-message","dialog:allow-open","dialog:allow-confirm","os:allow-platform","os:allow-version","os:allow-os-type","os:allow-family","os:allow-arch","os:allow-exe-extension","os:allow-locale","os:allow-hostname","window:allow-start-dragging","window:allow-set-fullscreen","updater:default","process:default","clipboard-manager:default","clipboard-manager:allow-write-text"]}} | ||
{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","window:allow-start-dragging","webview:allow-print","app:default","image:default","resources:default","menu:default","tray:default","shell:allow-open","fs:default","fs:write-all",{"identifier":"fs:scope","allow":[{"path":"**"}]},"shell:default","dialog:allow-save","dialog:allow-message","dialog:allow-open","dialog:allow-confirm","os:allow-platform","os:allow-version","os:allow-os-type","os:allow-family","os:allow-arch","os:allow-exe-extension","os:allow-locale","os:allow-hostname","window:allow-start-dragging","window:allow-set-fullscreen","window:allow-minimize","window:allow-close","window:allow-maximize","updater:default","process:default","clipboard-manager:default","clipboard-manager:allow-write-text"]}} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"app": { | ||
"windows": [ | ||
{ | ||
"fullscreen": false, | ||
"height": 780, | ||
"resizable": true, | ||
"title": "MDX Editor", | ||
"hiddenTitle": true, | ||
"width": 1200, | ||
"titleBarStyle": "Overlay", | ||
"dragDropEnabled": true, | ||
"decorations": true | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import React from 'react' | ||
import { getCurrent } from '@tauri-apps/api/window' | ||
import type { SVGProps } from 'react' | ||
|
||
import { isMacOS } from './utils/file-tree-util' | ||
|
||
export function MdiWindowMinimize(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="1em" | ||
height="1em" | ||
viewBox="0 0 24 24" | ||
{...props} | ||
> | ||
<path fill="currentColor" d="M20 14H4v-4h16"></path> | ||
</svg> | ||
) | ||
} | ||
|
||
export function MdiWindowMaximize(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="1em" | ||
height="1em" | ||
viewBox="0 0 24 24" | ||
{...props} | ||
> | ||
<path fill="currentColor" d="M4 4h16v16H4zm2 4v10h12V8z"></path> | ||
</svg> | ||
) | ||
} | ||
|
||
export function MdiClose(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="1em" | ||
height="1em" | ||
viewBox="0 0 22 22" | ||
{...props} | ||
> | ||
<path | ||
fill="none" | ||
stroke="currentColor" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={2.5} | ||
d="m7 7l10 10M7 17L17 7" | ||
></path> | ||
</svg> | ||
) | ||
} | ||
export default function TitleBar() { | ||
if (isMacOS) { | ||
return <div data-tauri-drag-region className="h-6" /> | ||
} | ||
return ( | ||
<div | ||
data-tauri-drag-region | ||
className="h-[30px] flex justify-end select-none" | ||
> | ||
<div | ||
onClick={() => getCurrent().minimize()} | ||
className="w-[30px] h-[30px] inline-flex justify-center items-center cursor-pointer" | ||
> | ||
<MdiWindowMinimize /> | ||
</div> | ||
<div | ||
onClick={() => getCurrent().maximize()} | ||
className="w-[30px] h-[30px] inline-flex justify-center items-center cursor-pointer" | ||
> | ||
<MdiWindowMaximize /> | ||
</div> | ||
<div | ||
onClick={() => getCurrent().close()} | ||
className="w-[30px] h-[30px] inline-flex justify-center items-center cursor-pointer" | ||
> | ||
<MdiClose /> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters