diff --git a/frontend/app/features/admin/PermissionCheckboxList.tsx b/frontend/app/features/admin/PermissionCheckboxList.tsx index ad48719..bd5dbb1 100644 --- a/frontend/app/features/admin/PermissionCheckboxList.tsx +++ b/frontend/app/features/admin/PermissionCheckboxList.tsx @@ -1,5 +1,7 @@ import type { PlatformPermission } from "../../services/api"; +import { Checkbox } from "~/components/ui/checkbox"; + /** 模块编码 → 展示名(用于权限分组标题)。 */ const MODULE_LABELS: Record = { dashboard: "工作台", @@ -8,6 +10,10 @@ const MODULE_LABELS: Record = { system: "系统管理", }; +/** 勾选框样式:复刻原生 checkbox 外观(白底、灰边、蓝色勾选),并对齐 `.permission-item input` 的 3px 顶部偏移。 */ +const CHECKBOX_CLASS = + "mt-[3px] size-[16px] rounded-[3px] border-[#cdd9e4] bg-white disabled:opacity-100 data-checked:border-[#1277d3] data-checked:bg-[#1277d3] data-checked:text-white"; + /** * 权限勾选列表:按 module_code 分组渲染。 * - targetRoleCode === "admin" 时 system:view 锁定勾选(后端守卫); @@ -58,11 +64,11 @@ export function PermissionCheckboxList({ className={`permission-item${locked ? " is-locked" : ""}`} key={code} > - onToggle(code)} + onCheckedChange={() => onToggle(code)} + className={CHECKBOX_CLASS} /> {permission.permission_name} diff --git a/frontend/app/features/admin/ProjectManagementPage.tsx b/frontend/app/features/admin/ProjectManagementPage.tsx index 51e4820..a0a1119 100644 --- a/frontend/app/features/admin/ProjectManagementPage.tsx +++ b/frontend/app/features/admin/ProjectManagementPage.tsx @@ -1,14 +1,16 @@ import { useEffect, useState } from "react"; +// TODO: split file (>500 lines per CLAUDE.md 3.2.1 budget) +import { X } from "lucide-react"; import { ApiRequestError, type Employee, type Workspace, type WorkspaceMember } from "../../services/api"; import { useApi, useAuth } from "../../context/AuthContext"; import Icon from "../../components/common/Icon"; +import { Button } from "~/components/ui/button"; +import { Input } from "~/components/ui/input"; +import { Textarea } from "~/components/ui/textarea"; import { UserMultiSelect } from "./UserMultiSelect"; import { formFieldClass, - formInputClass, - formTextareaClass, - iconButtonClass, modalBackdropClass, modalCompactClass, modalEyebrowClass, @@ -16,8 +18,6 @@ import { modalFormClass, modalHeaderClass, modalTitleClass, - primaryButtonClass, - secondaryButtonClass, } from "../platform/modalUi"; import "../../styles/admin.css"; @@ -29,6 +29,17 @@ const EMPTY_PROJECT_FORM = { description: "", }; +const CLOSE_BUTTON_CLASS = + "size-[34px] rounded-[7px] border border-[#dfe6ed] bg-white hover:bg-[#f7faff] hover:border-[#b9c9da]"; +const SECONDARY_BUTTON_CLASS = + "h-[37px] gap-[7px] rounded-md border-[#d8e1e9] bg-white px-[15px] text-xs font-[650] text-[#56687c]"; +const PRIMARY_BUTTON_CLASS = + "h-[37px] gap-[7px] rounded-md border border-[#126ac3] bg-gradient-to-br from-[#1881e7] to-[#1268c9] px-[15px] text-xs font-[650] text-white shadow-[0_6px_15px_rgb(20_111_202/18%)] enabled:hover:from-[#1175d8] enabled:hover:to-[#0e5bad]"; +const FORM_INPUT_CLASS = + "h-[39px] w-full rounded-md border border-[#d6e0e9] bg-white px-[11px] text-xs text-[#283a4e] outline-none focus:border-[#5b9ddb] focus:shadow-[0_0_0_3px_rgb(38_125_207/8%)] disabled:cursor-not-allowed disabled:opacity-50"; +const FORM_TEXTAREA_CLASS = + "min-h-[92px] w-full resize-y rounded-md border border-[#d6e0e9] bg-white px-[11px] py-2.5 text-xs leading-[1.55] text-[#283a4e] outline-none focus:border-[#5b9ddb] focus:shadow-[0_0_0_3px_rgb(38_125_207/8%)]"; + export function ProjectManagementPage({ onNotify, onConnectionChange, @@ -253,15 +264,17 @@ export function ProjectManagementPage({ onChange={(event) => setProjectSearchTerm(event.target.value)} /> - + {!canManage &&
当前为开发人员,只能查看项目列表。
} @@ -331,16 +344,23 @@ export function ProjectManagementPage({ PROJECT

{editingProject ? "编辑项目" : "新建项目"}

- +
void submitProject(event)}> {!editingProject && (