From a2cdb40b3b0af63f2df1458d1243ec3672427c96 Mon Sep 17 00:00:00 2001 From: yuruo Date: Thu, 13 Jun 2024 17:28:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=B7=BB=E5=8A=A0(ui/autoMate)?= =?UTF-8?q?=EF=BC=9A=E5=9C=A8Config=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0Cat?= =?UTF-8?q?egory=E5=AD=90=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=B9=B6=E8=AE=BE?= =?UTF-8?q?=E4=B8=BA=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20=F0=9F=93=9D=20=E6=96=B0=E5=BB=BA(ui/autoMate)=EF=BC=9A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0Category=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=96=87=E4=BB=B6=E5=92=8C=E7=BB=84=E4=BB=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6=20=F0=9F=94=A7=20=E6=9B=B4=E6=96=B0(ui/autoMate)?= =?UTF-8?q?=EF=BC=9A=E6=9B=B4=E6=96=B0Config=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=96=87=E4=BB=B6=EF=BC=8C=E8=AE=BE=E7=BD=AEnav?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=B8=BAborder-r=20border-t=20=F0=9F=94=A7?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9(ui/autoMate)=EF=BC=9A=E5=9C=A8window.ts?= =?UTF-8?q?=E4=B8=AD=E4=BF=AE=E6=94=B9frame=E5=92=8Ctransparent=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/autoMate/src/main/config/window.ts | 4 ++-- .../renderer/src/pages/Category/category.scss | 22 +++++++++++++++++++ .../src/renderer/src/pages/Category/index.tsx | 11 ++++++++++ .../src/renderer/src/pages/Config/index.tsx | 10 +++------ .../src/pages/Config/styles.module.scss | 2 +- ui/autoMate/src/renderer/src/router/index.tsx | 10 ++++++++- 6 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 ui/autoMate/src/renderer/src/pages/Category/category.scss create mode 100644 ui/autoMate/src/renderer/src/pages/Category/index.tsx diff --git a/ui/autoMate/src/main/config/window.ts b/ui/autoMate/src/main/config/window.ts index 0022588..7a6869b 100644 --- a/ui/autoMate/src/main/config/window.ts +++ b/ui/autoMate/src/main/config/window.ts @@ -11,8 +11,8 @@ export function createWindow(): BrowserWindow { // Create the browser window. height: 750, center: true, show: false, - // frame: false, - // transparent: true, + frame: true, + transparent: false, // alwaysOnTop: true, autoHideMenuBar: true, ...(process.platform === 'linux' ? { icon } : {}), diff --git a/ui/autoMate/src/renderer/src/pages/Category/category.scss b/ui/autoMate/src/renderer/src/pages/Category/category.scss new file mode 100644 index 0000000..2306d5f --- /dev/null +++ b/ui/autoMate/src/renderer/src/pages/Category/category.scss @@ -0,0 +1,22 @@ +.category-page{ + @apply w-screen h-screen; + display: grid; + grid-template: + "categories content" auto + "nav content" 30px/120px auto; + + + .categories{ + @apply border-r; + grid-area: categories; + } + + .nav { + @apply border-t border-r; + grid-area: nav; + } + + .content { + grid-area: content; + } +} \ No newline at end of file diff --git a/ui/autoMate/src/renderer/src/pages/Category/index.tsx b/ui/autoMate/src/renderer/src/pages/Category/index.tsx new file mode 100644 index 0000000..400c5b6 --- /dev/null +++ b/ui/autoMate/src/renderer/src/pages/Category/index.tsx @@ -0,0 +1,11 @@ +import "./category.scss" + +export const Category = () => { + return ( +
+
categories
+
nav
+
content
+
+ ) +} \ No newline at end of file diff --git a/ui/autoMate/src/renderer/src/pages/Config/index.tsx b/ui/autoMate/src/renderer/src/pages/Config/index.tsx index 9e1f72e..36371b5 100644 --- a/ui/autoMate/src/renderer/src/pages/Config/index.tsx +++ b/ui/autoMate/src/renderer/src/pages/Config/index.tsx @@ -1,12 +1,8 @@ -import styles from "./styles.module.scss" +import { Outlet } from "react-router-dom" export default function Config(){ return ( -
-
-
-
-
-
+
+
) } diff --git a/ui/autoMate/src/renderer/src/pages/Config/styles.module.scss b/ui/autoMate/src/renderer/src/pages/Config/styles.module.scss index 695b109..988b546 100644 --- a/ui/autoMate/src/renderer/src/pages/Config/styles.module.scss +++ b/ui/autoMate/src/renderer/src/pages/Config/styles.module.scss @@ -25,7 +25,7 @@ } &.nav { grid-area: nav; - @apply border-r; + @apply border-r border-t; } } } \ No newline at end of file diff --git a/ui/autoMate/src/renderer/src/router/index.tsx b/ui/autoMate/src/renderer/src/router/index.tsx index 5e79a0f..97d42a3 100644 --- a/ui/autoMate/src/renderer/src/router/index.tsx +++ b/ui/autoMate/src/renderer/src/router/index.tsx @@ -1,6 +1,7 @@ import Config from "@renderer/pages/Config"; import Home from "@renderer/pages/Home"; import { createHashRouter } from "react-router-dom"; +import {Category} from "@renderer/pages/Category"; const router = createHashRouter([ { @@ -9,7 +10,14 @@ const router = createHashRouter([ }, { path: "config", - element: + element: , + children: [ + { + // 界面第一次打开时,默认显示的页面 + index: true, + element: + } + ] } ]) export default router