File tree 1 file changed +11
-2
lines changed
src/components/views/login
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,9 @@ const getCodes = async () => {
91
91
};
92
92
93
93
const poll = ref <CancellablePolling >();
94
- const progress = ref (0 );
95
94
const progressInterval = ref <ReturnType <typeof setInterval >>();
95
+ const progress = ref (0 );
96
+ const progressRounded = computed (() => Math .round (progress .value * 10 ) / 20 || 0.1 );
96
97
97
98
const onCancel = () => {
98
99
if (poll .value ) poll .value .cancel ();
@@ -174,6 +175,7 @@ onDeactivated(() => onCancel());
174
175
<div class =" code-input" :class =" { show: useCode }" >
175
176
<NInputGroup class =" input-group" >
176
177
<NInput
178
+ :style =" { '--n-border-radius': '3px 0 0 0' }"
177
179
:value =" code"
178
180
placeholder =" Code"
179
181
:disabled =" !code?.length"
@@ -194,7 +196,7 @@ onDeactivated(() => onCancel());
194
196
class =" timeout-code"
195
197
type =" line"
196
198
status =" success"
197
- :percentage =" progress "
199
+ :percentage =" progressRounded "
198
200
:show-indicator =" false"
199
201
:theme-overrides =" {
200
202
railHeight: 'var(--rail-height)',
@@ -243,14 +245,21 @@ onDeactivated(() => onCancel());
243
245
244
246
.input-group {
245
247
position : relative ;
248
+ justify-content : center ;
246
249
}
247
250
248
251
.timeout-code {
249
252
--rail-height : 2px ;
250
253
251
254
position : absolute ;
252
255
bottom : calc (var (--rail-height ) * -1 );
256
+ left : 1px ; // border width
253
257
border-radius : 0 ;
258
+
259
+ :deep (.n-progress-graph-line-rail ),
260
+ :deep (.n-progress-graph-line-rail .n-progress-graph-line-fill ) {
261
+ border-radius : 0 ;
262
+ }
254
263
}
255
264
}
256
265
</style >
You can’t perform that action at this time.
0 commit comments