@liujitcn/kratos-taro-app-core 0.0.78 → 0.0.80

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 (45) hide show
  1. package/dist/build.mjs +4 -2
  2. package/package.json +1 -1
  3. package/src/components/BootstrapStatus.scss +3 -3
  4. package/src/components/BootstrapStatus.tsx +3 -1
  5. package/src/components/KratosTabBar.scss +32 -13
  6. package/src/components/KratosTabBar.tsx +34 -3
  7. package/src/components/MfaRecoveryCodesDialog.scss +11 -10
  8. package/src/components/MfaSetupPanel.scss +4 -4
  9. package/src/components/PasswordVerifyDialog.scss +21 -21
  10. package/src/navigation.ts +6 -3
  11. package/src/pages.ts +4 -2
  12. package/src/rpc/base/v1/config.ts +1 -1
  13. package/src/rpc/base/v1/file.ts +1 -1
  14. package/src/rpc/base/v1/language.ts +1 -1
  15. package/src/rpc/base/v1/login.ts +1 -1
  16. package/src/rpc/base/v1/mcp.ts +1 -1
  17. package/src/rpc/base/v1/mfa.ts +1 -1
  18. package/src/rpc/base/v1/oauth.ts +1 -1
  19. package/src/rpc/base/v1/secret_crypto.ts +1 -1
  20. package/src/rpc/base/v1/sse.ts +1 -1
  21. package/src/rpc/common/v1/common.ts +1 -1
  22. package/src/rpc/common/v1/types.ts +1 -1
  23. package/src/rpc/google/protobuf/empty.ts +1 -1
  24. package/src/rpc/google/protobuf/struct.ts +2 -2
  25. package/src/rpc/google/protobuf/wrappers.ts +1 -1
  26. package/src/rpc/system/app/v1/auth.ts +1 -1
  27. package/src/rpc/system/app/v1/base_area.ts +1 -1
  28. package/src/rpc/system/app/v1/base_dict.ts +1 -1
  29. package/src/rpc/system/app/v1/base_menu.ts +1 -1
  30. package/src/rpc/system/common/v1/common.ts +1 -1
  31. package/src/stores/index.ts +1 -0
  32. package/src/stores/theme.ts +108 -0
  33. package/src/styles/base.scss +90 -5
  34. package/src/styles/components.scss +765 -0
  35. package/src/utils/http.ts +3 -0
  36. package/src/utils/index.ts +19 -0
  37. package/src/utils/navigation.ts +12 -0
  38. package/src/views/pages/index/index.scss +69 -73
  39. package/src/views/pages/index/index.tsx +50 -34
  40. package/src/views/pages/login/login.scss +109 -142
  41. package/src/views/pages/login/login.tsx +142 -82
  42. package/src/views/pages/login/protocal.scss +14 -14
  43. package/src/views/pages/login/protocal.tsx +16 -3
  44. package/src/views/pages/webview/webview.scss +6 -5
  45. package/src/views/pages/webview/webview.tsx +3 -1
