diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 4575983..dbb56ab 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -59,7 +59,8 @@ "height": 600, "resizable": true, "title": "Cultivation", - "width": 800 + "width": 800, + "decorations": false } ] } diff --git a/src/ui/App.css b/src/ui/App.css index 74b5e05..76bb664 100644 --- a/src/ui/App.css +++ b/src/ui/App.css @@ -1,38 +1,19 @@ -.App { - text-align: center; +body { + user-select: none; } -.App-logo { - height: 40vmin; - pointer-events: none; +.TopButton { + height: 60%; + margin: 0px 10px; + filter: invert(95%) sepia(0%) saturate(18%) hue-rotate(153deg) brightness(88%) contrast(81%); + + transition: filter 0.1s ease-in-out; } -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } +.TopButton:hover { + filter: invert(100%) sepia(0%) saturate(18%) hue-rotate(153deg) brightness(100%) contrast(100%); } -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} +.TopButton img { + height: 80%; +} \ No newline at end of file diff --git a/src/ui/components/TopBar.css b/src/ui/components/TopBar.css index a7a5131..e935d20 100644 --- a/src/ui/components/TopBar.css +++ b/src/ui/components/TopBar.css @@ -1,6 +1,6 @@ .TopBar { display: flex; - flex-direction: row; + flex-direction: row-reverse; align-items: center; width: 100%; height: 34px; diff --git a/src/ui/components/TopBar.tsx b/src/ui/components/TopBar.tsx index 76013c5..c07994e 100644 --- a/src/ui/components/TopBar.tsx +++ b/src/ui/components/TopBar.tsx @@ -1,15 +1,31 @@ import React from 'react' +import { appWindow } from '@tauri-apps/api/window' import './TopBar.css' +import closeIcon from '../../resources/icons/close.svg' +import minIcon from '../../resources/icons/min.svg' export default class TopBar extends React.Component { constructor(props: unknown[]) { super(props) } + handleClose() { + appWindow.close() + } + + handleMinimize() { + appWindow.minimize() + } + render() { return ( -
- TOP BAR BABY +
+
+ close +
+
+ minimize +
) }