feat(frontend): 对齐工作区布局与 toaster/command palette
This commit is contained in:
parent
d0be23b8fb
commit
687c1a056b
|
|
@ -3,9 +3,9 @@
|
||||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
import { useCallback, useEffect, useLayoutEffect, useState } from "react";
|
import { useCallback, useEffect, useLayoutEffect, useState } from "react";
|
||||||
|
import { Toaster } from "sonner";
|
||||||
|
|
||||||
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
|
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
|
||||||
import { CommandPalette } from "@/components/workspace/command-palette";
|
import { CommandPalette } from "@/components/workspace/command-palette";
|
||||||
import { WorkspaceSidebar } from "@/components/workspace/workspace-sidebar";
|
import { WorkspaceSidebar } from "@/components/workspace/workspace-sidebar";
|
||||||
import { getLocalSettings, useLocalSettings } from "@/core/settings";
|
import { getLocalSettings, useLocalSettings } from "@/core/settings";
|
||||||
|
|
@ -47,34 +47,7 @@ export default function WorkspaceLayout({
|
||||||
<SidebarInset className="min-w-0">{children}</SidebarInset>
|
<SidebarInset className="min-w-0">{children}</SidebarInset>
|
||||||
</SidebarProvider>
|
</SidebarProvider>
|
||||||
<CommandPalette />
|
<CommandPalette />
|
||||||
<Toaster
|
<Toaster position="top-center" />
|
||||||
position="top-center"
|
|
||||||
toastOptions={{
|
|
||||||
duration: 2200,
|
|
||||||
classNames: {
|
|
||||||
toast: [
|
|
||||||
/* 灰色圆角矩形容器 */
|
|
||||||
"rounded-[20px] border-none",
|
|
||||||
/* 浅灰色背景 + 轻微透明 */
|
|
||||||
"bg-[#999999]! backdrop-blur-sm",
|
|
||||||
/* 阴影极轻 */
|
|
||||||
"shadow-[0_2px_12px_0_rgba(0,0,0,0.18)]",
|
|
||||||
/* 内边距:宽松居中 */
|
|
||||||
"px-5 py-2.5",
|
|
||||||
/* 单行布局,内容水平居中 */
|
|
||||||
"flex items-center justify-center gap-0",
|
|
||||||
/* 整体文字样式 */
|
|
||||||
"text-white text-sm font-normal font-sans",
|
|
||||||
/* 去掉 icon 区域间距 */
|
|
||||||
"[&>[data-icon]]:hidden",
|
|
||||||
].join(" "),
|
|
||||||
title:
|
|
||||||
"text-white! text-sm font-normal text-center w-full leading-snug",
|
|
||||||
description: "hidden",
|
|
||||||
icon: "hidden",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue