diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 087f43e..33a95f8 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -32,7 +32,7 @@ pub fn run() { // After splash animation, close splash and show main let handle = app.handle().clone(); tauri::async_runtime::spawn(async move { - tokio::time::sleep(std::time::Duration::from_secs(8)).await; + tokio::time::sleep(std::time::Duration::from_secs(4)).await; // Close splash screen if let Some(splash) = handle.get_webview_window("splashscreen") { diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 7386c74..23061a3 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -13,7 +13,7 @@ "windows": [ { "label": "splashscreen", - "title": "正在启动", + "title": "Koring Launcher", "url": "/splash.html", "width": 480, "height": 320, @@ -30,10 +30,13 @@ { "label": "main", "title": "Koring Launcher", - "width": 800, + "width": 900, "height": 600, + "minWidth": 800, + "minHeight": 600, "decorations": false, "transparent": true, + "center": true, "visible": false } ], @@ -45,8 +48,7 @@ "active": true, "targets": "all", "icon": [ - "icons/icon.png", - "icons/icon.ico" + "icons/icon.png" ], "externalBin": [ "binaries/koring-sidecar" diff --git a/src/components/background/BackgroundLayer.tsx b/src/components/background/BackgroundLayer.tsx index 3d1ba0b..0d80e5b 100644 --- a/src/components/background/BackgroundLayer.tsx +++ b/src/components/background/BackgroundLayer.tsx @@ -1,10 +1,15 @@ import { useEffect } from "react"; import { useBackgroundStore } from "@/stores/backgroundStore"; +import { useRouteStore } from "@/stores/routeStore"; +import { useDevStore } from "@/stores/devStore"; const DEFAULT_BG = "/background.png"; export function BackgroundLayer() { const { type, image, color, blur, opacity, animationSpeed, fetchConfig } = useBackgroundStore(); + const route = useRouteStore((s) => s.current); + const forceDisableContentBlur = useDevStore((s) => s.forceDisableContentBlur); + const inSetting = route === "setting" || route === "debug"; useEffect(() => { fetchConfig(); @@ -77,6 +82,7 @@ export function BackgroundLayer() { } `}
+ {inSetting && !forceDisableContentBlur && } > ); diff --git a/src/components/splash/Splash.tsx b/src/components/splash/Splash.tsx index 8cb1d9c..e254add 100644 --- a/src/components/splash/Splash.tsx +++ b/src/components/splash/Splash.tsx @@ -7,7 +7,7 @@ export default function Splash() { useEffect(() => { const t1 = setTimeout(() => setPhase("visible"), 50); - const t2 = setTimeout(() => setPhase("exit"), 7500); + const t2 = setTimeout(() => setPhase("exit"), 3500); return () => { clearTimeout(t1); clearTimeout(t2); }; }, []); diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx new file mode 100644 index 0000000..b20959d --- /dev/null +++ b/src/components/ui/badge.tsx @@ -0,0 +1,52 @@ +import { mergeProps } from "@base-ui/react/merge-props" +import { useRender } from "@base-ui/react/use-render" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80", + secondary: + "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80", + destructive: + "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20", + outline: + "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground", + ghost: + "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50", + link: "text-primary underline-offset-4 hover:underline", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Badge({ + className, + variant = "default", + render, + ...props +}: useRender.ComponentProps<"span"> & VariantProps游戏高级选项与调试参数
+管理 Minecraft 账户与游戏档案
+设置游戏安装与存档目录
+配置 Java 路径与内存分配
+Koring Launcher 版本信息
+管理你的 Koring 账户
+开源协议与版权信息
+设置启动器主页显示内容
+, component: 启动器设置与配置
-下载源与并发数设置
+以太联机服务配置
+安全验证与身份识别设置
+陶瓦联机服务配置
+{label}
+{desc}
+提交反馈与问题报告
+支持 Koring Launcher 的开发
+{label}
+{desc}
+选择界面显示语言
+{label}
+ {desc &&{desc}
} +自定义主界面布局与显示
+