@liujitcn/kratos-taro-app-core 0.0.1

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.
Files changed (77) hide show
  1. package/README.md +36 -0
  2. package/dist/build.mjs +38 -0
  3. package/dist/runner.mjs +321 -0
  4. package/package.json +51 -0
  5. package/src/api/base/config.ts +20 -0
  6. package/src/api/base/file.ts +57 -0
  7. package/src/api/base/login.ts +87 -0
  8. package/src/api/base/menu.ts +17 -0
  9. package/src/api/base/oauth.ts +149 -0
  10. package/src/api/system/auth.ts +54 -0
  11. package/src/api/system/base_area.ts +34 -0
  12. package/src/api/system/base_dict.ts +24 -0
  13. package/src/bootstrap.ts +32 -0
  14. package/src/build.ts +24 -0
  15. package/src/components/BootstrapStatus.scss +28 -0
  16. package/src/components/BootstrapStatus.tsx +25 -0
  17. package/src/components/KratosPageFrame.scss +41 -0
  18. package/src/components/KratosPageFrame.tsx +51 -0
  19. package/src/components/KratosTabBar.scss +34 -0
  20. package/src/components/KratosTabBar.tsx +45 -0
  21. package/src/index.ts +36 -0
  22. package/src/module.ts +63 -0
  23. package/src/navigation-pattern.d.mts +2 -0
  24. package/src/navigation-pattern.mjs +29 -0
  25. package/src/navigation-tree.d.mts +12 -0
  26. package/src/navigation-tree.mjs +45 -0
  27. package/src/navigation.ts +336 -0
  28. package/src/pages.ts +21 -0
  29. package/src/rpc/base/v1/config.ts +34 -0
  30. package/src/rpc/base/v1/file.ts +66 -0
  31. package/src/rpc/base/v1/login.ts +128 -0
  32. package/src/rpc/base/v1/mcp.ts +20 -0
  33. package/src/rpc/base/v1/oauth.ts +199 -0
  34. package/src/rpc/base/v1/sse.ts +22 -0
  35. package/src/rpc/common/v1/common.ts +71 -0
  36. package/src/rpc/common/v1/enum.ts +71 -0
  37. package/src/rpc/common/v1/types.ts +77 -0
  38. package/src/rpc/google/protobuf/empty.ts +19 -0
  39. package/src/rpc/google/protobuf/wrappers.ts +124 -0
  40. package/src/rpc/system/app/v1/auth.ts +54 -0
  41. package/src/rpc/system/app/v1/base_area.ts +24 -0
  42. package/src/rpc/system/app/v1/base_dict.ts +37 -0
  43. package/src/rpc/system/app/v1/base_menu.ts +61 -0
  44. package/src/rpc/system/common/v1/enum.ts +80 -0
  45. package/src/runner.ts +390 -0
  46. package/src/static/images/avatar.png +0 -0
  47. package/src/static/images/center_bg.png +0 -0
  48. package/src/static/images/logo_icon.png +0 -0
  49. package/src/static/images/navigator_bg.png +0 -0
  50. package/src/static/tabs/home_default.png +0 -0
  51. package/src/static/tabs/home_selected.png +0 -0
  52. package/src/static/tabs/user_default.png +0 -0
  53. package/src/static/tabs/user_selected.png +0 -0
  54. package/src/stores/index.ts +2 -0
  55. package/src/stores/setting.ts +43 -0
  56. package/src/stores/user.ts +152 -0
  57. package/src/styles/base.scss +45 -0
  58. package/src/types/assets.d.ts +9 -0
  59. package/src/utils/auth.ts +55 -0
  60. package/src/utils/file.ts +48 -0
  61. package/src/utils/http.ts +262 -0
  62. package/src/utils/index.ts +35 -0
  63. package/src/utils/navigation.ts +72 -0
  64. package/src/utils/passwordCrypto.ts +257 -0
  65. package/src/views/pages/index/index.scss +137 -0
  66. package/src/views/pages/index/index.tsx +74 -0
  67. package/src/views/pages/login/components/BehaviorCaptcha.h5.tsx +46 -0
  68. package/src/views/pages/login/components/BehaviorCaptcha.tsx +6 -0
  69. package/src/views/pages/login/components/BehaviorCaptcha.weapp.tsx +6 -0
  70. package/src/views/pages/login/components/types.ts +32 -0
  71. package/src/views/pages/login/login.scss +310 -0
  72. package/src/views/pages/login/login.tsx +493 -0
  73. package/src/views/pages/login/protocal.scss +84 -0
  74. package/src/views/pages/login/protocal.tsx +73 -0
  75. package/src/views/pages/status/index.tsx +42 -0
  76. package/src/views/pages/webview/webview.scss +43 -0
  77. package/src/views/pages/webview/webview.tsx +41 -0
