diff --git a/package.json b/package.json index cfa660b..6bf7b21 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "license": "MIT", "dependencies": { "@hope-ui/solid": "^0.6.7", + "@radix-ui/colors": "^0.1.8", "@stitches/core": "^1.2.8", "libaria2-ts": "^1.0.91", "path-browserify": "^1.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ab8aca..3464b3b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,6 +3,7 @@ lockfileVersion: 5.4 specifiers: '@hope-ui/solid': ^0.6.7 '@neutralinojs/neu': ^9.4.0 + '@radix-ui/colors': ^0.1.8 '@shockpkg/icon-encoder': ^2.1.3 '@stitches/core': ^1.2.8 '@types/node': ^18.7.10 @@ -24,6 +25,7 @@ specifiers: dependencies: '@hope-ui/solid': 0.6.7_tpawkszxxy4bgl6v3sggaqe6vi + '@radix-ui/colors': 0.1.8 '@stitches/core': 1.2.8 libaria2-ts: 1.0.91 path-browserify: 1.0.1 @@ -497,6 +499,10 @@ packages: fastq: 1.15.0 dev: true + /@radix-ui/colors/0.1.8: + resolution: {integrity: sha512-jwRMXYwC0hUo0mv6wGpuw254Pd9p/R6Td5xsRpOmaWkUHlooNWqVcadgyzlRumMq3xfOTXwJReU0Jv+EIy4Jbw==} + dev: false + /@shockpkg/icon-encoder/2.1.3: resolution: {integrity: sha512-JFyoQerf51EB6+UyqnyxE2yhKGw/WIo1W6wZE/S7+OBMno+r7zFP+OPZgUewSCZMwHFHhXZ9fX8OyNGomp2fZg==} engines: {node: '>=14.15.0'} diff --git a/src/index.tsx b/src/index.tsx index 9effcd3..3f66c2f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,10 +1,15 @@ import { render } from "solid-js/web"; import { createApp } from "./app"; import { HopeProvider } from "@hope-ui/solid"; +import { amber } from "@radix-ui/colors"; import "./styles.css"; import { fatal } from "./utils"; +function createPlates(tag: string, color: any, colortag:string) { + return Object.fromEntries((new Array(12)).fill(1).map((_,i)=>[`${tag}${i+1}`,color[`${colortag}${i+1}`] as string] as const)); +} + if (typeof Neutralino == "undefined") { console.log(`This app doesn't work on browser.`); } else { @@ -16,7 +21,13 @@ if (typeof Neutralino == "undefined") { .then((UI) => { render( () => ( - + ), diff --git a/src/launcher.tsx b/src/launcher.tsx index c7e10b2..24cc6a6 100644 --- a/src/launcher.tsx +++ b/src/launcher.tsx @@ -2,6 +2,33 @@ import { Aria2 } from "./aria2"; import { Wine } from "./wine"; import { CN_SERVER, ServerContentData } from "./constants/server"; import { waitImageReady } from "./utils"; +import { + Box, + Button, + ButtonGroup, + Center, + Flex, + HStack, + IconButton, + Progress, + ProgressIndicator, + Spacer, + VStack, +} from "@hope-ui/solid"; +import { createIcon } from "@hope-ui/solid"; + +const IconSetting = createIcon({ + viewBox: "0 0 1024 1024", + path() { + return ( + + ); + }, +}); export async function createLauncher({ aria2, @@ -36,9 +63,22 @@ export async function createLauncher({ width: `${bw}px`, //fixme: responsive size }} > -
- 启动游戏 -
+ + + +

Status

+ + + +
+ + + + } /> + + +
+
); };