@@ -1,47 +1,67 @@
1
+ page {
2
+ background-color: #eef3f8;
3
+ }
4
+
1
5
  .login-page {
2
6
  position: relative;
3
7
  display: flex;
4
8
  flex-direction: column;
5
9
  justify-content: center;
6
10
  min-height: 100vh;
7
- padding: 48px 40px 56px;
8
- background: linear-gradient(180deg, #f4fbf8 0%, #fff 45%, #fff 100%);
11
+ padding: 48px 40px calc(56px + env(safe-area-inset-bottom));
12
+ background: var(--kratos-bg-gradient);
9
13
  box-sizing: border-box;
10
14
  }
11
15
 
16
+ /* 自绘头部:左返回(复用 k-ic)、右上角语言(复用 k-lg-lang),替代原生导航栏 */
17
+ .login-header {
18
+ position: fixed;
19
+ top: 0;
20
+ right: 0;
21
+ left: 0;
22
+ z-index: 3;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: space-between;
26
+ height: 44PX;
27
+ padding: env(safe-area-inset-top) 28px 0;
28
+ box-sizing: content-box;
29
+ }
30
+
31
+ /* #ifdef weapp */
32
+ .login-header {
33
+ /* 右上角避让小程序胶囊 */
34
+ padding-right: 220px;
35
+ }
36
+ /* #endif */
37
+
38
+ /* k-ic 已提供方形图标按钮视觉,这里只补字号以容纳返回符号 */
39
+ .login-back {
40
+ font-size: 36px;
41
+ line-height: 1;
42
+ }
43
+
12
44
  .login-locale {
13
- position: absolute;
14
- top: calc(24px + env(safe-area-inset-top));
15
- right: 28px;
16
- z-index: 2;
45
+ max-width: calc(100% - 120px);
17
46
  }
18
47
 
48
+ /* k-lg-lang 已提供视觉样式,这里只补多语言文案的截断处理 */
19
49
  .login-locale__value {
20
- padding: 12px 16px;
21
- color: #16806d;
22
- font-size: 24px;
50
+ max-width: 240px;
51
+ overflow: hidden;
52
+ text-overflow: ellipsis;
53
+ white-space: nowrap;
23
54
  }
24
55
 
25
56
  .login-hero {
26
- margin-bottom: 40px;
57
+ margin-bottom: 44px;
27
58
  text-align: center;
28
59
  }
29
60
 
30
- .login-logo-shell {
31
- display: inline-flex;
32
- align-items: center;
33
- justify-content: center;
34
- width: 180px;
35
- height: 180px;
36
- margin-bottom: 24px;
37
- border-radius: 44px;
38
- background: rgba(255, 255, 255, 0.92);
39
- box-shadow: 0 18px 44px rgba(40, 187, 156, 0.12);
40
- }
41
-
61
+ /* k-lg-logo 已提供渐变底板,这里只约束内部实际 Logo 图片尺寸 */
42
62
  .login-logo {
43
- width: 120px;
44
- height: 120px;
63
+ width: 100px;
64
+ height: 100px;
45
65
  }
46
66
 
47
67
  .login-hero-copy {
@@ -49,23 +69,9 @@
49
69
  flex-direction: column;
50
70
  }
51
71
 
52
- .login-title {
53
- color: #1f2937;
54
- font-size: 44px;
55
- font-weight: 600;
56
- }
57
-
58
- .login-subtitle {
59
- margin-top: 12px;
60
- color: #6b7280;
61
- font-size: 26px;
62
- }
63
-
72
+ /* k-glass/k-glass--lit 已提供卡片底色与描边,这里只补内部留白 */
64
73
  .login-panel {
65
- padding: 36px 28px 30px;
66
- border-radius: 24px;
67
- background: rgba(255, 255, 255, 0.96);
68
- box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
74
+ padding: 36px 30px 30px;
69
75
  }
70
76
 
71
77
  .login-form {
@@ -75,54 +81,36 @@
75
81
 
76
82
  .login-bind-tip {
77
83
  margin-bottom: 20px;
78
- color: #6b7280;
84
+ color: var(--kratos-color-text-muted);
79
85
  font-size: 24px;
80
86
  line-height: 1.5;
81
87
  text-align: center;
82
88
  }
83
89
 
84
- .login-input {
90
+ /* k-lg-field__input 已提供输入框视觉,这里只修复 Taro H5 端 weui-input 内层尺寸 */
91
+ .k-lg-field__input .weui-input {
85
92
  width: 100%;
86
- height: 88px;
87
- padding: 0 30px;
88
- margin-bottom: 20px;
89
- border: 1PX solid #e5e7eb;
90
- border-radius: 24px;
93
+ height: 100%;
94
+ padding: 0;
91
95
  box-sizing: border-box;
92
- color: #1f2937;
93
- font-size: 28px;
94
- background: #f9fbfa;
95
-
96
- .weui-input {
97
- width: 100%;
98
- height: 100%;
99
- padding: 0;
100
- box-sizing: border-box;
101
- color: inherit;
102
- font: inherit;
103
- }
96
+ color: inherit;
97
+ font: inherit;
104
98
  }
105
99
 
106
- .login-button {
100
+ /* 密码/验证码行内尾随的小按钮: k-lg-field 没有对应词汇,保留页面局部样式 */
101
+ .password-toggle {
107
102
  display: flex;
103
+ flex: 0 0 52px;
108
104
  align-items: center;
109
105
  justify-content: center;
110
- width: 100%;
111
- height: 88px;
112
- margin-top: 12px;
113
- border-radius: 24px;
114
- color: #fff;
115
- font-size: 30px;
116
- font-weight: 500;
117
- box-shadow: 0 18px 36px rgba(40, 187, 156, 0.24);
118
-
119
- &::after {
120
- border: 0;
121
- }
106
+ width: 52px;
107
+ height: 52px;
108
+ margin-left: 12px;
122
109
  }
123
110
 
124
- .login-button-primary {
125
- background: linear-gradient(135deg, #34c8aa 0%, #28bb9c 100%);
111
+ .password-toggle-icon {
112
+ width: 24px;
113
+ height: 24px;
126
114
  }
127
115
 
128
116
  .login-phone-icon {
@@ -130,44 +118,16 @@
130
118
  font-size: 40px;
131
119
  }
132
120
 
133
- .captcha-row {
134
- display: flex;
135
- align-items: center;
136
- width: 100%;
137
- height: 88px;
138
- padding: 0 12px 0 30px;
139
- margin-bottom: 20px;
140
- border: 1PX solid #e5e7eb;
141
- border-radius: 24px;
142
- box-sizing: border-box;
143
- background: #f9fbfa;
144
- }
145
-
146
- .captcha-input {
147
- flex: 1;
148
- height: 100%;
149
- padding: 0;
150
- margin-bottom: 0;
151
- border: 0;
152
- background: transparent;
153
- }
154
-
155
121
  .captcha-divider {
122
+ flex-shrink: 0;
156
123
  width: 1px;
157
124
  height: 44px;
158
- background: #e7ebf0;
125
+ background: var(--kratos-color-border);
159
126
  }
160
127
 
128
+ /* k-lg-cap 已提供验证码色块视觉,这里只补行内间距 */
161
129
  .captcha-trigger {
162
- display: flex;
163
- flex: 0 0 170px;
164
- align-items: center;
165
- justify-content: center;
166
- height: 72px;
167
130
  margin-left: 14px;
168
- border-radius: 18px;
169
- box-sizing: border-box;
170
- background: #fff;
171
131
  }
172
132
 
173
133
  .captcha-image {
@@ -185,9 +145,10 @@
185
145
  justify-content: center;
186
146
  padding: 24px;
187
147
  box-sizing: border-box;
188
- background: rgba(15, 23, 42, 0.38);
148
+ background: var(--kratos-color-mask);
189
149
  }
190
150
 
151
+ /* 行为验证码弹层保留白底:第三方验证码图片为浅色素材。 */
191
152
  .login-behavior-panel {
192
153
  position: relative;
193
154
  width: auto;
@@ -252,16 +213,16 @@
252
213
  height: 56px;
253
214
  margin-top: -28px;
254
215
  border-radius: 999px;
255
- color: #fff;
256
- fill: #fff;
257
- background: linear-gradient(135deg, #36d6b4 0%, #20aa8f 100%);
258
- box-shadow: 0 14px 28px rgba(40, 187, 156, 0.28);
216
+ color: var(--kratos-color-on-primary);
217
+ fill: var(--kratos-color-on-primary);
218
+ background: linear-gradient(135deg, var(--kratos-color-primary-deep) 0%, var(--kratos-color-primary) 100%);
219
+ box-shadow: 0 14px 28px rgba(40, 240, 212, 0.28);
259
220
  }
260
221
  }
261
222
 
262
223
  .login-tips {
263
224
  margin-top: 26px;
264
- color: #999;
225
+ color: var(--kratos-color-text-muted);
265
226
  font-size: 22px;
266
227
  line-height: 1.6;
267
228
  }
@@ -274,7 +235,7 @@
274
235
  align-items: center;
275
236
  justify-content: center;
276
237
  padding: 40px;
277
- background: rgba(15, 23, 42, 0.46);
238
+ background: var(--kratos-color-mask);
278
239
  }
279
240
 
280
241
  .mfa-panel {
@@ -283,14 +244,15 @@
283
244
  width: 100%;
284
245
  max-width: 520px;
285
246
  padding: 32px;
247
+ border: 1PX solid var(--kratos-color-border-accent);
286
248
  border-radius: 24px;
287
- background: #fff;
249
+ background: var(--kratos-color-surface-solid);
288
250
  box-sizing: border-box;
289
251
  }
290
252
 
291
253
  .mfa-title {
292
254
  margin-bottom: 20px;
293
- color: #172a35;
255
+ color: var(--kratos-color-text);
294
256
  font-size: 32px;
295
257
  font-weight: 700;
296
258
  }
@@ -300,56 +262,61 @@
300
262
  align-items: center;
301
263
  gap: 10px;
302
264
  margin: 4px 0 20px;
303
- color: #53636d;
265
+ color: var(--kratos-color-text-muted);
304
266
  font-size: 24px;
305
267
  line-height: 1.4;
306
268
  }
307
269
 
308
- .login-agreement {
270
+ /* MFA 弹窗未纳入本次登录页改版词汇,沿用原有独立按钮/输入框视觉,仅改为按面板作用域限定 */
271
+ .mfa-panel .login-input {
272
+ width: 100%;
273
+ height: 96px;
274
+ margin-bottom: 20px;
275
+ padding: 0 30px;
276
+ border: 1PX solid var(--kratos-color-border);
277
+ border-radius: 20px;
278
+ box-sizing: border-box;
279
+ color: var(--kratos-color-text);
280
+ font-size: 28px;
281
+ background: var(--kratos-color-surface-2);
282
+ }
283
+
284
+ .mfa-panel .login-button {
309
285
  display: flex;
310
286
  align-items: center;
311
- flex-wrap: wrap;
312
287
  justify-content: center;
313
288
  width: 100%;
314
- max-width: 100%;
315
- min-width: 0;
316
- gap: 6px;
317
- box-sizing: border-box;
318
- }
289
+ height: 96px;
290
+ margin-top: 12px;
291
+ border-radius: 20px;
292
+ color: var(--kratos-color-on-primary);
293
+ font-size: 30px;
294
+ font-weight: 800;
295
+ box-shadow: 0 0 40px rgba(40, 240, 212, 0.35);
319
296
 
320
- .login-agree-icon {
321
- flex: 0 0 auto;
322
- width: 26px;
323
- height: 26px;
324
- margin-right: 2px;
325
- border: 2px solid #d1d5db;
326
- border-radius: 50%;
327
- box-sizing: border-box;
328
- background-color: #fff;
297
+ &::after {
298
+ border: 0;
299
+ }
329
300
  }
330
301
 
331
- .login-agree-icon.checked {
332
- border-color: #28bb9c;
333
- background-color: #28bb9c;
334
- box-shadow: inset 0 0 0 6px #fff;
302
+ .mfa-panel .login-button-primary {
303
+ background: linear-gradient(135deg, var(--kratos-color-primary-deep) 0%, var(--kratos-color-primary) 100%);
335
304
  }
336
305
 
337
- .login-agree-link {
306
+ .login-agreement {
307
+ box-sizing: border-box;
308
+ width: 100%;
309
+ max-width: 100%;
338
310
  min-width: 0;
339
- color: #28bb9c;
340
- overflow-wrap: anywhere;
341
311
  }
342
312
 
313
+ .login-agree-link,
343
314
  .login-agree-desc,
344
315
  .login-agree-separator {
345
316
  min-width: 0;
346
317
  overflow-wrap: anywhere;
347
318
  }
348
319
 
349
- .login-agree-desc {
350
- color: #9ca3af;
351
- }
352
-
353
320
  .login-tips--shake {
354
321
  animation: login-shake 0.5s both;
355
322
  }