feat: change zinc theme
This commit is contained in:
parent
49e73308f6
commit
57fd8def59
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# 分析失败处理机制
|
||||||
|
|
||||||
|
- 分割阶段
|
||||||
|
- 测量阶段
|
||||||
|
|
||||||
|
# 解剖结构 - 模型的关系 1:1 or 1:n
|
||||||
|
|
||||||
|
- 换版本重新测量
|
||||||
|
-
|
|
@ -29,7 +29,7 @@ process.env.VITE_PUBLIC = VITE_DEV_SERVER_URL
|
||||||
let win: BrowserWindow | null;
|
let win: BrowserWindow | null;
|
||||||
let tray: Tray | null = null;
|
let tray: Tray | null = null;
|
||||||
let pythonManager: PythonManager | null;
|
let pythonManager: PythonManager | null;
|
||||||
const theme: "dark" | "light" = "dark";
|
const theme: "dark" | "light" = "light";
|
||||||
|
|
||||||
const themeTitleBarStyles = {
|
const themeTitleBarStyles = {
|
||||||
dark: { color: "rgb(32,32,32)", symbolColor: "#fff" },
|
dark: { color: "rgb(32,32,32)", symbolColor: "#fff" },
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
getSortedRowModel,
|
getSortedRowModel,
|
||||||
useReactTable,
|
useReactTable,
|
||||||
} from "@tanstack/react-table";
|
} from "@tanstack/react-table";
|
||||||
|
import { ArrowUpDown, ChevronDown, MoreHorizontal } from "lucide-react";
|
||||||
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Checkbox } from "@/components/ui/checkbox";
|
import { Checkbox } from "@/components/ui/checkbox";
|
||||||
|
@ -18,6 +19,9 @@ import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuCheckboxItem,
|
DropdownMenuCheckboxItem,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
|
@ -44,6 +48,16 @@ export type Series = {
|
||||||
filePaths: string[];
|
filePaths: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const columnsAlias: { [K in keyof Partial<Series>]: string } = {
|
||||||
|
PatientName: "姓名",
|
||||||
|
PatientAge: "年龄",
|
||||||
|
PatientSex: "性别",
|
||||||
|
SeriesInstanceUID: "序列UID",
|
||||||
|
filePaths: "层数",
|
||||||
|
createTime: "创建时间",
|
||||||
|
updateTime: "修改时间",
|
||||||
|
};
|
||||||
|
|
||||||
export const columns: ColumnDef<Series>[] = [
|
export const columns: ColumnDef<Series>[] = [
|
||||||
{
|
{
|
||||||
id: "select",
|
id: "select",
|
||||||
|
@ -68,36 +82,41 @@ export const columns: ColumnDef<Series>[] = [
|
||||||
enableHiding: false,
|
enableHiding: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: "PatientName",
|
||||||
accessorKey: "PatientName",
|
accessorKey: "PatientName",
|
||||||
header: "姓名",
|
header: columnsAlias["PatientName"],
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="capitalize">{row.getValue("PatientName")}</div>
|
<div className="capitalize">{row.getValue("PatientName")}</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: "PatientAge",
|
||||||
accessorKey: "PatientAge",
|
accessorKey: "PatientAge",
|
||||||
header: "年龄",
|
header: columnsAlias["PatientAge"],
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="capitalize">{row.getValue("PatientAge")}</div>
|
<div className="capitalize">{row.getValue("PatientAge")}</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: "PatientSex",
|
||||||
accessorKey: "PatientSex",
|
accessorKey: "PatientSex",
|
||||||
header: "性别",
|
header: columnsAlias["PatientSex"],
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="capitalize">{row.getValue("PatientSex")}</div>
|
<div className="capitalize">{row.getValue("PatientSex")}</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: "SeriesInstanceUID",
|
||||||
accessorKey: "SeriesInstanceUID",
|
accessorKey: "SeriesInstanceUID",
|
||||||
header: "序列UID",
|
header: columnsAlias["SeriesInstanceUID"],
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="capitalize">{row.getValue("SeriesInstanceUID")}</div>
|
<div className="capitalize">{row.getValue("SeriesInstanceUID")}</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: "filePaths",
|
||||||
accessorKey: "filePaths",
|
accessorKey: "filePaths",
|
||||||
header: "层数",
|
header: columnsAlias["filePaths"],
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="capitalize">
|
<div className="capitalize">
|
||||||
{(row.getValue("filePaths") as string[]).length}
|
{(row.getValue("filePaths") as string[]).length}
|
||||||
|
@ -105,8 +124,19 @@ export const columns: ColumnDef<Series>[] = [
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: "createTime",
|
||||||
accessorKey: "createTime",
|
accessorKey: "createTime",
|
||||||
header: "创建时间",
|
header: ({ column }) => {
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
onClick={() => column.toggleSorting(column.getIsSorted() === "asc")}
|
||||||
|
>
|
||||||
|
{columnsAlias["createTime"]}
|
||||||
|
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
},
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="capitalize">
|
<div className="capitalize">
|
||||||
{new Date(row.getValue("createTime")).toLocaleString()}
|
{new Date(row.getValue("createTime")).toLocaleString()}
|
||||||
|
@ -114,14 +144,45 @@ export const columns: ColumnDef<Series>[] = [
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
id: "updateTime",
|
||||||
accessorKey: "updateTime",
|
accessorKey: "updateTime",
|
||||||
header: "修改时间",
|
header: columnsAlias["updateTime"],
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="capitalize">
|
<div className="capitalize">
|
||||||
{new Date(row.getValue("updateTime")).toLocaleString()}
|
{new Date(row.getValue("updateTime")).toLocaleString()}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "actions",
|
||||||
|
header: "操作",
|
||||||
|
enableHiding: false,
|
||||||
|
cell: ({ row }) => {
|
||||||
|
const payment = row.original;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button variant="ghost" className="h-8 w-8 p-0">
|
||||||
|
<span className="sr-only">Open menu</span>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem
|
||||||
|
onClick={() => navigator.clipboard.writeText(payment.id)}
|
||||||
|
>
|
||||||
|
Copy payment ID
|
||||||
|
</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>View customer</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>View payment details</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export function SeriesTable() {
|
export function SeriesTable() {
|
||||||
|
@ -197,7 +258,7 @@ export function SeriesTable() {
|
||||||
column.toggleVisibility(!!value)
|
column.toggleVisibility(!!value)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{column.columnDef.header}
|
{columnsAlias[column.id]}
|
||||||
</DropdownMenuCheckboxItem>
|
</DropdownMenuCheckboxItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -12,27 +12,28 @@ body,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
:root {
|
:root {
|
||||||
--background: 0 0% 100%;
|
--background: 0 0% 100%;
|
||||||
--foreground: 240 10% 3.9%;
|
--foreground: 222.2 84% 4.9%;
|
||||||
--card: 0 0% 100%;
|
--card: 0 0% 100%;
|
||||||
--card-foreground: 240 10% 3.9%;
|
--card-foreground: 222.2 84% 4.9%;
|
||||||
--popover: 0 0% 100%;
|
--popover: 0 0% 100%;
|
||||||
--popover-foreground: 240 10% 3.9%;
|
--popover-foreground: 222.2 84% 4.9%;
|
||||||
--primary: 142.1 76.2% 36.3%;
|
--primary: 222.2 47.4% 11.2%;
|
||||||
--primary-foreground: 355.7 100% 97.3%;
|
--primary-foreground: 210 40% 98%;
|
||||||
--secondary: 240 4.8% 95.9%;
|
--secondary: 210 40% 96.1%;
|
||||||
--secondary-foreground: 240 5.9% 10%;
|
--secondary-foreground: 222.2 47.4% 11.2%;
|
||||||
--muted: 240 4.8% 95.9%;
|
--muted: 210 40% 96.1%;
|
||||||
--muted-foreground: 240 3.8% 46.1%;
|
--muted-foreground: 215.4 16.3% 46.9%;
|
||||||
--accent: 240 4.8% 95.9%;
|
--accent: 210 40% 96.1%;
|
||||||
--accent-foreground: 240 5.9% 10%;
|
--accent-foreground: 222.2 47.4% 11.2%;
|
||||||
--destructive: 0 84.2% 60.2%;
|
--destructive: 0 84.2% 60.2%;
|
||||||
--destructive-foreground: 0 0% 98%;
|
--destructive-foreground: 210 40% 98%;
|
||||||
--border: 240 5.9% 90%;
|
--border: 214.3 31.8% 91.4%;
|
||||||
--input: 240 5.9% 90%;
|
--input: 214.3 31.8% 91.4%;
|
||||||
--ring: 142.1 76.2% 36.3%;
|
--ring: 222.2 84% 4.9%;
|
||||||
--radius: 0.5rem;
|
--radius: 0.5rem;
|
||||||
--chart-1: 12 76% 61%;
|
--chart-1: 12 76% 61%;
|
||||||
--chart-2: 173 58% 39%;
|
--chart-2: 173 58% 39%;
|
||||||
|
@ -42,25 +43,25 @@ body,
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
--background: 20 14.3% 4.1%;
|
--background: 222.2 84% 4.9%;
|
||||||
--foreground: 0 0% 95%;
|
--foreground: 210 40% 98%;
|
||||||
--card: 24 9.8% 10%;
|
--card: 222.2 84% 4.9%;
|
||||||
--card-foreground: 0 0% 95%;
|
--card-foreground: 210 40% 98%;
|
||||||
--popover: 0 0% 9%;
|
--popover: 222.2 84% 4.9%;
|
||||||
--popover-foreground: 0 0% 95%;
|
--popover-foreground: 210 40% 98%;
|
||||||
--primary: 142.1 70.6% 45.3%;
|
--primary: 210 40% 98%;
|
||||||
--primary-foreground: 144.9 80.4% 10%;
|
--primary-foreground: 222.2 47.4% 11.2%;
|
||||||
--secondary: 240 3.7% 15.9%;
|
--secondary: 217.2 32.6% 17.5%;
|
||||||
--secondary-foreground: 0 0% 98%;
|
--secondary-foreground: 210 40% 98%;
|
||||||
--muted: 0 0% 15%;
|
--muted: 217.2 32.6% 17.5%;
|
||||||
--muted-foreground: 240 5% 64.9%;
|
--muted-foreground: 215 20.2% 65.1%;
|
||||||
--accent: 12 6.5% 15.1%;
|
--accent: 217.2 32.6% 17.5%;
|
||||||
--accent-foreground: 0 0% 98%;
|
--accent-foreground: 210 40% 98%;
|
||||||
--destructive: 0 62.8% 30.6%;
|
--destructive: 0 62.8% 30.6%;
|
||||||
--destructive-foreground: 0 85.7% 97.3%;
|
--destructive-foreground: 210 40% 98%;
|
||||||
--border: 240 3.7% 15.9%;
|
--border: 217.2 32.6% 17.5%;
|
||||||
--input: 240 3.7% 15.9%;
|
--input: 217.2 32.6% 17.5%;
|
||||||
--ring: 142.4 71.8% 29.2%;
|
--ring: 212.7 26.8% 83.9;
|
||||||
--chart-1: 220 70% 50%;
|
--chart-1: 220 70% 50%;
|
||||||
--chart-2: 160 60% 45%;
|
--chart-2: 160 60% 45%;
|
||||||
--chart-3: 30 80% 55%;
|
--chart-3: 30 80% 55%;
|
||||||
|
@ -70,6 +71,7 @@ body,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
* {
|
* {
|
||||||
@apply border-border;
|
@apply border-border;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user