diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2ead28c..b0b12fa 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -414,5 +414,17 @@ "Tour-Text": { "message": "Click me to run the onboarding tours", "description": "The text of the Tour-Text" + }, + "Page-Reload": { + "message": "Page Reload", + "description": "The text of the Page-Reload" + }, + "Data-Update": { + "message": "Data Update", + "description": "The text of the Data-Update" + }, + "Tour-Tip": { + "message": "The operation is successful. The onboarding tours will be run the next time you open the client", + "description": "The text of the Tour-Tip" } } diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 65a8c30..8196a6b 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -414,5 +414,17 @@ "Tour-Text": { "message": "点我以下次运行漫游式引导", "description": "The text of the Tour-Text" + }, + "Page-Reload": { + "message": "页面刷新", + "description": "The text of the Page-Reload" + }, + "Data-Update": { + "message": "更新数据", + "description": "The text of the Data-Update" + }, + "Tour-Tip": { + "message": "操作成功,下次打开客户端时将会运行漫游式引导", + "description": "The text of the Tour-Tip" } } diff --git a/src/main/main.ts b/src/main/main.ts index 88f3f06..5be45cf 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -318,7 +318,7 @@ const controllers = new Map(); // defer actions Promise.resolve().then(() => { - if (platform === "win32") { + if (platform !== "darwin") { ipcMain.on("window:close", (_event) => { mainWindow && mainWindow.close(); }); diff --git a/src/renderer/src/components/theme-customizer.tsx b/src/renderer/src/components/theme-customizer.tsx index 9849fbf..00deeab 100644 --- a/src/renderer/src/components/theme-customizer.tsx +++ b/src/renderer/src/components/theme-customizer.tsx @@ -2,7 +2,7 @@ import { Button, Label, Popover, PopoverContent, PopoverTrigger } from "./ui"; import { CheckIcon, ColorWheelIcon } from "@radix-ui/react-icons"; import { cn } from "@renderer/lib/utils"; -import { useAppContext } from "@renderer/app-context"; +import { useAppContext, useI18n } from "@renderer/app-context"; const themes = [ { @@ -105,11 +105,12 @@ const themes = [ export function ThemeCustomizer() { const { theme: mode, color, setColor } = useAppContext(); + const i18n = useI18n(); return ( - @@ -118,7 +119,7 @@ export function ThemeCustomizer() { className="z-40 w-[340px] rounded-[0.5rem] bg-white p-3 dark:bg-zinc-950" >
- +
{themes.map(({ name, label, activeColor }) => { const isActive = color === name; diff --git a/src/renderer/src/pages/home/index.tsx b/src/renderer/src/pages/home/index.tsx index 0a0f3fe..38e606a 100644 --- a/src/renderer/src/pages/home/index.tsx +++ b/src/renderer/src/pages/home/index.tsx @@ -3,6 +3,7 @@ import "./intro.css"; import { useState, useEffect, useMemo } from "react"; import { Outlet, Link, useLocation } from "react-router-dom"; import { + Button, NavigationMenu, NavigationMenuItem, NavigationMenuLink, @@ -10,7 +11,7 @@ import { navigationMenuTriggerStyle } from "@renderer/components/ui"; import { ThemeCustomizer } from "@renderer/components/theme-customizer"; -import { RocketIcon, HeartIcon, FaceIcon } from "@radix-ui/react-icons"; +import { RocketIcon, HeartIcon, FaceIcon, MinusIcon, Cross2Icon } from "@radix-ui/react-icons"; import { Updater } from "./updater"; import { Setting } from "./setting"; import { Tip } from "./tip"; @@ -346,39 +347,106 @@ const Home: React.FC = () => { return ( <> -
- - - - - - {i18n("Versions")} - - - - - - - {i18n("Installed")} - - - - - - - {i18n("Projects")} - - - - - -
- {platform === "win32" ? : null} - - - -
-
+ {platform === "darwin" ? ( +
+ + + + + + {i18n("Versions")} + + + + + + + {i18n("Installed")} + + + + + + + {i18n("Projects")} + + + + + +
+ + + +
+
+ ) : ( +
+
+
+ +
+ + + + + + {i18n("Versions")} + + + + + + + {i18n("Installed")} + + + + + + + {i18n("Projects")} + + + + + +
+
+ {platform === "win32" ? : null} + + + +
+
+ )}
diff --git a/src/renderer/src/pages/home/tip.tsx b/src/renderer/src/pages/home/tip.tsx index adeb0a3..94989d4 100644 --- a/src/renderer/src/pages/home/tip.tsx +++ b/src/renderer/src/pages/home/tip.tsx @@ -10,6 +10,7 @@ import { } from "@renderer/components/ui"; import { CookieIcon, InfoCircledIcon } from "@radix-ui/react-icons"; import { useAppContext, useI18n } from "@src/renderer/src/app-context"; +import { toast } from "sonner"; export function Tip() { const { locale } = useAppContext(); @@ -292,6 +293,7 @@ export function Tip() { icon={} onClick={() => { localStorage.removeItem("nvmd-first"); + toast.success(i18n("Tour-Tip")); }} > {i18n("Tour-Text")} diff --git a/src/renderer/src/pages/installed/index.tsx b/src/renderer/src/pages/installed/index.tsx index efe6733..b7ca58f 100644 --- a/src/renderer/src/pages/installed/index.tsx +++ b/src/renderer/src/pages/installed/index.tsx @@ -338,7 +338,7 @@ export const Component: React.FC = () => {
)} diff --git a/src/renderer/src/pages/projects/index.tsx b/src/renderer/src/pages/projects/index.tsx index 73d68cc..5592880 100644 --- a/src/renderer/src/pages/projects/index.tsx +++ b/src/renderer/src/pages/projects/index.tsx @@ -74,6 +74,7 @@ export const Component: React.FC = () => { { accessorKey: "sort", maxSize: 50, + enableHiding: false, header: () => null }, { @@ -247,7 +248,7 @@ export const Component: React.FC = () => {