3 Commits

Author SHA1 Message Date
typist
d553c3e04c 0.0.17
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m1s
2025-10-29 08:27:15 +08:00
typist
e2da2758cc chore: simplify build script in package.json
- Removed sitemap generation step from the build script for a more streamlined build process.
2025-10-29 08:27:00 +08:00
typist
3ab70498e6 feat: add ModeToggle component to layout and sidebar
- Integrated ModeToggle component into the layout for theme switching.
- Replaced the existing button in the sidebar footer with SidebarMenuButton for improved styling and functionality.
2025-10-29 08:26:26 +08:00
3 changed files with 11 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
{ {
"name": "litek", "name": "litek",
"private": true, "private": true,
"version": "0.0.16", "version": "0.0.17",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "npm run generate:sitemap && tsc -b && vite build", "build": "tsc -b && vite build",
"generate:sitemap": "tsx scripts/generate-sitemap.ts", "generate:sitemap": "tsx scripts/generate-sitemap.ts",
"lint": "eslint .", "lint": "eslint .",
"preview": "vite preview", "preview": "vite preview",

View File

@@ -1,11 +1,11 @@
import type { ReactNode } from "react"; import type { ReactNode } from "react";
import { Link } from "react-router-dom";
import { ChevronRight } from "lucide-react";
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenuButton, SidebarMenuItem, SidebarMenu, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton } from "@/components/ui/sidebar"; import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenuButton, SidebarMenuItem, SidebarMenu, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton } from "@/components/ui/sidebar";
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/ui/collapsible"; import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/ui/collapsible";
import { tools, type Tool } from "@/components/tool"; import { tools, type Tool } from "@/components/tool";
import { Link } from "react-router-dom";
import { ModeToggle } from "@/components/theme/toggle";
import { Button } from "../ui/button";
import { ChevronRight } from "lucide-react";
export const AppSidebar = () => { export const AppSidebar = () => {
// 递归构建完整路径 // 递归构建完整路径
@@ -88,10 +88,9 @@ export const AppSidebar = () => {
</SidebarGroup> </SidebarGroup>
</SidebarContent> </SidebarContent>
<SidebarFooter className="flex flex-row justify-between items-center gap-2"> <SidebarFooter className="flex flex-row justify-between items-center gap-2">
<Button variant="link"> <SidebarMenuButton variant="outline" asChild>
<a href="mailto:litek@mail.typist.cc">need more tools?</a> <a href="mailto:litek@mail.typist.cc">need more tools?</a>
</Button> </SidebarMenuButton>
<ModeToggle />
</SidebarFooter> </SidebarFooter>
</Sidebar> </Sidebar>
); );

View File

@@ -4,6 +4,8 @@ import { Outlet } from "react-router-dom";
import { ThemeProvider } from "@/components/theme/provider" import { ThemeProvider } from "@/components/theme/provider"
import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar" import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"
import { AppSidebar } from "@/components/sidebar"; import { AppSidebar } from "@/components/sidebar";
import { ModeToggle } from "@/components/theme/toggle";
import { useSEO } from "@/hooks/use-seo"; import { useSEO } from "@/hooks/use-seo";
export const Layout: FC = () => { export const Layout: FC = () => {
@@ -17,7 +19,7 @@ export const Layout: FC = () => {
<div className="p-4 flex flex-col w-full h-[100vh] overflow-hidden"> <div className="p-4 flex flex-col w-full h-[100vh] overflow-hidden">
<nav className="flex items-center justify-between"> <nav className="flex items-center justify-between">
<SidebarTrigger className="size-10" /> <SidebarTrigger className="size-10" />
<div role="actions" /> <ModeToggle />
</nav> </nav>
<main className="flex-1 overflow-auto p-4 overflow-hidden"> <main className="flex-1 overflow-auto p-4 overflow-hidden">
<Outlet /> <Outlet />