diff --git a/bun.lockb b/bun.lockb index 71b1573..a0f27ec 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index aa15660..393f779 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "framer-motion": "^12.5.0", "jotai": "^2.12.2", "next": "15.2.0", + "next-themes": "^0.4.6", "react": "^19.0.0", "react-dom": "^19.0.0", "tauri-plugin-valtio": "1.1.1", diff --git a/src-tauri/gen/schemas/windows-schema.json b/src-tauri/gen/schemas/windows-schema.json index 265f9b7..5ee568d 100644 --- a/src-tauri/gen/schemas/windows-schema.json +++ b/src-tauri/gen/schemas/windows-schema.json @@ -84,7 +84,7 @@ } }, "permissions": { - "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```", + "description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```", "type": "array", "items": { "$ref": "#/definitions/PermissionEntry" @@ -5598,6 +5598,211 @@ "description": "Denies the values command without any pre-configured scope.", "type": "string", "const": "store:deny-values" + }, + { + "description": "Default permissions for tauri-plugin-valtio.", + "type": "string", + "const": "valtio:default" + }, + { + "description": "Enables the clear_autosave command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-clear-autosave" + }, + { + "description": "Enables the get_default_save_strategy command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-get-default-save-strategy" + }, + { + "description": "Enables the get_save_strategy command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-get-save-strategy" + }, + { + "description": "Enables the get_store_ids command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-get-store-ids" + }, + { + "description": "Enables the get_store_path command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-get-store-path" + }, + { + "description": "Enables the get_store_state command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-get-store-state" + }, + { + "description": "Enables the get_valtio_path command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-get-valtio-path" + }, + { + "description": "Enables the load command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-load" + }, + { + "description": "Enables the patch command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-patch" + }, + { + "description": "Enables the save command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-save" + }, + { + "description": "Enables the save_all command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-save-all" + }, + { + "description": "Enables the save_all_now command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-save-all-now" + }, + { + "description": "Enables the save_now command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-save-now" + }, + { + "description": "Enables the save_some command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-save-some" + }, + { + "description": "Enables the save_some_now command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-save-some-now" + }, + { + "description": "Enables the set_autosave command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-set-autosave" + }, + { + "description": "Enables the set_save_strategy command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-set-save-strategy" + }, + { + "description": "Enables the set_store_options command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-set-store-options" + }, + { + "description": "Enables the set_valtio_path command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-set-valtio-path" + }, + { + "description": "Enables the unload command without any pre-configured scope.", + "type": "string", + "const": "valtio:allow-unload" + }, + { + "description": "Denies the clear_autosave command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-clear-autosave" + }, + { + "description": "Denies the get_default_save_strategy command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-get-default-save-strategy" + }, + { + "description": "Denies the get_save_strategy command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-get-save-strategy" + }, + { + "description": "Denies the get_store_ids command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-get-store-ids" + }, + { + "description": "Denies the get_store_path command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-get-store-path" + }, + { + "description": "Denies the get_store_state command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-get-store-state" + }, + { + "description": "Denies the get_valtio_path command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-get-valtio-path" + }, + { + "description": "Denies the load command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-load" + }, + { + "description": "Denies the patch command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-patch" + }, + { + "description": "Denies the save command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-save" + }, + { + "description": "Denies the save_all command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-save-all" + }, + { + "description": "Denies the save_all_now command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-save-all-now" + }, + { + "description": "Denies the save_now command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-save-now" + }, + { + "description": "Denies the save_some command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-save-some" + }, + { + "description": "Denies the save_some_now command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-save-some-now" + }, + { + "description": "Denies the set_autosave command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-set-autosave" + }, + { + "description": "Denies the set_save_strategy command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-set-save-strategy" + }, + { + "description": "Denies the set_store_options command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-set-store-options" + }, + { + "description": "Denies the set_valtio_path command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-set-valtio-path" + }, + { + "description": "Denies the unload command without any pre-configured scope.", + "type": "string", + "const": "valtio:deny-unload" } ] }, diff --git a/src/app/globals.css b/src/app/globals.css index cf2eba9..8c70949 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -10,8 +10,6 @@ body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; - /* background: transparent; */ - background: rgba(242, 241, 243, 0.65); border-radius: 10px; } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 65eacb0..4a25a88 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -15,7 +15,7 @@ export default function RootLayout({ }) { return ( - + {children} diff --git a/src/app/providers.tsx b/src/app/providers.tsx index b48cebe..46eb2b3 100644 --- a/src/app/providers.tsx +++ b/src/app/providers.tsx @@ -1,12 +1,15 @@ "use client" import { HeroUIProvider } from "@heroui/react" import { ToastProvider } from "@heroui/toast" +import { ThemeProvider as NextThemesProvider } from "next-themes" export default function Providers({ children }: { children: React.ReactNode }) { return ( - - {children} + + + {children} + ) } diff --git a/src/components/cstb/LaunchOption.tsx b/src/components/cstb/LaunchOption.tsx index 93d79a3..9bd285a 100644 --- a/src/components/cstb/LaunchOption.tsx +++ b/src/components/cstb/LaunchOption.tsx @@ -3,15 +3,16 @@ import { Plus, SettingConfig, Switch } from "@icon-park/react" import { Card, CardBody, CardHeader, CardIcon, CardTool } from "../window/Card" import { ToolButton } from "../window/ToolButton" import { useSnapshot } from "valtio" -import { useEffect, useState } from "react" +import { use, useEffect, useState } from "react" const LaunchOption = () => { - toolStore.start() - const { launchOptions, launchIndex } = useSnapshot(toolStore.state) - const [currentLaunchOption, setCurrentLaunchOption] = useState(launchOptions[0]) useEffect(() => { - setCurrentLaunchOption(launchOptions[launchIndex] || '') - }, [launchIndex]) + ;async () => { + toolStore.start() + } + }, []) + + const { launchOptions, launchIndex } = useSnapshot(toolStore.state) return ( @@ -36,11 +37,10 @@ const LaunchOption = () => {