@appthen/cli 1.2.10 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +1 -0
- package/bin/main.js +92 -0
- package/dist/index.js +7014 -14988
- package/package.json +8 -1
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1862 -0
- package/tests/test-app/.appthen/space-config.json +8 -0
- package/tests/test-app/docs/AI-Workflow.flow +112 -0
- package/tests/test-app/docs/Logic-1.flow +16 -0
- package/tests/test-app/docs/Logic.flow +16 -0
- package/tests/test-app/docs/Project-Blueprint-1.flow +119 -0
- package/tests/test-app/docs/Project-Blueprint.flow +119 -0
- package/tests/test-app/docs/README.md +3 -0
- package/tests/test-app/docs/claude.md +194 -0
- package/tests/test-app/docs/page_requirement_analysis.md +149 -0
- package/tests/test-app/docs//345/267/245/345/215/225/347/256/241/347/220/206/347/263/273/347/273/237/350/257/246/347/273/206/350/256/276/350/256/241.md +377 -0
- package/tests/test-app/src/apis/AddTodoPost.api.ts +42 -0
- package/tests/test-app/src/apis/DeleteTodoPost.api.ts +32 -0
- package/tests/test-app/src/apis/GetListPost.api.ts +38 -0
- package/tests/test-app/src/apis/TicketAttachmentUploadPost.api.ts +42 -0
- package/tests/test-app/src/apis/UpdateTodoPost.api.ts +46 -0
- package/tests/test-app/src/app.css +15 -0
- package/tests/test-app/src/cloud_functions/ticket|attachment|upload.node.ts +86 -0
- package/tests/test-app/src/cloud_functions/ticket|comment|add.node.ts +65 -0
- package/tests/test-app/src/cloud_functions/types|entity|Ticket.node.ts +88 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketAttachment.node.ts +70 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketCategory.node.ts +56 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketComment.node.ts +62 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketHistory.node.ts +74 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketPriority.node.ts +68 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketStatus.node.ts +63 -0
- package/tests/test-app/src/cloud_functions/types|models|CreateTicketParams.node.ts +20 -0
- package/tests/test-app/src/cloud_functions/types|models|TicketListParams.node.ts +30 -0
- package/tests/test-app/src/cloud_functions/types|models|UpdateTicketParams.node.ts +22 -0
- package/tests/test-app/src/components/Button.js +11 -0
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/components/MouduleDemoNzp.tsx +40 -0
- package/tests/test-app/src/components/Timeline.tsx +145 -0
- package/tests/test-app/src/index.ts +2 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCommentAddPost.api.ts +48 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCreatePost.api.ts +52 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDeleteDelete.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDetailGet.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketListGet.api.ts +61 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketUpdatePut.api.ts +57 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorFaultListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorOperationRecordsGet.ts +284 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorStatisticsGet.ts +96 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/category|list.node.ts +40 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/priority|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/status|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|create.node.ts +54 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|delete.node.ts +55 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|detail.node.ts +65 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|list.node.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|update.node.ts +73 -0
- package/tests/test-app/src/modules/work_order_module/data_model/Ticket.m.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketCategory.m.ts +53 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketStatus.m.ts +60 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/344/272/247/345/223/201/350/256/276/350/256/241/346/226/207/346/241/243.md +301 -0
- package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/345/274/200/345/217/221/344/273/273/345/212/241/345/210/206/345/267/245/346/226/207/346/241/243.md +345 -0
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/SLAManagement.tsx +668 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketCreate.tsx +27 -0
- package/tests/test-app/src/pages/TicketDetail.tsx +27 -0
- package/tests/test-app/src/pages/TicketList.tsx +27 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/TicketManagementPage.tsx +1238 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/appthen_guide/ComponentTreeUnderstanding.tsx +26 -0
- package/tests/test-app/src/pages/appthen_guide/DataBindingLearning.tsx +26 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout.tsx +155 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout10.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout2.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout3.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout4.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout5.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout6.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout7.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout8.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout9.tsx +157 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.css +5 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.tsx +1745 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/component/WorkOrderCard.tsx +140 -0
- package/tests/test-app/src/pages/cover.tsx +42 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.tsx +225 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.tsx +138 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/BlueBrightGreenBorder.tsx +47 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/FullScreenContainer.tsx +133 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/description_of_mock_interface.md +32 -0
- package/tests/test-app/src/pages/digitalLargeScreen.css +181 -0
- package/tests/test-app/src/pages/digitalLargeScreen.tsx +1417 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.css +3 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.tsx +362 -0
- package/tests/test-app/src/pages/mobile_terminal/WorkOrderHomepage.tsx +337 -0
- package/tests/test-app/src/pages/mobile_terminal/newWorkOrder.tsx +224 -0
- package/tests/test-app/src/pages/mobile_terminal/tabbar.tsx +67 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +638 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderDetails.tsx +346 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderPage.tsx +345 -0
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/testPage.css +3 -0
- package/tests/test-app/src/pages/testPage.tsx +158 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/web_version/website.css +205 -0
- package/tests/test-app/src/pages/web_version/website.tsx +1066 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/src/pages//345/276/205/345/212/236.apidoc.json +336 -0
- package/tests/test-app/src/project.json +1120 -0
- package/tests/test-app/src/store/global.store.ts +10 -0
- package/tests/test-app/src/types/CreateTicketParams.m.ts +20 -0
- package/tests/test-app/src/types/SLAPolicy.ts +50 -0
- package/tests/test-app/src/types/Ticket.ts +68 -0
- package/tests/test-app/src/types/TicketAttachment.m.ts +67 -0
- package/tests/test-app/src/types/TicketComment.m.ts +59 -0
- package/tests/test-app/src/types/TicketEvaluation.ts +44 -0
- package/tests/test-app/src/types/TicketHistory.m.ts +71 -0
- package/tests/test-app/src/types/TicketListParams.m.ts +30 -0
- package/tests/test-app/src/types/TicketPriority.m.ts +65 -0
- package/tests/test-app/src/types/TicketRecord.ts +47 -0
- package/tests/test-app/src/types/TrainDoor.ts +284 -0
- package/tests/test-app/src/types/UpdateTicketParams.m.ts +22 -0
- package/tests/test-app/src/utils/__afterRequest.util.ts +3 -0
- package/tests/test-app/src/utils/__beforeRequest.util.ts +10 -0
- package/tests/test-app/src/utils/testGlobalAction.util.ts +7 -0
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 静态赛博朋克用户列表
|
|
3
|
+
* 使用基本 HTML 元素 + Tailwind CSS 的纯静态用户管理页面
|
|
4
|
+
*
|
|
5
|
+
* @type Page
|
|
6
|
+
* @route /static-cyberpunk-user-list
|
|
7
|
+
* @screen 1920x1080 #0a0a0f
|
|
8
|
+
* @frames web
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class IProps {
|
|
14
|
+
title?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* 数据与接口请求定义
|
|
19
|
+
*/
|
|
20
|
+
class IState {
|
|
21
|
+
users?: {
|
|
22
|
+
/* @example 1 */id?: number,
|
|
23
|
+
/* @example 霓虹行者 */name?: string,
|
|
24
|
+
/* @example neon@cyber.net */email?: string,
|
|
25
|
+
/* @example 管理员 */role?: string,
|
|
26
|
+
/* @example active */status?: string,
|
|
27
|
+
/* @example 99 */level?: number,
|
|
28
|
+
/* @example https://api.dicebear.com/7.x/bottts/svg?seed=neon */avatar?: string,
|
|
29
|
+
/* @example 2077-01-15 */joinDate?: string,
|
|
30
|
+
/* @example 2077-12-01 23:45:12 */lastLogin?: string,
|
|
31
|
+
/* @example 资深网络专家,擅长突破任何防火墙系统 */bio?: string,
|
|
32
|
+
}[];
|
|
33
|
+
viewMode?: string;
|
|
34
|
+
selectedUser?: any;
|
|
35
|
+
modalVisible?: boolean;
|
|
36
|
+
searchKeyword?: string;
|
|
37
|
+
filterStatus?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
class Document extends React.Component<IProps, IState> {
|
|
41
|
+
state = {
|
|
42
|
+
users: [
|
|
43
|
+
{
|
|
44
|
+
id: 1,
|
|
45
|
+
name: '霓虹行者',
|
|
46
|
+
email: 'neon@cyber.net',
|
|
47
|
+
role: '管理员',
|
|
48
|
+
status: 'active',
|
|
49
|
+
level: 99,
|
|
50
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=neon',
|
|
51
|
+
joinDate: '2077-01-15',
|
|
52
|
+
lastLogin: '2077-12-01 23:45:12',
|
|
53
|
+
bio: '资深网络专家,擅长突破任何防火墙系统',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 2,
|
|
57
|
+
name: '数据幽灵',
|
|
58
|
+
email: 'ghost@cyber.net',
|
|
59
|
+
role: '开发者',
|
|
60
|
+
status: 'active',
|
|
61
|
+
level: 87,
|
|
62
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=ghost',
|
|
63
|
+
joinDate: '2077-03-22',
|
|
64
|
+
lastLogin: '2077-12-01 22:30:45',
|
|
65
|
+
bio: '隐形于数据流中的黑客,无人知晓其真实身份',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 3,
|
|
69
|
+
name: '赛博黑客',
|
|
70
|
+
email: 'hacker@cyber.net',
|
|
71
|
+
role: '操作员',
|
|
72
|
+
status: 'warning',
|
|
73
|
+
level: 72,
|
|
74
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=hacker',
|
|
75
|
+
joinDate: '2077-05-10',
|
|
76
|
+
lastLogin: '2077-11-30 18:20:33',
|
|
77
|
+
bio: '专注于系统漏洞挖掘和安全测试',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 4,
|
|
81
|
+
name: '量子行者',
|
|
82
|
+
email: 'quantum@cyber.net',
|
|
83
|
+
role: '开发者',
|
|
84
|
+
status: 'active',
|
|
85
|
+
level: 95,
|
|
86
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=quantum',
|
|
87
|
+
joinDate: '2077-02-28',
|
|
88
|
+
lastLogin: '2077-12-01 21:15:27',
|
|
89
|
+
bio: '量子计算领域的先驱,正在开发下一代AI',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 5,
|
|
93
|
+
name: '暗影猎手',
|
|
94
|
+
email: 'shadow@cyber.net',
|
|
95
|
+
role: '操作员',
|
|
96
|
+
status: 'offline',
|
|
97
|
+
level: 65,
|
|
98
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=shadow',
|
|
99
|
+
joinDate: '2077-06-15',
|
|
100
|
+
lastLogin: '2077-11-25 10:45:00',
|
|
101
|
+
bio: '网络追踪专家,擅长定位和追踪目标',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 6,
|
|
105
|
+
name: '网络守护者',
|
|
106
|
+
email: 'guardian@cyber.net',
|
|
107
|
+
role: '管理员',
|
|
108
|
+
status: 'active',
|
|
109
|
+
level: 91,
|
|
110
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=guardian',
|
|
111
|
+
joinDate: '2077-01-08',
|
|
112
|
+
lastLogin: '2077-12-01 23:50:18',
|
|
113
|
+
bio: '网络安全专家,负责维护系统安全',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 7,
|
|
117
|
+
name: '代码刺客',
|
|
118
|
+
email: 'assassin@cyber.net',
|
|
119
|
+
role: '开发者',
|
|
120
|
+
status: 'active',
|
|
121
|
+
level: 83,
|
|
122
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=assassin',
|
|
123
|
+
joinDate: '2077-04-12',
|
|
124
|
+
lastLogin: '2077-12-01 20:10:55',
|
|
125
|
+
bio: '高效代码编写者,能在极短时间内完成任务',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 8,
|
|
129
|
+
name: '数字浪人',
|
|
130
|
+
email: 'ronin@cyber.net',
|
|
131
|
+
role: '操作员',
|
|
132
|
+
status: 'warning',
|
|
133
|
+
level: 58,
|
|
134
|
+
avatar: 'https://api.dicebear.com/7.x/bottts/svg?seed=ronin',
|
|
135
|
+
joinDate: '2077-07-20',
|
|
136
|
+
lastLogin: '2077-11-28 14:30:22',
|
|
137
|
+
bio: '自由职业者,接各种网络任务',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
viewMode: 'grid',
|
|
141
|
+
selectedUser: null,
|
|
142
|
+
modalVisible: false,
|
|
143
|
+
searchKeyword: '',
|
|
144
|
+
filterStatus: 'all',
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
toggleViewMode() {
|
|
148
|
+
this.setState({
|
|
149
|
+
viewMode: this.state.viewMode === 'grid' ? 'list' : 'grid',
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
handleViewUser(user) {
|
|
154
|
+
this.setState({
|
|
155
|
+
selectedUser: user,
|
|
156
|
+
modalVisible: true,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
handleCloseModal() {
|
|
161
|
+
this.setState({
|
|
162
|
+
modalVisible: false,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
handleSearch(value) {
|
|
167
|
+
this.setState({
|
|
168
|
+
searchKeyword: value,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
handleFilter(value) {
|
|
173
|
+
this.setState({
|
|
174
|
+
filterStatus: value,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
getStatusColor(status) {
|
|
179
|
+
switch (status) {
|
|
180
|
+
case 'active':
|
|
181
|
+
return '#00ff88';
|
|
182
|
+
case 'warning':
|
|
183
|
+
return '#ffaa00';
|
|
184
|
+
case 'offline':
|
|
185
|
+
return '#ff0055';
|
|
186
|
+
default:
|
|
187
|
+
return '#888888';
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
getStatusText(status) {
|
|
192
|
+
switch (status) {
|
|
193
|
+
case 'active':
|
|
194
|
+
return '在线';
|
|
195
|
+
case 'warning':
|
|
196
|
+
return '警告';
|
|
197
|
+
case 'offline':
|
|
198
|
+
return '离线';
|
|
199
|
+
default:
|
|
200
|
+
return status;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
getRoleColor(role) {
|
|
205
|
+
switch (role) {
|
|
206
|
+
case '管理员':
|
|
207
|
+
return '#ff00ff';
|
|
208
|
+
case '开发者':
|
|
209
|
+
return '#00ffff';
|
|
210
|
+
case '操作员':
|
|
211
|
+
return '#ffaa00';
|
|
212
|
+
default:
|
|
213
|
+
return '#888888';
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
getFilteredUsers() {
|
|
218
|
+
let filtered = this.state.users;
|
|
219
|
+
if (this.state.searchKeyword) {
|
|
220
|
+
const keyword = this.state.searchKeyword.toLowerCase();
|
|
221
|
+
filtered = filtered.filter(
|
|
222
|
+
user =>
|
|
223
|
+
user.name.toLowerCase().includes(keyword) ||
|
|
224
|
+
user.email.toLowerCase().includes(keyword)
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
if (this.state.filterStatus !== 'all') {
|
|
228
|
+
filtered = filtered.filter(
|
|
229
|
+
user => user.status === this.state.filterStatus
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
return filtered;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
render() {
|
|
236
|
+
const filteredUsers = this.getFilteredUsers();
|
|
237
|
+
return (
|
|
238
|
+
<Page className="relative min-h-screen overflow-x-hidden bg-[#0a0a0f] [fontFamily:monospace] text-[#ffffff]">
|
|
239
|
+
<View className="pointer-events-none fixed top-[0px] left-[0px] right-[0px] bottom-[0px] z-[100] bg-[repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 1px, transparent 1px, transparent 2px)]" />
|
|
240
|
+
<View className="pointer-events-none fixed top-[0px] left-[0px] right-[0px] bottom-[0px] bg-gradient-to-r bg-[linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px)] bg-[length:50px 50px]" />
|
|
241
|
+
<View className="relative z-10">
|
|
242
|
+
<header className="flex justify-between items-center pl-[32px] pr-[32px] pt-[24px] pb-[24px] [borderBottom:2px solid #00ffff] bg-[rgba(0, 255, 255, 0.05)] [backdropFilter:blur(10px)]">
|
|
243
|
+
<View className="flex flex-col">
|
|
244
|
+
<h1 className="text-3xl font-bold tracking-[0.1em] text-[#00ffff] text-shadow-[0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 40px #00ffff] [fontFamily:Orbitron, sans-serif]">
|
|
245
|
+
用户管理
|
|
246
|
+
</h1>
|
|
247
|
+
<p className="text-xs mt-[4px] text-[#ff00ff] tracking-[0.2em]">
|
|
248
|
+
USER MANAGEMENT SYSTEM
|
|
249
|
+
</p>
|
|
250
|
+
</View>
|
|
251
|
+
<View className="gap-6 flex items-center">
|
|
252
|
+
<View className="pl-[16px] pr-[16px] pt-[8px] pb-[8px] rounded bg-[rgba(0, 255, 136, 0.2)] border border-solid border-[#00ff88]">
|
|
253
|
+
<Text className="font-bold tracking-[0.05em] text-sm text-[#00ff88]">
|
|
254
|
+
共{filteredUsers.length}位用户
|
|
255
|
+
</Text>
|
|
256
|
+
</View>
|
|
257
|
+
<button
|
|
258
|
+
onClick={() => this.toggleViewMode()}
|
|
259
|
+
className="transition pl-[16px] pr-[16px] pt-[8px] pb-[8px] rounded font-bold text-xs tracking-[0.05em] bg-[transparent] border-[2px] border-solid border-[#00ffff] text-[#00ffff] shadow-[0 0 10px rgba(0, 255, 255, 0.3)]"
|
|
260
|
+
>
|
|
261
|
+
{this.state.viewMode === 'grid' ? '列表视图' : '网格视图'}
|
|
262
|
+
</button>
|
|
263
|
+
</View>
|
|
264
|
+
</header>
|
|
265
|
+
<View className="flex justify-between items-center pl-[32px] pr-[32px] pt-[16px] pb-[16px] [borderBottom:1px solid rgba(0, 255, 255, 0.2)]">
|
|
266
|
+
<View className="gap-4 flex flex-1">
|
|
267
|
+
<input
|
|
268
|
+
type="text"
|
|
269
|
+
placeholder="搜索用户..."
|
|
270
|
+
value={this.state.searchKeyword}
|
|
271
|
+
onChange={e => this.handleSearch(e.target.value)}
|
|
272
|
+
className="pl-[16px] pr-[16px] pt-[8px] pb-[8px] rounded text-sm w-[300px] bg-[rgba(0, 0, 0, 0.6)] border border-solid border-[rgba(0, 255, 255, 0.3)] text-[#ffffff] [outline:none]"
|
|
273
|
+
/>
|
|
274
|
+
<select
|
|
275
|
+
value={this.state.filterStatus}
|
|
276
|
+
onChange={e => this.handleFilter(e.target.value)}
|
|
277
|
+
className="pl-[16px] pr-[16px] pt-[8px] pb-[8px] rounded text-sm w-[150px] bg-[rgba(0, 0, 0, 0.6)] border border-solid border-[rgba(0, 255, 255, 0.3)] text-[#ffffff] [outline:none]"
|
|
278
|
+
>
|
|
279
|
+
<option value="all">全部状态</option>
|
|
280
|
+
<option value="active">在线</option>
|
|
281
|
+
<option value="warning">警告</option>
|
|
282
|
+
<option value="offline">离线</option>
|
|
283
|
+
</select>
|
|
284
|
+
</View>
|
|
285
|
+
</View>
|
|
286
|
+
<main className="p-[32px]">
|
|
287
|
+
{!!(this.state.viewMode === 'grid') && (
|
|
288
|
+
<View className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
|
289
|
+
{filteredUsers.map((user, index) => (
|
|
290
|
+
<View
|
|
291
|
+
key={user.id}
|
|
292
|
+
onClick={() => this.handleViewUser(user)}
|
|
293
|
+
className="transition hover:scale-105 rounded-xl p-[24px] cursor-pointer bg-[rgba(0, 0, 0, 0.6)] [backdropFilter:blur(10px)] border border-solid border-[rgba(0, 255, 255, 0.3)] shadow-[0 0 20px rgba(0, 255, 255, 0.1)]"
|
|
294
|
+
>
|
|
295
|
+
<View className="flex flex-col items-center mb-[16px]">
|
|
296
|
+
<Image
|
|
297
|
+
src={user.avatar}
|
|
298
|
+
alt={user.name}
|
|
299
|
+
className="w-[80px] h-[80px] rounded-full mb-[12px] border-[3px] border-solid border-[#00ffff] shadow-[0 0 15px rgba(0, 255, 255, 0.5)]"
|
|
300
|
+
/>
|
|
301
|
+
<h3 className="text-lg font-bold text-[#ffffff]">
|
|
302
|
+
{user.name}
|
|
303
|
+
</h3>
|
|
304
|
+
<p className="text-xs text-[#888888] mt-[4px]">
|
|
305
|
+
{user.email}
|
|
306
|
+
</p>
|
|
307
|
+
</View>
|
|
308
|
+
<View className="space-y-2 mb-[16px]">
|
|
309
|
+
<View className="flex justify-between items-center">
|
|
310
|
+
<Text className="text-xs text-[#00ffff]">角色</Text>
|
|
311
|
+
<Text
|
|
312
|
+
className="px-2 py-1 rounded text-xs font-bold"
|
|
313
|
+
style={{
|
|
314
|
+
backgroundColor:
|
|
315
|
+
this.getRoleColor(user.role) + '33',
|
|
316
|
+
color: this.getRoleColor(user.role),
|
|
317
|
+
border: '1px solid ' + this.getRoleColor(user.role),
|
|
318
|
+
}}
|
|
319
|
+
>
|
|
320
|
+
{user.role}
|
|
321
|
+
</Text>
|
|
322
|
+
</View>
|
|
323
|
+
<View className="flex justify-between items-center">
|
|
324
|
+
<Text className="text-xs text-[#00ffff]">等级</Text>
|
|
325
|
+
<Text className="text-sm font-bold text-[#ffffff]">
|
|
326
|
+
LV.{user.level}
|
|
327
|
+
</Text>
|
|
328
|
+
</View>
|
|
329
|
+
<View className="flex justify-between items-center">
|
|
330
|
+
<Text className="text-xs text-[#00ffff]">状态</Text>
|
|
331
|
+
<View className="gap-2 flex items-center">
|
|
332
|
+
<View
|
|
333
|
+
className="w-2 h-2 rounded-full"
|
|
334
|
+
style={{
|
|
335
|
+
backgroundColor: this.getStatusColor(user.status),
|
|
336
|
+
boxShadow:
|
|
337
|
+
'0 0 10px ' + this.getStatusColor(user.status),
|
|
338
|
+
}}
|
|
339
|
+
/>
|
|
340
|
+
<Text
|
|
341
|
+
className="text-xs font-bold"
|
|
342
|
+
style={{ color: this.getStatusColor(user.status) }}
|
|
343
|
+
>
|
|
344
|
+
{this.getStatusText(user.status)}
|
|
345
|
+
</Text>
|
|
346
|
+
</View>
|
|
347
|
+
</View>
|
|
348
|
+
</View>
|
|
349
|
+
<View className="pt-[12px] border-t border-t-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
350
|
+
<View className="flex justify-between items-center">
|
|
351
|
+
<Text className="text-xs text-[#888888]">加入时间</Text>
|
|
352
|
+
<Text className="text-xs text-[#ffffff]">
|
|
353
|
+
{user.joinDate}
|
|
354
|
+
</Text>
|
|
355
|
+
</View>
|
|
356
|
+
</View>
|
|
357
|
+
</View>
|
|
358
|
+
))}
|
|
359
|
+
</View>
|
|
360
|
+
)}
|
|
361
|
+
{!(this.state.viewMode === 'grid') && (
|
|
362
|
+
<View className="space-y-4">
|
|
363
|
+
{filteredUsers.map((user, index) => (
|
|
364
|
+
<View
|
|
365
|
+
key={user.id}
|
|
366
|
+
onClick={() => this.handleViewUser(user)}
|
|
367
|
+
className="transition hover:scale-[1.01] flex items-center p-[24px] rounded-xl cursor-pointer bg-[rgba(0, 0, 0, 0.6)] [backdropFilter:blur(10px)] border border-solid border-[rgba(0, 255, 255, 0.3)] shadow-[0 0 20px rgba(0, 255, 255, 0.1)]"
|
|
368
|
+
>
|
|
369
|
+
<Image
|
|
370
|
+
src={user.avatar}
|
|
371
|
+
alt={user.name}
|
|
372
|
+
className="w-[64px] h-[64px] rounded-full mr-[24px] border-[2px] border-solid border-[#00ffff] shadow-[0 0 10px rgba(0, 255, 255, 0.5)]"
|
|
373
|
+
/>
|
|
374
|
+
<View className="flex-1">
|
|
375
|
+
<View className="gap-3 flex items-center mb-[8px]">
|
|
376
|
+
<h3 className="text-lg font-bold text-[#ffffff]">
|
|
377
|
+
{user.name}
|
|
378
|
+
</h3>
|
|
379
|
+
<Text
|
|
380
|
+
className="px-2 py-1 rounded text-xs font-bold"
|
|
381
|
+
style={{
|
|
382
|
+
backgroundColor:
|
|
383
|
+
this.getRoleColor(user.role) + '33',
|
|
384
|
+
color: this.getRoleColor(user.role),
|
|
385
|
+
border: '1px solid ' + this.getRoleColor(user.role),
|
|
386
|
+
}}
|
|
387
|
+
>
|
|
388
|
+
{user.role}
|
|
389
|
+
</Text>
|
|
390
|
+
<View className="gap-2 flex items-center">
|
|
391
|
+
<View
|
|
392
|
+
className="w-2 h-2 rounded-full"
|
|
393
|
+
style={{
|
|
394
|
+
backgroundColor: this.getStatusColor(user.status),
|
|
395
|
+
boxShadow:
|
|
396
|
+
'0 0 10px ' + this.getStatusColor(user.status),
|
|
397
|
+
}}
|
|
398
|
+
/>
|
|
399
|
+
<Text
|
|
400
|
+
className="text-xs font-bold"
|
|
401
|
+
style={{ color: this.getStatusColor(user.status) }}
|
|
402
|
+
>
|
|
403
|
+
{this.getStatusText(user.status)}
|
|
404
|
+
</Text>
|
|
405
|
+
</View>
|
|
406
|
+
</View>
|
|
407
|
+
<p className="text-sm mb-[4px] text-[#888888]">
|
|
408
|
+
{user.email}
|
|
409
|
+
</p>
|
|
410
|
+
<p className="text-xs text-[#666666]">{user.bio}</p>
|
|
411
|
+
</View>
|
|
412
|
+
<View className="text-[var(--right)]">
|
|
413
|
+
<View className="text-sm mb-[4px] text-[#00ffff]">
|
|
414
|
+
LV.<Text>{user.level}</Text>
|
|
415
|
+
</View>
|
|
416
|
+
<View className="text-xs text-[#888888]">
|
|
417
|
+
<Text>{user.joinDate}</Text>
|
|
418
|
+
</View>
|
|
419
|
+
</View>
|
|
420
|
+
</View>
|
|
421
|
+
))}
|
|
422
|
+
</View>
|
|
423
|
+
)}
|
|
424
|
+
</main>
|
|
425
|
+
{!!this.state.modalVisible && (
|
|
426
|
+
<View
|
|
427
|
+
onClick={() => this.handleCloseModal()}
|
|
428
|
+
className="fixed top-[0px] left-[0px] right-[0px] bottom-[0px] flex justify-center items-center z-[1000] bg-[rgba(0, 0, 0, 0.8)] [backdropFilter:blur(5px)]"
|
|
429
|
+
>
|
|
430
|
+
<View
|
|
431
|
+
onClick={e => e.stopPropagation()}
|
|
432
|
+
className="rounded-xl overflow-hidden w-[500px] bg-[rgba(10, 10, 15, 0.95)] border-[2px] border-solid border-[#00ffff] shadow-[0 0 50px rgba(0, 255, 255, 0.3)]"
|
|
433
|
+
>
|
|
434
|
+
<View className="flex justify-between items-center pl-[24px] pr-[24px] pt-[16px] pb-[16px] [borderBottom:1px solid rgba(0, 255, 255, 0.3)] bg-[rgba(0, 255, 255, 0.05)]">
|
|
435
|
+
<h2 className="text-lg font-bold tracking-[0.05em] text-[#00ffff]">
|
|
436
|
+
用户详情
|
|
437
|
+
</h2>
|
|
438
|
+
<button
|
|
439
|
+
onClick={() => this.handleCloseModal()}
|
|
440
|
+
className="text-2xl font-bold text-[#ff0055] bg-[transparent] border cursor-pointer"
|
|
441
|
+
>
|
|
442
|
+
✕
|
|
443
|
+
</button>
|
|
444
|
+
</View>
|
|
445
|
+
<View className="p-[24px]">
|
|
446
|
+
<View className="flex flex-col items-center mb-[24px] pb-[24px] [borderBottom:1px solid rgba(255, 255, 255, 0.1)]">
|
|
447
|
+
<Image
|
|
448
|
+
src={this.state.selectedUser?.avatar}
|
|
449
|
+
alt={this.state.selectedUser?.name}
|
|
450
|
+
className="w-[96px] h-[96px] rounded-full mb-[16px] border-[3px] border-solid border-[#00ffff] shadow-[0 0 20px rgba(0, 255, 255, 0.5)]"
|
|
451
|
+
/>
|
|
452
|
+
<h3 className="text-2xl font-bold mb-[8px] text-[#ffffff]">
|
|
453
|
+
{this.state.selectedUser?.name}
|
|
454
|
+
</h3>
|
|
455
|
+
<Text
|
|
456
|
+
className="px-3 py-1 rounded text-sm font-bold"
|
|
457
|
+
style={{
|
|
458
|
+
backgroundColor:
|
|
459
|
+
this.getRoleColor(this.state.selectedUser?.role) +
|
|
460
|
+
'33',
|
|
461
|
+
color: this.getRoleColor(this.state.selectedUser?.role),
|
|
462
|
+
border:
|
|
463
|
+
'1px solid ' +
|
|
464
|
+
this.getRoleColor(this.state.selectedUser?.role),
|
|
465
|
+
}}
|
|
466
|
+
>
|
|
467
|
+
{this.state.selectedUser?.role}
|
|
468
|
+
</Text>
|
|
469
|
+
</View>
|
|
470
|
+
<View className="gap-4 grid grid-cols-2 mb-[24px]">
|
|
471
|
+
<View className="p-[16px] rounded bg-[rgba(0, 0, 0, 0.4)] border border-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
472
|
+
<View className="text-xs mb-[4px] text-[#888888] tracking-wide [textTransform:uppercase]">
|
|
473
|
+
邮箱
|
|
474
|
+
</View>
|
|
475
|
+
<View className="text-sm font-bold text-[#ffffff]">
|
|
476
|
+
<Text>{this.state.selectedUser?.email}</Text>
|
|
477
|
+
</View>
|
|
478
|
+
</View>
|
|
479
|
+
<View className="p-[16px] rounded bg-[rgba(0, 0, 0, 0.4)] border border-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
480
|
+
<View className="text-xs mb-[4px] text-[#888888] tracking-wide [textTransform:uppercase]">
|
|
481
|
+
等级
|
|
482
|
+
</View>
|
|
483
|
+
<View className="text-sm font-bold text-[#ffffff]">
|
|
484
|
+
LV.<Text>{this.state.selectedUser?.level}</Text>
|
|
485
|
+
</View>
|
|
486
|
+
</View>
|
|
487
|
+
<View className="p-[16px] rounded bg-[rgba(0, 0, 0, 0.4)] border border-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
488
|
+
<View className="text-xs mb-[4px] text-[#888888] tracking-wide [textTransform:uppercase]">
|
|
489
|
+
状态
|
|
490
|
+
</View>
|
|
491
|
+
<View
|
|
492
|
+
className="text-sm font-bold"
|
|
493
|
+
style={{
|
|
494
|
+
color: this.getStatusColor(
|
|
495
|
+
this.state.selectedUser?.status
|
|
496
|
+
),
|
|
497
|
+
}}
|
|
498
|
+
>
|
|
499
|
+
<Text>
|
|
500
|
+
{this.getStatusText(this.state.selectedUser?.status)}
|
|
501
|
+
</Text>
|
|
502
|
+
</View>
|
|
503
|
+
</View>
|
|
504
|
+
<View className="p-[16px] rounded bg-[rgba(0, 0, 0, 0.4)] border border-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
505
|
+
<View className="text-xs mb-[4px] text-[#888888] tracking-wide [textTransform:uppercase]">
|
|
506
|
+
加入时间
|
|
507
|
+
</View>
|
|
508
|
+
<View className="text-sm font-bold text-[#ffffff]">
|
|
509
|
+
<Text>{this.state.selectedUser?.joinDate}</Text>
|
|
510
|
+
</View>
|
|
511
|
+
</View>
|
|
512
|
+
</View>
|
|
513
|
+
<View className="mb-[24px]">
|
|
514
|
+
<View className="text-xs mb-[8px] text-[#00ffff] tracking-wide [textTransform:uppercase]">
|
|
515
|
+
个人简介
|
|
516
|
+
</View>
|
|
517
|
+
<View className="p-[16px] rounded bg-[rgba(0, 0, 0, 0.4)] border border-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
518
|
+
<p className="text-sm text-[#cccccc] [lineHeight:1.6]">
|
|
519
|
+
{this.state.selectedUser?.bio}
|
|
520
|
+
</p>
|
|
521
|
+
</View>
|
|
522
|
+
</View>
|
|
523
|
+
<View className="gap-4 grid grid-cols-2">
|
|
524
|
+
<View className="p-[16px] rounded bg-[rgba(0, 0, 0, 0.4)] border border-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
525
|
+
<View className="text-xs mb-[4px] text-[#888888] tracking-wide [textTransform:uppercase]">
|
|
526
|
+
最后登录
|
|
527
|
+
</View>
|
|
528
|
+
<View className="text-sm font-bold text-[#ffffff]">
|
|
529
|
+
<Text>{this.state.selectedUser?.lastLogin}</Text>
|
|
530
|
+
</View>
|
|
531
|
+
</View>
|
|
532
|
+
<View className="p-[16px] rounded bg-[rgba(0, 0, 0, 0.4)] border border-solid border-[rgba(255, 255, 255, 0.1)]">
|
|
533
|
+
<View className="text-xs mb-[4px] text-[#888888] tracking-wide [textTransform:uppercase]">
|
|
534
|
+
用户ID
|
|
535
|
+
</View>
|
|
536
|
+
<View className="text-sm font-bold text-[#ffffff]">
|
|
537
|
+
#
|
|
538
|
+
<Text>
|
|
539
|
+
{this.state.selectedUser?.id
|
|
540
|
+
.toString()
|
|
541
|
+
.padStart(6, '0')}
|
|
542
|
+
</Text>
|
|
543
|
+
</View>
|
|
544
|
+
</View>
|
|
545
|
+
</View>
|
|
546
|
+
</View>
|
|
547
|
+
<View className="gap-3 flex justify-end pl-[24px] pr-[24px] pt-[16px] pb-[16px] [borderTop:1px solid rgba(255, 255, 255, 0.1)]">
|
|
548
|
+
<button
|
|
549
|
+
onClick={() => this.handleCloseModal()}
|
|
550
|
+
className="transition pl-[24px] pr-[24px] pt-[8px] pb-[8px] rounded font-bold text-xs tracking-[0.05em] bg-[transparent] border-[2px] border-solid border-[#00ffff] text-[#00ffff] shadow-[0 0 10px rgba(0, 255, 255, 0.3)]"
|
|
551
|
+
>
|
|
552
|
+
关闭
|
|
553
|
+
</button>
|
|
554
|
+
<button className="transition pl-[24px] pr-[24px] pt-[8px] pb-[8px] rounded font-bold text-xs tracking-[0.05em] bg-[rgba(0, 255, 255, 0.1)] border-[2px] border-solid border-[#00ffff] text-[#00ffff] shadow-[0 0 10px rgba(0, 255, 255, 0.3)]">
|
|
555
|
+
编辑用户
|
|
556
|
+
</button>
|
|
557
|
+
</View>
|
|
558
|
+
</View>
|
|
559
|
+
</View>
|
|
560
|
+
)}
|
|
561
|
+
</View>
|
|
562
|
+
</Page>
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export default Document;
|