@4399ywkf/cli 1.0.5 → 1.0.6
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/dist/templates/actions.ts +11 -14
- package/dist/templates/initialState.ts +10 -28
- package/package.json +1 -1
- package/dist/templates/Loading/__tests__/Loading.test.tsx +0 -23
- package/dist/templates/Loading.test.tsx +0 -23
- package/dist/templates/__mocks__/fileMock.js +0 -1
- package/dist/templates/__mocks__/styleMock.ts +0 -1
- package/dist/templates/__tests__/Loading.test.tsx +0 -23
- package/dist/templates/__tests__/example.test.ts +0 -7
- package/dist/templates/app/locales/en-US/common.json +0 -74
- package/dist/templates/app/locales/en-US/generate.json +0 -71
- package/dist/templates/app/locales/en-US/nav.json +0 -10
- package/dist/templates/app/locales/en-US/overview.json +0 -6
- package/dist/templates/app/locales/en-US/retopology.json +0 -4
- package/dist/templates/app/locales/en-US/rigging.json +0 -21
- package/dist/templates/app/locales/en-US/segmentation.json +0 -4
- package/dist/templates/app/locales/en-US/stylization.json +0 -11
- package/dist/templates/app/locales/en-US/texture.json +0 -4
- package/dist/templates/app/locales/en-US/threeModel.json +0 -9
- package/dist/templates/app/locales/en-US/toolbox.json +0 -11
- package/dist/templates/app/locales/zh-CN/common.json +0 -74
- package/dist/templates/app/locales/zh-CN/generate.json +0 -71
- package/dist/templates/app/locales/zh-CN/nav.json +0 -10
- package/dist/templates/app/locales/zh-CN/overview.json +0 -6
- package/dist/templates/app/locales/zh-CN/retopology.json +0 -4
- package/dist/templates/app/locales/zh-CN/rigging.json +0 -21
- package/dist/templates/app/locales/zh-CN/segmentation.json +0 -4
- package/dist/templates/app/locales/zh-CN/stylization.json +0 -11
- package/dist/templates/app/locales/zh-CN/texture.json +0 -4
- package/dist/templates/app/locales/zh-CN/threeModel.json +0 -9
- package/dist/templates/app/locales/zh-CN/toolbox.json +0 -11
- package/dist/templates/app/src/__mocks__/fileMock.js +0 -1
- package/dist/templates/app/src/__mocks__/styleMock.ts +0 -1
- package/dist/templates/app/src/components/Loading/__tests__/Loading.test.tsx +0 -23
- package/dist/templates/app/src/loading.tsx +0 -52
- package/dist/templates/app/src/locales/default/chat.ts +0 -455
- package/dist/templates/app/src/pages/index.css +0 -282
- package/dist/templates/app/src/setupTests.ts +0 -39
- package/dist/templates/app/src/test-utils.tsx +0 -18
- package/dist/templates/app/src/utils/__tests__/example.test.ts +0 -7
- package/dist/templates/app/store/auth/index.tsx +0 -82
- package/dist/templates/app/store/auth/indexApi.tsx +0 -11
- package/dist/templates/app/store/global/index.tsx +0 -133
- package/dist/templates/app/store/global/indexApi.tsx +0 -19
- package/dist/templates/app/store/global/types.ts +0 -62
- package/dist/templates/app/store/theme/index.ts +0 -25
- package/dist/templates/auth/index.tsx +0 -82
- package/dist/templates/auth/indexApi.tsx +0 -11
- package/dist/templates/chat.ts +0 -455
- package/dist/templates/common.json +0 -74
- package/dist/templates/components/Loading/__tests__/Loading.test.tsx +0 -23
- package/dist/templates/default/chat.ts +0 -455
- package/dist/templates/en-US/common.json +0 -74
- package/dist/templates/en-US/generate.json +0 -71
- package/dist/templates/en-US/nav.json +0 -10
- package/dist/templates/en-US/overview.json +0 -6
- package/dist/templates/en-US/retopology.json +0 -4
- package/dist/templates/en-US/rigging.json +0 -21
- package/dist/templates/en-US/segmentation.json +0 -4
- package/dist/templates/en-US/stylization.json +0 -11
- package/dist/templates/en-US/texture.json +0 -4
- package/dist/templates/en-US/threeModel.json +0 -9
- package/dist/templates/en-US/toolbox.json +0 -11
- package/dist/templates/example.test.ts +0 -7
- package/dist/templates/fileMock.js +0 -1
- package/dist/templates/generate.json +0 -71
- package/dist/templates/global/index.tsx +0 -133
- package/dist/templates/global/indexApi.tsx +0 -19
- package/dist/templates/global/types.ts +0 -62
- package/dist/templates/loading.tsx +0 -52
- package/dist/templates/locales/default/chat.ts +0 -455
- package/dist/templates/locales/en-US/common.json +0 -74
- package/dist/templates/locales/en-US/generate.json +0 -71
- package/dist/templates/locales/en-US/nav.json +0 -10
- package/dist/templates/locales/en-US/overview.json +0 -6
- package/dist/templates/locales/en-US/retopology.json +0 -4
- package/dist/templates/locales/en-US/rigging.json +0 -21
- package/dist/templates/locales/en-US/segmentation.json +0 -4
- package/dist/templates/locales/en-US/stylization.json +0 -11
- package/dist/templates/locales/en-US/texture.json +0 -4
- package/dist/templates/locales/en-US/threeModel.json +0 -9
- package/dist/templates/locales/en-US/toolbox.json +0 -11
- package/dist/templates/locales/zh-CN/common.json +0 -74
- package/dist/templates/locales/zh-CN/generate.json +0 -71
- package/dist/templates/locales/zh-CN/nav.json +0 -10
- package/dist/templates/locales/zh-CN/overview.json +0 -6
- package/dist/templates/locales/zh-CN/retopology.json +0 -4
- package/dist/templates/locales/zh-CN/rigging.json +0 -21
- package/dist/templates/locales/zh-CN/segmentation.json +0 -4
- package/dist/templates/locales/zh-CN/stylization.json +0 -11
- package/dist/templates/locales/zh-CN/texture.json +0 -4
- package/dist/templates/locales/zh-CN/threeModel.json +0 -9
- package/dist/templates/locales/zh-CN/toolbox.json +0 -11
- package/dist/templates/nav.json +0 -10
- package/dist/templates/overview.json +0 -6
- package/dist/templates/pages/index.css +0 -282
- package/dist/templates/retopology.json +0 -4
- package/dist/templates/rigging.json +0 -21
- package/dist/templates/segmentation.json +0 -4
- package/dist/templates/setupTests.ts +0 -39
- package/dist/templates/src/__mocks__/fileMock.js +0 -1
- package/dist/templates/src/__mocks__/styleMock.ts +0 -1
- package/dist/templates/src/components/Loading/__tests__/Loading.test.tsx +0 -23
- package/dist/templates/src/loading.tsx +0 -52
- package/dist/templates/src/locales/default/chat.ts +0 -455
- package/dist/templates/src/pages/index.css +0 -282
- package/dist/templates/src/setupTests.ts +0 -39
- package/dist/templates/src/test-utils.tsx +0 -18
- package/dist/templates/src/utils/__tests__/example.test.ts +0 -7
- package/dist/templates/store/auth/index.tsx +0 -82
- package/dist/templates/store/auth/indexApi.tsx +0 -11
- package/dist/templates/store/global/index.tsx +0 -133
- package/dist/templates/store/global/indexApi.tsx +0 -19
- package/dist/templates/store/global/types.ts +0 -62
- package/dist/templates/store/theme/index.ts +0 -25
- package/dist/templates/styleMock.ts +0 -1
- package/dist/templates/stylization.json +0 -11
- package/dist/templates/test-utils.tsx +0 -18
- package/dist/templates/texture.json +0 -4
- package/dist/templates/theme/index.ts +0 -25
- package/dist/templates/threeModel.json +0 -9
- package/dist/templates/toolbox.json +0 -11
- package/dist/templates/utils/__tests__/example.test.ts +0 -7
- package/dist/templates/zh-CN/common.json +0 -74
- package/dist/templates/zh-CN/generate.json +0 -71
- package/dist/templates/zh-CN/nav.json +0 -10
- package/dist/templates/zh-CN/overview.json +0 -6
- package/dist/templates/zh-CN/retopology.json +0 -4
- package/dist/templates/zh-CN/rigging.json +0 -21
- package/dist/templates/zh-CN/segmentation.json +0 -4
- package/dist/templates/zh-CN/stylization.json +0 -11
- package/dist/templates/zh-CN/texture.json +0 -4
- package/dist/templates/zh-CN/threeModel.json +0 -9
- package/dist/templates/zh-CN/toolbox.json +0 -11
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
html,
|
|
2
|
-
body {
|
|
3
|
-
padding: 0;
|
|
4
|
-
margin: 0;
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 100%;
|
|
7
|
-
font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
#root {
|
|
11
|
-
height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
p {
|
|
16
|
-
margin: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
* {
|
|
20
|
-
-webkit-font-smoothing: antialiased;
|
|
21
|
-
-moz-osx-font-smoothing: grayscale;
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
main {
|
|
26
|
-
flex: 1;
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
align-items: center;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
.module__app {
|
|
35
|
-
height: calc(100vh - 50px) !important;
|
|
36
|
-
position: relative;
|
|
37
|
-
width: 100%;
|
|
38
|
-
-webkit-box-pack: start;
|
|
39
|
-
place-content: flex-start;
|
|
40
|
-
align-items: flex-start;
|
|
41
|
-
-webkit-font-smoothing: antialiased;
|
|
42
|
-
overflow: auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:root {
|
|
46
|
-
--red-1: 255, 236, 232;
|
|
47
|
-
--red-2: 253, 205, 197;
|
|
48
|
-
--red-3: 251, 172, 163;
|
|
49
|
-
--red-4: 249, 137, 129;
|
|
50
|
-
--red-5: 247, 101, 96;
|
|
51
|
-
--red-6: 245, 63, 63;
|
|
52
|
-
--red-7: 203, 39, 45;
|
|
53
|
-
--red-8: 161, 21, 30;
|
|
54
|
-
--red-9: 119, 8, 19;
|
|
55
|
-
--red-10: 77, 0, 10;
|
|
56
|
-
--orangered-1: 255, 243, 232;
|
|
57
|
-
--orangered-2: 253, 221, 195;
|
|
58
|
-
--orangered-3: 252, 197, 159;
|
|
59
|
-
--orangered-4: 250, 172, 123;
|
|
60
|
-
--orangered-5: 249, 144, 87;
|
|
61
|
-
--orangered-6: 247, 114, 52;
|
|
62
|
-
--orangered-7: 204, 81, 32;
|
|
63
|
-
--orangered-8: 162, 53, 17;
|
|
64
|
-
--orangered-9: 119, 31, 6;
|
|
65
|
-
--orangered-10: 77, 14, 0;
|
|
66
|
-
--orange-1: 255, 247, 232;
|
|
67
|
-
--orange-2: 255, 228, 186;
|
|
68
|
-
--orange-3: 255, 207, 139;
|
|
69
|
-
--orange-4: 255, 182, 93;
|
|
70
|
-
--orange-5: 255, 154, 46;
|
|
71
|
-
--orange-6: 255, 125, 0;
|
|
72
|
-
--orange-7: 210, 95, 0;
|
|
73
|
-
--orange-8: 166, 69, 0;
|
|
74
|
-
--orange-9: 121, 46, 0;
|
|
75
|
-
--orange-10: 77, 27, 0;
|
|
76
|
-
--gold-1: 255, 252, 232;
|
|
77
|
-
--gold-2: 253, 244, 191;
|
|
78
|
-
--gold-3: 252, 233, 150;
|
|
79
|
-
--gold-4: 250, 220, 109;
|
|
80
|
-
--gold-5: 249, 204, 69;
|
|
81
|
-
--gold-6: 247, 186, 30;
|
|
82
|
-
--gold-7: 204, 146, 19;
|
|
83
|
-
--gold-8: 162, 109, 10;
|
|
84
|
-
--gold-9: 119, 75, 4;
|
|
85
|
-
--gold-10: 77, 45, 0;
|
|
86
|
-
--yellow-1: 254, 255, 232;
|
|
87
|
-
--yellow-2: 254, 254, 190;
|
|
88
|
-
--yellow-3: 253, 250, 148;
|
|
89
|
-
--yellow-4: 252, 242, 107;
|
|
90
|
-
--yellow-5: 251, 232, 66;
|
|
91
|
-
--yellow-6: 250, 220, 25;
|
|
92
|
-
--yellow-7: 207, 175, 15;
|
|
93
|
-
--yellow-8: 163, 132, 8;
|
|
94
|
-
--yellow-9: 120, 93, 3;
|
|
95
|
-
--yellow-10: 77, 56, 0;
|
|
96
|
-
--lime-1: 252, 255, 232;
|
|
97
|
-
--lime-2: 237, 248, 187;
|
|
98
|
-
--lime-3: 220, 241, 144;
|
|
99
|
-
--lime-4: 201, 233, 104;
|
|
100
|
-
--lime-5: 181, 226, 65;
|
|
101
|
-
--lime-6: 159, 219, 29;
|
|
102
|
-
--lime-7: 126, 183, 18;
|
|
103
|
-
--lime-8: 95, 148, 10;
|
|
104
|
-
--lime-9: 67, 112, 4;
|
|
105
|
-
--lime-10: 42, 77, 0;
|
|
106
|
-
--green-1: 232, 255, 234;
|
|
107
|
-
--green-2: 175, 240, 181;
|
|
108
|
-
--green-3: 123, 225, 136;
|
|
109
|
-
--green-4: 76, 210, 99;
|
|
110
|
-
--green-5: 35, 195, 67;
|
|
111
|
-
--green-6: 0, 180, 42;
|
|
112
|
-
--green-7: 0, 154, 41;
|
|
113
|
-
--green-8: 0, 128, 38;
|
|
114
|
-
--green-9: 0, 102, 34;
|
|
115
|
-
--green-10: 0, 77, 28;
|
|
116
|
-
--cyan-1: 232, 255, 251;
|
|
117
|
-
--cyan-2: 183, 244, 236;
|
|
118
|
-
--cyan-3: 137, 233, 224;
|
|
119
|
-
--cyan-4: 94, 223, 214;
|
|
120
|
-
--cyan-5: 55, 212, 207;
|
|
121
|
-
--cyan-6: 20, 201, 201;
|
|
122
|
-
--cyan-7: 13, 165, 170;
|
|
123
|
-
--cyan-8: 7, 130, 139;
|
|
124
|
-
--cyan-9: 3, 97, 108;
|
|
125
|
-
--cyan-10: 0, 66, 77;
|
|
126
|
-
--blue-1: 232, 247, 255;
|
|
127
|
-
--blue-2: 195, 231, 254;
|
|
128
|
-
--blue-3: 159, 212, 253;
|
|
129
|
-
--blue-4: 123, 192, 252;
|
|
130
|
-
--blue-5: 87, 169, 251;
|
|
131
|
-
--blue-6: 52, 145, 250;
|
|
132
|
-
--blue-7: 32, 108, 207;
|
|
133
|
-
--blue-8: 17, 75, 163;
|
|
134
|
-
--blue-9: 6, 48, 120;
|
|
135
|
-
--blue-10: 0, 26, 77;
|
|
136
|
-
--arcoblue-1: 232, 243, 255;
|
|
137
|
-
--arcoblue-2: 190, 218, 255;
|
|
138
|
-
--arcoblue-3: 148, 191, 255;
|
|
139
|
-
--arcoblue-4: 106, 161, 255;
|
|
140
|
-
--arcoblue-5: 64, 128, 255;
|
|
141
|
-
--arcoblue-6: 22, 93, 255;
|
|
142
|
-
--arcoblue-7: 14, 66, 210;
|
|
143
|
-
--arcoblue-8: 7, 44, 166;
|
|
144
|
-
--arcoblue-9: 3, 26, 121;
|
|
145
|
-
--arcoblue-10: 0, 13, 77;
|
|
146
|
-
--purple-1: 245, 232, 255;
|
|
147
|
-
--purple-2: 221, 190, 246;
|
|
148
|
-
--purple-3: 195, 150, 237;
|
|
149
|
-
--purple-4: 168, 113, 227;
|
|
150
|
-
--purple-5: 141, 78, 218;
|
|
151
|
-
--purple-6: 114, 46, 209;
|
|
152
|
-
--purple-7: 85, 29, 176;
|
|
153
|
-
--purple-8: 60, 16, 143;
|
|
154
|
-
--purple-9: 39, 6, 110;
|
|
155
|
-
--purple-10: 22, 0, 77;
|
|
156
|
-
--pinkpurple-1: 255, 232, 251;
|
|
157
|
-
--pinkpurple-2: 247, 186, 239;
|
|
158
|
-
--pinkpurple-3: 240, 142, 230;
|
|
159
|
-
--pinkpurple-4: 232, 101, 223;
|
|
160
|
-
--pinkpurple-5: 225, 62, 219;
|
|
161
|
-
--pinkpurple-6: 217, 26, 217;
|
|
162
|
-
--pinkpurple-7: 176, 16, 182;
|
|
163
|
-
--pinkpurple-8: 138, 9, 147;
|
|
164
|
-
--pinkpurple-9: 101, 3, 112;
|
|
165
|
-
--pinkpurple-10: 66, 0, 77;
|
|
166
|
-
--magenta-1: 255, 232, 241;
|
|
167
|
-
--magenta-2: 253, 194, 219;
|
|
168
|
-
--magenta-3: 251, 157, 199;
|
|
169
|
-
--magenta-4: 249, 121, 183;
|
|
170
|
-
--magenta-5: 247, 84, 168;
|
|
171
|
-
--magenta-6: 245, 49, 157;
|
|
172
|
-
--magenta-7: 203, 30, 131;
|
|
173
|
-
--magenta-8: 161, 16, 105;
|
|
174
|
-
--magenta-9: 119, 6, 79;
|
|
175
|
-
--magenta-10: 77, 0, 52;
|
|
176
|
-
--gray-1: 247, 248, 250;
|
|
177
|
-
--gray-2: 242, 243, 245;
|
|
178
|
-
--gray-4: 201, 205, 212;
|
|
179
|
-
--gray-5: 169, 174, 184;
|
|
180
|
-
--gray-6: 134, 144, 156;
|
|
181
|
-
--gray-7: 107, 119, 133;
|
|
182
|
-
--gray-8: 78, 89, 105;
|
|
183
|
-
--gray-9: 39, 46, 59;
|
|
184
|
-
--gray-10: 29, 33, 41;
|
|
185
|
-
--data-2: var(--arcoblue-2);
|
|
186
|
-
--data-3: 85, 197, 253;
|
|
187
|
-
--data-4: 156, 220, 252;
|
|
188
|
-
--data-8: var(--green-2);
|
|
189
|
-
--data-10: var(--purple-2);
|
|
190
|
-
--success-1: var(--green-1);
|
|
191
|
-
--success-2: var(--green-2);
|
|
192
|
-
--success-3: var(--green-3);
|
|
193
|
-
--success-4: var(--green-4);
|
|
194
|
-
--success-5: var(--green-5);
|
|
195
|
-
--success-6: var(--green-6);
|
|
196
|
-
--success-7: var(--green-7);
|
|
197
|
-
--success-8: var(--green-8);
|
|
198
|
-
--success-9: var(--green-9);
|
|
199
|
-
--success-10: var(--green-10);
|
|
200
|
-
--primary-1: var(--arcoblue-1);
|
|
201
|
-
--primary-2: var(--arcoblue-2);
|
|
202
|
-
--primary-3: var(--arcoblue-3);
|
|
203
|
-
--primary-4: var(--arcoblue-4);
|
|
204
|
-
--primary-5: var(--arcoblue-5);
|
|
205
|
-
--primary-6: var(--arcoblue-6);
|
|
206
|
-
--primary-7: var(--arcoblue-7);
|
|
207
|
-
--primary-8: var(--arcoblue-8);
|
|
208
|
-
--primary-9: var(--arcoblue-9);
|
|
209
|
-
--primary-10: var(--arcoblue-10);
|
|
210
|
-
--danger-1: var(--red-1);
|
|
211
|
-
--danger-2: var(--red-2);
|
|
212
|
-
--danger-3: var(--red-3);
|
|
213
|
-
--danger-4: var(--red-4);
|
|
214
|
-
--danger-5: var(--red-5);
|
|
215
|
-
--danger-6: var(--red-6);
|
|
216
|
-
--danger-7: var(--red-7);
|
|
217
|
-
--danger-8: var(--red-8);
|
|
218
|
-
--danger-9: var(--red-9);
|
|
219
|
-
--danger-10: var(--red-10);
|
|
220
|
-
--warning-1: var(--orange-1);
|
|
221
|
-
--warning-2: var(--orange-2);
|
|
222
|
-
--warning-3: var(--orange-3);
|
|
223
|
-
--warning-4: var(--orange-4);
|
|
224
|
-
--warning-5: var(--orange-5);
|
|
225
|
-
--warning-6: var(--orange-6);
|
|
226
|
-
--warning-7: var(--orange-7);
|
|
227
|
-
--warning-8: var(--orange-8);
|
|
228
|
-
--warning-9: var(--orange-9);
|
|
229
|
-
--warning-10: var(--orange-10);
|
|
230
|
-
--link-1: var(--arcoblue-1);
|
|
231
|
-
--link-2: var(--arcoblue-2);
|
|
232
|
-
--link-3: var(--arcoblue-3);
|
|
233
|
-
--link-4: var(--arcoblue-4);
|
|
234
|
-
--link-5: var(--arcoblue-5);
|
|
235
|
-
--link-6: var(--arcoblue-6);
|
|
236
|
-
--link-7: var(--arcoblue-7);
|
|
237
|
-
--link-8: var(--arcoblue-8);
|
|
238
|
-
--link-9: var(--arcoblue-9);
|
|
239
|
-
--link-10: var(--arcoblue-10);
|
|
240
|
-
--data-1: var(--arcoblue-5);
|
|
241
|
-
--data-5: var(--orange-6);
|
|
242
|
-
--data-6: var(--orange-3);
|
|
243
|
-
--data-7: var(--green-4);
|
|
244
|
-
--data-9: var(--purple-4);
|
|
245
|
-
--data-11: var(--gold-6);
|
|
246
|
-
--data-12: var(--gold-4);
|
|
247
|
-
--data-13: var(--lime-6);
|
|
248
|
-
--data-14: var(--lime-4);
|
|
249
|
-
--data-15: var(--magenta-4);
|
|
250
|
-
--data-16: var(--magenta-3);
|
|
251
|
-
--data-17: var(--cyan-6);
|
|
252
|
-
--data-18: var(--cyan-3);
|
|
253
|
-
--data-19: var(--pinkpurple-4);
|
|
254
|
-
--data-20: var(--pinkpurple-2);
|
|
255
|
-
--container--layout--padding: 20px 32px;
|
|
256
|
-
--border-radius-medium: 4px;
|
|
257
|
-
--color-border-3: #dde2e9;
|
|
258
|
-
--primary-5: 66, 129, 255;
|
|
259
|
-
--color-text-1: rgb(29, 33, 41);
|
|
260
|
-
--color-fill-2: rgb(242, 243, 245);
|
|
261
|
-
--gray-3: 229, 230, 235;
|
|
262
|
-
--color-neutral-3: rgb(var(--gray-3));
|
|
263
|
-
--container--form--layout--header-height: 64px;
|
|
264
|
-
--contexify-zIndex: 666 !important;
|
|
265
|
-
--contexify-menu-minWidth: 220px !important;
|
|
266
|
-
--contexify-menu-padding: 6px !important;
|
|
267
|
-
--contexify-menu-radius: var(--border-radius-medium) !important;
|
|
268
|
-
--contexify-menu-bgColor: #fff !important;
|
|
269
|
-
--contexify-menu-shadow: 0 4px 10px rgba(0, 0, 0, .1) !important;
|
|
270
|
-
--contexify-menu-negatePadding: var(--contexify-menu-padding) !important;
|
|
271
|
-
--contexify-separator-color: rgba(0, 0, 0, .2) !important;
|
|
272
|
-
--contexify-separator-margin: 5px !important;
|
|
273
|
-
--contexify-itemContent-padding: 6px !important;
|
|
274
|
-
--contexify-activeItem-radius: 4px !important;
|
|
275
|
-
--contexify-item-color: #333 !important;
|
|
276
|
-
--contexify-activeItem-color: var(--color-text-1) !important;
|
|
277
|
-
--contexify-activeItem-bgColor: var(--color-fill-2) !important;
|
|
278
|
-
--contexify-rightSlot-color: #6f6e77 !important;
|
|
279
|
-
--contexify-activeRightSlot-color: #fff !important;
|
|
280
|
-
--contexify-arrow-color: #6f6e77 !important;
|
|
281
|
-
--contexify-activeArrow-color: #fff !important
|
|
282
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
2
|
-
|
|
3
|
-
// 模拟 window.matchMedia
|
|
4
|
-
Object.defineProperty(window, 'matchMedia', {
|
|
5
|
-
writable: true,
|
|
6
|
-
value: jest.fn().mockImplementation((query) => ({
|
|
7
|
-
matches: false,
|
|
8
|
-
media: query,
|
|
9
|
-
onchange: null,
|
|
10
|
-
addListener: jest.fn(), // deprecated
|
|
11
|
-
removeListener: jest.fn(), // deprecated
|
|
12
|
-
addEventListener: jest.fn(),
|
|
13
|
-
removeEventListener: jest.fn(),
|
|
14
|
-
dispatchEvent: jest.fn(),
|
|
15
|
-
})),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// 模拟 ResizeObserver
|
|
19
|
-
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
20
|
-
observe: jest.fn(),
|
|
21
|
-
unobserve: jest.fn(),
|
|
22
|
-
disconnect: jest.fn(),
|
|
23
|
-
}));
|
|
24
|
-
|
|
25
|
-
// 模拟 IntersectionObserver
|
|
26
|
-
global.IntersectionObserver = jest.fn().mockImplementation(() => ({
|
|
27
|
-
observe: jest.fn(),
|
|
28
|
-
unobserve: jest.fn(),
|
|
29
|
-
disconnect: jest.fn(),
|
|
30
|
-
}));
|
|
31
|
-
|
|
32
|
-
// 模拟 Garfish (微前端框架)
|
|
33
|
-
(global as any).window = global.window || {};
|
|
34
|
-
(global as any).window.__GARFISH__ = true;
|
|
35
|
-
(global as any).window.Garfish = {
|
|
36
|
-
channel: {
|
|
37
|
-
emit: jest.fn(),
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { render, RenderOptions } from '@testing-library/react';
|
|
2
|
-
import { ConfigProvider } from 'antd';
|
|
3
|
-
import React, { ReactElement } from 'react';
|
|
4
|
-
import { BrowserRouter } from 'react-router';
|
|
5
|
-
|
|
6
|
-
// 创建自定义渲染函数
|
|
7
|
-
const AllTheProviders = ({ children }: { children: React.ReactNode }) => {
|
|
8
|
-
return (
|
|
9
|
-
<BrowserRouter>
|
|
10
|
-
<ConfigProvider prefixCls='test'>{children}</ConfigProvider>
|
|
11
|
-
</BrowserRouter>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const customRender = (ui: ReactElement, options?: Omit<RenderOptions, 'wrapper'>) => render(ui, { wrapper: AllTheProviders, ...options });
|
|
16
|
-
|
|
17
|
-
export * from '@testing-library/react';
|
|
18
|
-
export { customRender as render };
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { create } from "zustand";
|
|
2
|
-
const Cookie = require("js-cookie");
|
|
3
|
-
import jwt from "@config/jwt";
|
|
4
|
-
import {
|
|
5
|
-
apiLogin,
|
|
6
|
-
apiLogout
|
|
7
|
-
} from './indexApi';
|
|
8
|
-
|
|
9
|
-
interface BearState {
|
|
10
|
-
showCaptcha: boolean,
|
|
11
|
-
captchaR: string,
|
|
12
|
-
loginStatus: boolean,
|
|
13
|
-
login: (params: LoginProps) => Promise<{loginStatus: boolean}>,
|
|
14
|
-
loginLoading: boolean,
|
|
15
|
-
|
|
16
|
-
logout: () => Promise<void>,
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface LoginProps {
|
|
20
|
-
payload: Object,
|
|
21
|
-
redirect?: string,
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const useStore = create<BearState>()((set) => ({
|
|
25
|
-
showCaptcha: false,
|
|
26
|
-
loginStatus: false,
|
|
27
|
-
captchaR: (Math.random().toString(36).substr(2) + Math.random().toString(36).substr(2))
|
|
28
|
-
.slice(2, 18),
|
|
29
|
-
loginLoading: false,
|
|
30
|
-
login: async (params: LoginProps) => {
|
|
31
|
-
set({ loginLoading: true })
|
|
32
|
-
const { payload, redirect } = params;
|
|
33
|
-
let defaultUrl = ""
|
|
34
|
-
let client = Cookie.get("client");
|
|
35
|
-
if (!client) {
|
|
36
|
-
client = (Math.random().toString(36).substr(2) + Math.random().toString(36).substr(2))
|
|
37
|
-
.slice(2, 18);
|
|
38
|
-
Cookie.set('client', client);
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
const { data } = await apiLogin({ ...payload, _xsrf: client })
|
|
42
|
-
// const { data } = yield call(apiLogin, { ...payload, _xsrf: client });
|
|
43
|
-
// yield put({ type: 'showCaptcha', payload: false });
|
|
44
|
-
set({ showCaptcha: false });
|
|
45
|
-
jwt.setAccessToken(data);
|
|
46
|
-
if (data?.path != "") {
|
|
47
|
-
defaultUrl = data?.path
|
|
48
|
-
}
|
|
49
|
-
if (redirect) {
|
|
50
|
-
defaultUrl = redirect
|
|
51
|
-
}
|
|
52
|
-
set({ loginStatus: true, loginLoading: false, })
|
|
53
|
-
return { loginStatus: true }
|
|
54
|
-
// yield put({ type: "setLoginStatus", payload: true })
|
|
55
|
-
} catch (error) {
|
|
56
|
-
// yield put({ type: 'updateCaptcha' });
|
|
57
|
-
set({
|
|
58
|
-
captchaR: (Math.random().toString(36).substr(2) + Math.random().toString(36).substr(2))
|
|
59
|
-
.slice(2, 18)
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
// yield put({ type: 'global/showMsg', payload: error });
|
|
63
|
-
if ((error as Error).message === '请输入验证码') {
|
|
64
|
-
set({ showCaptcha: true })
|
|
65
|
-
// yield put({ type: 'showCaptcha', payload: true });
|
|
66
|
-
}
|
|
67
|
-
set({ loginStatus: false, loginLoading: false })
|
|
68
|
-
// yield put({ type: "setLoginStatus", payload: false })
|
|
69
|
-
return { loginStatus: false }
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
logout:async () => {
|
|
74
|
-
await apiLogout({})
|
|
75
|
-
Cookie.remove(jwt.key);
|
|
76
|
-
Cookie.remove('_xsrf');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
}))
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export default useStore;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Request } from '@config/request';
|
|
2
|
-
|
|
3
|
-
const request = new Request({});
|
|
4
|
-
|
|
5
|
-
export function apiLogin(params: any) {
|
|
6
|
-
return request.post('/main/gateway/login', params);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function apiLogout(params: any) {
|
|
10
|
-
return request.put('/main/gateway/logout', params);
|
|
11
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import type { SiderRoutesProps } from '@store/types';
|
|
2
|
-
import _ from 'lodash-es';
|
|
3
|
-
import { create } from 'zustand';
|
|
4
|
-
import {
|
|
5
|
-
apiGetCopyright,
|
|
6
|
-
apiGetCurrentUser,
|
|
7
|
-
apiGetModule,
|
|
8
|
-
apiGetNav,
|
|
9
|
-
} from './indexApi';
|
|
10
|
-
import type { BearState, MicroActiveAppsProps } from './types';
|
|
11
|
-
|
|
12
|
-
function addApp(stateMicroActiveApps, appInfo, set) {
|
|
13
|
-
// 如果已存在相同 id,则不处理
|
|
14
|
-
if (stateMicroActiveApps.find(o => o.id === appInfo.id)) return;
|
|
15
|
-
stateMicroActiveApps.push(appInfo);
|
|
16
|
-
set({ microActiveApps: stateMicroActiveApps });
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function removeApp(stateMicroActiveApps, appInfo, set) {
|
|
20
|
-
const removeIndex = stateMicroActiveApps.findIndex(o => o.id === appInfo.id);
|
|
21
|
-
if (removeIndex === -1) return;
|
|
22
|
-
stateMicroActiveApps.splice(removeIndex, 1);
|
|
23
|
-
set({ microActiveApps: stateMicroActiveApps });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function updateApp(stateMicroActiveApps, appInfo, set) {
|
|
27
|
-
const updateIndex = stateMicroActiveApps.findIndex(o => o.id === appInfo.id);
|
|
28
|
-
if (updateIndex === -1) return;
|
|
29
|
-
stateMicroActiveApps[updateIndex] = appInfo;
|
|
30
|
-
set({ microActiveApps: stateMicroActiveApps });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const useGlobalStore = create<BearState>()((set, get) => ({
|
|
34
|
-
year: {
|
|
35
|
-
s: '0',
|
|
36
|
-
e: '0',
|
|
37
|
-
},
|
|
38
|
-
currentUser: {},
|
|
39
|
-
navCode: [],
|
|
40
|
-
microActiveApps: [],
|
|
41
|
-
siderRoutes: {}, // 侧边栏路由配置
|
|
42
|
-
getYearData: async (params: any) => {
|
|
43
|
-
const { data } = await apiGetCopyright(params);
|
|
44
|
-
set({ year: data.year });
|
|
45
|
-
},
|
|
46
|
-
syncGetCurrentUser: (params: any) => {
|
|
47
|
-
apiGetCurrentUser(params).then(res => {
|
|
48
|
-
const { data } = res;
|
|
49
|
-
set({ currentUser: data?.user });
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
getCurrentUser: async () => {
|
|
53
|
-
const { data } = await apiGetCurrentUser({});
|
|
54
|
-
set({ currentUser: data?.user });
|
|
55
|
-
return { currentUser: data?.user };
|
|
56
|
-
},
|
|
57
|
-
syncGetNav: (params: any) => {
|
|
58
|
-
apiGetNav(params).then(res => {
|
|
59
|
-
const { data } = res;
|
|
60
|
-
set({ navCode: data });
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
getNav: async (params: any) => {
|
|
64
|
-
const { data } = await apiGetNav(params);
|
|
65
|
-
set({ navCode: data });
|
|
66
|
-
return { navCode: data };
|
|
67
|
-
},
|
|
68
|
-
modules: [],
|
|
69
|
-
syncGetModule: (params: any) => {
|
|
70
|
-
apiGetModule(params).then(res => {
|
|
71
|
-
const { data } = res;
|
|
72
|
-
set({ modules: data });
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
// 获取各个模块的信息 [{name: "模块名字", path: "激活路径", "perarr": "权限位", id: "xx", defaultroute: "应用默认打开路由"}]
|
|
76
|
-
getModule: async (params: any) => {
|
|
77
|
-
const { data } = await apiGetModule(params);
|
|
78
|
-
set({ modules: data });
|
|
79
|
-
return { modules: data };
|
|
80
|
-
},
|
|
81
|
-
getBasicInfo: async (params: any) => {
|
|
82
|
-
try {
|
|
83
|
-
const getCurrentUser = get().getCurrentUser;
|
|
84
|
-
const currentUserRes = await getCurrentUser(params);
|
|
85
|
-
const getNav = get().getNav;
|
|
86
|
-
const navCodeRes = await getNav(params);
|
|
87
|
-
const getModule = get().getModule;
|
|
88
|
-
const modulesRes = await getModule(params);
|
|
89
|
-
return {
|
|
90
|
-
...currentUserRes,
|
|
91
|
-
...navCodeRes,
|
|
92
|
-
...modulesRes,
|
|
93
|
-
};
|
|
94
|
-
} catch (error: any) {
|
|
95
|
-
console.log(error);
|
|
96
|
-
return {
|
|
97
|
-
currentUser: '',
|
|
98
|
-
navCode: [],
|
|
99
|
-
modules: [],
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
layout: {
|
|
104
|
-
renderFooter: false,
|
|
105
|
-
renderHeader: true,
|
|
106
|
-
renderSider: true,
|
|
107
|
-
},
|
|
108
|
-
setLayout: (params: BearState['layout']) => {
|
|
109
|
-
const stateLayout = get().layout;
|
|
110
|
-
set({ layout: { ...stateLayout, ...params } });
|
|
111
|
-
},
|
|
112
|
-
setMicroActiveApps: (params: MicroActiveAppsProps) => {
|
|
113
|
-
const { action, appInfo } = params;
|
|
114
|
-
const stateMicroActiveApps = _.cloneDeep(get().microActiveApps);
|
|
115
|
-
switch (action) {
|
|
116
|
-
case 'add':
|
|
117
|
-
addApp(stateMicroActiveApps, appInfo, set);
|
|
118
|
-
return;
|
|
119
|
-
case 'delete':
|
|
120
|
-
removeApp(stateMicroActiveApps, appInfo, set);
|
|
121
|
-
return;
|
|
122
|
-
case 'update':
|
|
123
|
-
updateApp(stateMicroActiveApps, appInfo, set);
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
setSiderRoutes: (params: SiderRoutesProps) => {
|
|
128
|
-
const stateSiderRoutes = get().siderRoutes;
|
|
129
|
-
set({ siderRoutes: { ...stateSiderRoutes, ...params } });
|
|
130
|
-
},
|
|
131
|
-
}));
|
|
132
|
-
|
|
133
|
-
export default useGlobalStore;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Request } from '@config/request';
|
|
2
|
-
|
|
3
|
-
const request = new Request({});
|
|
4
|
-
|
|
5
|
-
export function apiGetCopyright(params: any) {
|
|
6
|
-
return request.get('/main/gateway/copyright', params);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function apiGetCurrentUser(params: any) {
|
|
10
|
-
return request.get('/main/gateway/profile', params);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function apiGetNav(params: any) {
|
|
14
|
-
return request.get('/main/gateway/perarr', params);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function apiGetModule(params: any) {
|
|
18
|
-
return request.get('/main/gateway/module', params);
|
|
19
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { SiderRoutesProps } from '@store/types';
|
|
2
|
-
|
|
3
|
-
export interface YearProps {
|
|
4
|
-
s: string;
|
|
5
|
-
e: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface moduleItemProps {
|
|
9
|
-
defaultroute?: string;
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
|
-
path: string;
|
|
13
|
-
perarr: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface currentUserProps {
|
|
17
|
-
apipasswd?: string;
|
|
18
|
-
cname?: string;
|
|
19
|
-
email?: string;
|
|
20
|
-
name?: string;
|
|
21
|
-
stype?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface BearState {
|
|
25
|
-
year: YearProps;
|
|
26
|
-
getYearData: (params: any) => Promise<void>;
|
|
27
|
-
currentUser: currentUserProps;
|
|
28
|
-
getCurrentUser: (params: any) => Promise<{ currentUser: currentUserProps }>;
|
|
29
|
-
navCode: string[];
|
|
30
|
-
getNav: (params: any) => Promise<{ navCode: string[] }>;
|
|
31
|
-
modules: moduleItemProps[];
|
|
32
|
-
getModule: (params: any) => Promise<{ modules: moduleItemProps[] }>;
|
|
33
|
-
getBasicInfo: (params: any) => Promise<BasicInfoResponse>;
|
|
34
|
-
|
|
35
|
-
layout: {
|
|
36
|
-
renderSider?: boolean;
|
|
37
|
-
renderHeader?: boolean;
|
|
38
|
-
renderFooter?: boolean;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
setLayout: (params: BearState['layout']) => void;
|
|
42
|
-
|
|
43
|
-
syncGetCurrentUser: (params: any) => void;
|
|
44
|
-
syncGetNav: (params: any) => void;
|
|
45
|
-
syncGetModule: (params: any) => void;
|
|
46
|
-
|
|
47
|
-
microActiveApps: any[];
|
|
48
|
-
setMicroActiveApps: (params: MicroActiveAppsProps) => void;
|
|
49
|
-
siderRoutes: SiderRoutesProps;
|
|
50
|
-
setSiderRoutes: (params: SiderRoutesProps) => void;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface MicroActiveAppsProps {
|
|
54
|
-
action: 'add' | 'delete' | 'update';
|
|
55
|
-
appInfo: any;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface BasicInfoResponse {
|
|
59
|
-
currentUser: Object;
|
|
60
|
-
navCode: string[];
|
|
61
|
-
modules: moduleItemProps[];
|
|
62
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { create } from 'zustand';
|
|
2
|
-
import { createJSONStorage, persist } from 'zustand/middleware';
|
|
3
|
-
|
|
4
|
-
interface ThemeStore {
|
|
5
|
-
theme: string;
|
|
6
|
-
setTheme: (theme: string) => void;
|
|
7
|
-
isDark: () => boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const useThemeStore = create<ThemeStore, [['zustand/persist', unknown]]>(
|
|
11
|
-
persist(
|
|
12
|
-
(set, get) => ({
|
|
13
|
-
theme: 'light',
|
|
14
|
-
setTheme: theme => set({ theme }),
|
|
15
|
-
isDark: () => get().theme === 'dark',
|
|
16
|
-
}),
|
|
17
|
-
{
|
|
18
|
-
name: 'theme',
|
|
19
|
-
storage: createJSONStorage(() => localStorage),
|
|
20
|
-
version: 1,
|
|
21
|
-
},
|
|
22
|
-
),
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export default useThemeStore;
|