@@ -0,0 +1,310 @@
1
+ .login-page {
2
+ display: flex;
3
+ flex-direction: column;
4
+ justify-content: center;
5
+ min-height: 100vh;
6
+ padding: 48px 40px 56px;
7
+ background: linear-gradient(180deg, #f4fbf8 0%, #fff 45%, #fff 100%);
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ .login-hero {
12
+ margin-bottom: 40px;
13
+ text-align: center;
14
+ }
15
+
16
+ .login-logo-shell {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ width: 180px;
21
+ height: 180px;
22
+ margin-bottom: 24px;
23
+ border-radius: 44px;
24
+ background: rgba(255, 255, 255, 0.92);
25
+ box-shadow: 0 18px 44px rgba(40, 187, 156, 0.12);
26
+ }
27
+
28
+ .login-logo {
29
+ width: 120px;
30
+ height: 120px;
31
+ }
32
+
33
+ .login-hero-copy {
34
+ display: flex;
35
+ flex-direction: column;
36
+ }
37
+
38
+ .login-title {
39
+ color: #1f2937;
40
+ font-size: 44px;
41
+ font-weight: 600;
42
+ }
43
+
44
+ .login-subtitle {
45
+ margin-top: 12px;
46
+ color: #6b7280;
47
+ font-size: 26px;
48
+ }
49
+
50
+ .login-panel {
51
+ padding: 36px 28px 30px;
52
+ border-radius: 36px;
53
+ background: rgba(255, 255, 255, 0.96);
54
+ box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
55
+ }
56
+
57
+ .login-form {
58
+ display: flex;
59
+ flex-direction: column;
60
+ }
61
+
62
+ .login-bind-tip {
63
+ margin-bottom: 20px;
64
+ color: #6b7280;
65
+ font-size: 24px;
66
+ line-height: 1.5;
67
+ text-align: center;
68
+ }
69
+
70
+ .login-input {
71
+ width: 100%;
72
+ height: 88px;
73
+ padding: 0 30px;
74
+ margin-bottom: 20px;
75
+ border: 1PX solid #e5e7eb;
76
+ border-radius: 24px;
77
+ box-sizing: border-box;
78
+ color: #1f2937;
79
+ font-size: 28px;
80
+ background: #f9fbfa;
81
+
82
+ .weui-input {
83
+ width: 100%;
84
+ height: 100%;
85
+ padding: 0;
86
+ box-sizing: border-box;
87
+ color: inherit;
88
+ font: inherit;
89
+ }
90
+ }
91
+
92
+ .login-button {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: center;
96
+ width: 100%;
97
+ height: 88px;
98
+ margin-top: 12px;
99
+ border-radius: 24px;
100
+ color: #fff;
101
+ font-size: 30px;
102
+ font-weight: 500;
103
+ box-shadow: 0 18px 36px rgba(40, 187, 156, 0.24);
104
+
105
+ &::after {
106
+ border: 0;
107
+ }
108
+ }
109
+
110
+ .login-button-primary {
111
+ background: linear-gradient(135deg, #34c8aa 0%, #28bb9c 100%);
112
+ }
113
+
114
+ .login-phone-icon {
115
+ margin-right: 10px;
116
+ font-size: 40px;
117
+ }
118
+
119
+ .captcha-row {
120
+ display: flex;
121
+ align-items: center;
122
+ width: 100%;
123
+ height: 88px;
124
+ padding: 0 12px 0 30px;
125
+ margin-bottom: 20px;
126
+ border: 1PX solid #e5e7eb;
127
+ border-radius: 24px;
128
+ box-sizing: border-box;
129
+ background: #f9fbfa;
130
+ }
131
+
132
+ .captcha-input {
133
+ flex: 1;
134
+ height: 100%;
135
+ padding: 0;
136
+ margin-bottom: 0;
137
+ border: 0;
138
+ background: transparent;
139
+ }
140
+
141
+ .captcha-divider {
142
+ width: 1px;
143
+ height: 44px;
144
+ background: #e7ebf0;
145
+ }
146
+
147
+ .captcha-trigger {
148
+ display: flex;
149
+ flex: 0 0 170px;
150
+ align-items: center;
151
+ justify-content: center;
152
+ height: 72px;
153
+ margin-left: 14px;
154
+ border-radius: 18px;
155
+ box-sizing: border-box;
156
+ background: #fff;
157
+ }
158
+
159
+ .captcha-image {
160
+ width: 170px;
161
+ height: 60px;
162
+ flex-shrink: 0;
163
+ }
164
+
165
+ .login-behavior-mask {
166
+ position: fixed;
167
+ z-index: 99;
168
+ inset: 0;
169
+ display: flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ padding: 24px;
173
+ box-sizing: border-box;
174
+ background: rgba(15, 23, 42, 0.38);
175
+ }
176
+
177
+ .login-behavior-panel {
178
+ position: relative;
179
+ width: auto;
180
+ max-width: 100%;
181
+ padding: 24px;
182
+ border-radius: 28px;
183
+ box-sizing: border-box;
184
+ background: #fff;
185
+ box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
186
+ }
187
+
188
+ .login-behavior-loading {
189
+ position: absolute;
190
+ z-index: 2;
191
+ top: 24px;
192
+ right: 24px;
193
+ left: 24px;
194
+ height: 44px;
195
+ border-radius: 999px;
196
+ color: #28bb9c;
197
+ font-size: 24px;
198
+ line-height: 44px;
199
+ text-align: center;
200
+ background: rgba(255, 255, 255, 0.9);
201
+ }
202
+
203
+ .login-behavior-panel .go-captcha {
204
+ .gc-header {
205
+ height: auto;
206
+ min-height: 40px;
207
+ margin-bottom: 12px;
208
+ }
209
+
210
+ .gc-header .gc-text {
211
+ font-size: 24px;
212
+ font-weight: 500;
213
+ line-height: 34px;
214
+ white-space: nowrap;
215
+ }
216
+
217
+ .gc-body {
218
+ margin-top: 0;
219
+ border-radius: 18px;
220
+ }
221
+
222
+ .gc-footer {
223
+ padding-top: 22px;
224
+ }
225
+
226
+ .gc-drag-slide-bar {
227
+ height: 56px;
228
+ }
229
+
230
+ .gc-drag-line {
231
+ height: 18px;
232
+ border-radius: 999px;
233
+ background: #dbe7e3;
234
+ }
235
+
236
+ .gc-drag-block {
237
+ width: 92px;
238
+ height: 56px;
239
+ margin-top: -28px;
240
+ border-radius: 999px;
241
+ color: #fff;
242
+ fill: #fff;
243
+ background: linear-gradient(135deg, #36d6b4 0%, #20aa8f 100%);
244
+ box-shadow: 0 14px 28px rgba(40, 187, 156, 0.28);
245
+ }
246
+ }
247
+
248
+ .login-tips {
249
+ margin-top: 26px;
250
+ color: #999;
251
+ font-size: 22px;
252
+ line-height: 1.6;
253
+ }
254
+
255
+ .login-agreement {
256
+ display: flex;
257
+ align-items: center;
258
+ justify-content: center;
259
+ gap: 6px;
260
+ white-space: nowrap;
261
+ }
262
+
263
+ .login-agree-icon {
264
+ width: 26px;
265
+ height: 26px;
266
+ margin-right: 2px;
267
+ border: 2px solid #d1d5db;
268
+ border-radius: 50%;
269
+ box-sizing: border-box;
270
+ background-color: #fff;
271
+ }
272
+
273
+ .login-agree-icon.checked {
274
+ border-color: #28bb9c;
275
+ background-color: #28bb9c;
276
+ box-shadow: inset 0 0 0 6px #fff;
277
+ }
278
+
279
+ .login-agree-link {
280
+ color: #28bb9c;
281
+ white-space: nowrap;
282
+ }
283
+
284
+ .login-agree-desc,
285
+ .login-agree-separator {
286
+ white-space: nowrap;
287
+ }
288
+
289
+ .login-agree-desc {
290
+ color: #9ca3af;
291
+ }
292
+
293
+ .login-tips--shake {
294
+ animation: login-shake 0.5s both;
295
+ }
296
+
297
+ @keyframes login-shake {
298
+ 0%,
299
+ 100% {
300
+ transform: translateX(0);
301
+ }
302
+ 20%,
303
+ 60% {
304
+ transform: translateX(-10px);
305
+ }
306
+ 40%,
307
+ 80% {
308
+ transform: translateX(10px);
309
+ }
310
+ }