黑暗模式fix
This commit is contained in:
@@ -158,7 +158,7 @@ const CustomerPage = () => {
|
||||
columns={columns}
|
||||
dataSource={customers}
|
||||
rowKey="id"
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
loading={loading}
|
||||
onChange={handleTableChange}
|
||||
pagination={{
|
||||
|
||||
@@ -256,7 +256,7 @@ export default function ProjectDetail() {
|
||||
}, [id, templateId]);
|
||||
|
||||
return (
|
||||
<div className="bg-gradient-to-b from-gray-50 to-white dark:from-gray-800 dark:to-gray-900/90 min-h-screen p-2">
|
||||
<div className="bg-gradient-to-b min-h-screen p-2">
|
||||
<Card
|
||||
className="shadow-lg rounded-lg border-0"
|
||||
title={
|
||||
|
||||
@@ -338,7 +338,7 @@ const ProjectPage = () => {
|
||||
columns={columns}
|
||||
dataSource={projects}
|
||||
rowKey="id"
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
loading={loadingProjects}
|
||||
onChange={handleTableChange}
|
||||
pagination={{
|
||||
|
||||
@@ -362,7 +362,7 @@ const QuotationForm = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="bg-gradient-to-b from-gray-50 to-white dark:from-gray-800 dark:to-gray-900/90 min-h-screen p-2">
|
||||
<div className="bg-gradient-to-b min-h-screen p-2">
|
||||
<Card
|
||||
className="shadow-lg rounded-lg border-0"
|
||||
title={
|
||||
|
||||
@@ -381,7 +381,7 @@ useEffect(()=>{
|
||||
columns={columns}
|
||||
dataSource={quotations}
|
||||
rowKey="id"
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
loading={loadingQuotations}
|
||||
onChange={handleTableChange}
|
||||
pagination={{
|
||||
@@ -405,7 +405,7 @@ useEffect(()=>{
|
||||
<Button
|
||||
key="custom"
|
||||
onClick={() => handleConfirm()}
|
||||
className=" gap-2 px-6 rounded-full hover:bg-gray-100"
|
||||
className="gap-2 px-6 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-gray-200"
|
||||
>
|
||||
<FileAddOutlined /> 自定义创建
|
||||
</Button>,
|
||||
@@ -414,28 +414,28 @@ useEffect(()=>{
|
||||
type="primary"
|
||||
disabled={!selectedTemplateId}
|
||||
onClick={handleConfirm}
|
||||
className="gap-2 px-6 rounded-full bg-blue-600 hover:bg-blue-700"
|
||||
className="gap-2 px-6 rounded-full "
|
||||
>
|
||||
<AppstoreOutlined /> 使用选中模板
|
||||
</Button>,
|
||||
]}
|
||||
width={900}
|
||||
className="template-modal"
|
||||
className="template-modal "
|
||||
>
|
||||
{loading ? (
|
||||
<div className="flex justify-center items-center h-[400px]">
|
||||
<div className="flex justify-center items-center h-[400px] ">
|
||||
<Spin size="large" />
|
||||
</div>
|
||||
) : templates.length === 0 ? (
|
||||
<Empty description="暂无可用模板" />
|
||||
<Empty description={<span className="dark:text-gray-400">暂无可用模板</span>} />
|
||||
) : (
|
||||
<div className="max-h-[600px] overflow-y-auto px-4">
|
||||
<div className="max-h-[600px] overflow-y-auto px-4 ">
|
||||
{getTemplatesByCategory().map((group, groupIndex) => (
|
||||
<div key={groupIndex} className="mb-10 last:mb-2">
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
<h3 className="text-xl font-medium text-gray-900">
|
||||
<h3 className="text-xl font-medium text-gray-900 dark:text-gray-100">
|
||||
{group.name}
|
||||
<span className="ml-2 text-sm text-gray-500">
|
||||
<span className="ml-2 text-sm text-gray-500 dark:text-gray-400">
|
||||
({group.templates.length})
|
||||
</span>
|
||||
</h3>
|
||||
@@ -450,18 +450,18 @@ useEffect(()=>{
|
||||
relative p-6 rounded-xl cursor-pointer transition-all duration-200
|
||||
${
|
||||
selectedTemplateId === template.id
|
||||
? "ring-2 ring-blue-500 bg-blue-50/40"
|
||||
: "hover:shadow-lg border border-gray-200 hover:border-blue-200"
|
||||
? "ring-2 ring-blue-500 dark:ring-blue-400 bg-blue-50/40 dark:bg-blue-900/30"
|
||||
: "hover:shadow-lg border border-gray-200 dark:border-gray-700 hover:border-blue-200 dark:hover:border-blue-700"
|
||||
}
|
||||
transform hover:-translate-y-1
|
||||
transform hover:-translate-y-1 dark:bg-gray-800
|
||||
`}
|
||||
>
|
||||
<div className="flex justify-between items-start gap-3 mb-4">
|
||||
<div className="flex-1 min-w-0">
|
||||
<h4 className="text-lg font-medium text-gray-900 truncate">
|
||||
<h4 className="text-lg font-medium text-gray-900 dark:text-gray-100 truncate">
|
||||
{template.attributes.templateName}
|
||||
</h4>
|
||||
<p className="text-sm text-gray-600 mt-2 line-clamp-2">
|
||||
<p className="text-sm text-gray-600 dark:text-gray-400 mt-2 line-clamp-2">
|
||||
{template.attributes.description || "暂无描述"}
|
||||
</p>
|
||||
</div>
|
||||
@@ -475,16 +475,16 @@ useEffect(()=>{
|
||||
rounded-lg p-3 text-sm border
|
||||
${
|
||||
selectedTemplateId === template.id
|
||||
? "bg-white border-blue-200"
|
||||
: "bg-gray-50 border-gray-100"
|
||||
? "bg-white dark:bg-gray-700 border-blue-200 dark:border-blue-600"
|
||||
: "bg-gray-50 dark:bg-gray-800 border-gray-100 dark:border-gray-700"
|
||||
}
|
||||
`}
|
||||
>
|
||||
<div className="flex justify-between items-center">
|
||||
<span className="font-medium text-gray-700 truncate flex-1">
|
||||
<span className="font-medium text-gray-700 dark:text-gray-200 truncate flex-1">
|
||||
{section.sectionName}
|
||||
</span>
|
||||
<span className="text-gray-500 ml-2 text-xs px-2 py-0.5 bg-gray-100 rounded-full">
|
||||
<span className="text-gray-500 dark:text-gray-400 ml-2 text-xs px-2 py-0.5 bg-gray-100 dark:bg-gray-600 rounded-full">
|
||||
{section.items.length}项
|
||||
</span>
|
||||
</div>
|
||||
@@ -494,7 +494,7 @@ useEffect(()=>{
|
||||
|
||||
{selectedTemplateId === template.id && (
|
||||
<div className="absolute top-4 right-4">
|
||||
<div className="w-6 h-6 bg-blue-600 rounded-full flex items-center justify-center shadow-md">
|
||||
<div className="w-6 h-6 bg-blue-600 dark:bg-blue-500 rounded-full flex items-center justify-center shadow-md">
|
||||
<svg
|
||||
className="w-4 h-4 text-white"
|
||||
fill="currentColor"
|
||||
|
||||
@@ -36,7 +36,7 @@ const ServiceForm = () => {
|
||||
return <div>无效的模板类型</div>;
|
||||
}
|
||||
return (
|
||||
<div className="bg-gradient-to-b from-gray-50 to-white dark:from-gray-800 dark:to-gray-900/90 min-h-screen p-2" >
|
||||
<div className="bg-gradient-to-b min-h-screen p-2" >
|
||||
<Card
|
||||
className="shadow-lg rounded-lg border-0"
|
||||
title={
|
||||
|
||||
@@ -263,7 +263,6 @@ const ServicePage = () => {
|
||||
title: "名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
width: "15%",
|
||||
render: (text, item, index) => {
|
||||
const isEditing =
|
||||
editingKey === `${record.id}-${section.key}-${index}`;
|
||||
@@ -286,7 +285,6 @@ const ServicePage = () => {
|
||||
title: "单位",
|
||||
dataIndex: "unit",
|
||||
key: "unit",
|
||||
width: "10%",
|
||||
render: (text, item, index) => {
|
||||
const isEditing =
|
||||
editingKey === `${record.id}-${section.key}-${index}`;
|
||||
@@ -320,7 +318,6 @@ const ServicePage = () => {
|
||||
title: "单价",
|
||||
dataIndex: "price",
|
||||
key: "price",
|
||||
width: "10%",
|
||||
render: (text, item, index) => {
|
||||
const isEditing =
|
||||
editingKey === `${record.id}-${section.key}-${index}`;
|
||||
@@ -343,7 +340,6 @@ const ServicePage = () => {
|
||||
title: "数量",
|
||||
dataIndex: "quantity",
|
||||
key: "quantity",
|
||||
width: "10%",
|
||||
render: (text, item, index) => {
|
||||
const isEditing =
|
||||
editingKey === `${record.id}-${section.key}-${index}`;
|
||||
@@ -677,7 +673,7 @@ const ServicePage = () => {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
<Table
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
dataSource={section.items}
|
||||
pagination={false}
|
||||
size="small"
|
||||
@@ -714,7 +710,6 @@ const ServicePage = () => {
|
||||
title: "模板名称",
|
||||
dataIndex: ["attributes", "templateName"],
|
||||
key: "templateName",
|
||||
className: "min-w-[200px]",
|
||||
},
|
||||
{
|
||||
title: "模板类型",
|
||||
@@ -766,6 +761,7 @@ const ServicePage = () => {
|
||||
title: "创建时间",
|
||||
dataIndex: "created_at",
|
||||
key: "created_at",
|
||||
width: 220,
|
||||
render: (text) => new Date(text).toLocaleString(),
|
||||
sorter: (a, b) => new Date(a.created_at) - new Date(b.created_at),
|
||||
},
|
||||
@@ -858,7 +854,7 @@ const ServicePage = () => {
|
||||
<Card className="shadow-lg rounded-lg">
|
||||
<TableHeader />
|
||||
<Table
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
columns={columns}
|
||||
dataSource={data}
|
||||
rowKey="id"
|
||||
|
||||
@@ -267,7 +267,7 @@ const Classify = ({activeType,typeList}) => {
|
||||
<div className="rounded-lg shadow-sm">
|
||||
<Form form={form}>
|
||||
<Table
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
columns={columns}
|
||||
dataSource={data}
|
||||
rowKey="id"
|
||||
|
||||
@@ -263,7 +263,7 @@ const UnitManagement = ({ activeType, typeList }) => {
|
||||
<div className="rounded-lg shadow-sm">
|
||||
<Form form={form}>
|
||||
<Table
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
columns={columns}
|
||||
dataSource={data}
|
||||
rowKey="id"
|
||||
|
||||
@@ -144,7 +144,7 @@ const SupplierPage = () => {
|
||||
}
|
||||
>
|
||||
<Table
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
columns={columns}
|
||||
dataSource={suppliers}
|
||||
rowKey="id"
|
||||
|
||||
@@ -264,7 +264,7 @@ export default function TaskForm() {
|
||||
}, [id, templateId]);
|
||||
|
||||
return (
|
||||
<div className="bg-gradient-to-b from-gray-50 to-white dark:from-gray-800 dark:to-gray-900/90 min-h-screen p-2">
|
||||
<div className="bg-gradient-to-b min-h-screen p-2">
|
||||
<Card
|
||||
className="shadow-lg rounded-lg border-0"
|
||||
title={
|
||||
|
||||
@@ -344,7 +344,7 @@ const TaskPage = () => {
|
||||
</Tag>
|
||||
</Space>
|
||||
}
|
||||
className="h-full w-full overflow-auto dark:bg-gray-800 dark:border-gray-700"
|
||||
className="h-full w-full overflow-auto "
|
||||
extra={
|
||||
<Space>
|
||||
<Select
|
||||
@@ -385,7 +385,7 @@ const TaskPage = () => {
|
||||
columns={columns}
|
||||
dataSource={tasks}
|
||||
rowKey="id"
|
||||
scroll={{ x: true }}
|
||||
scroll={{ x: true}}
|
||||
loading={loadingTasks}
|
||||
onChange={handleTableChange}
|
||||
pagination={{
|
||||
@@ -423,7 +423,7 @@ const TaskPage = () => {
|
||||
type="primary"
|
||||
disabled={!selectedTemplateId}
|
||||
onClick={handleConfirm}
|
||||
className="gap-2 px-6 rounded-full bg-blue-600 hover:bg-blue-700 dark:bg-blue-600 dark:hover:bg-blue-700"
|
||||
className="gap-2 px-6 rounded-full "
|
||||
>
|
||||
<AppstoreOutlined /> 使用选中模板
|
||||
</Button>,
|
||||
|
||||
Reference in New Issue
Block a user