dashboard-shell-shell 3.0.5-test.14 → 3.0.5-test.17
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/assets/translations/zh-hans.yaml +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
- package/components/GlobalRoleBindings.vue +48 -55
- package/components/form/ArrayList.vue +2 -2
- package/components/form/ChangePassword.vue +1 -1
- package/components/form/KeyValue.vue +6 -6
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +5 -5
- package/components/form/Members/MembershipEditor.vue +2 -2
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +36 -30
- package/components/nav/TopLevelMenu.vue +3 -2
- package/components/nav/Type.vue +3 -3
- package/package.json +1 -1
- package/pages/account/index.vue +2 -2
- package/pages/auth/setup.vue +35 -16
- package/scripts/publish-shell.sh +1 -1
|
@@ -3,7 +3,7 @@ import Drawer from '@shell/components/Drawer/Chrome.vue';
|
|
|
3
3
|
import { useI18n } from '@shell/composables/useI18n';
|
|
4
4
|
import { useStore } from 'vuex';
|
|
5
5
|
import Tabbed from '@shell/components/Tabbed/index.vue';
|
|
6
|
-
import YamlTab, { Props as YamlProps } from '@shell/components/Drawer/ResourceDetailDrawer/YamlTab.vue';
|
|
6
|
+
// import YamlTab, { Props as YamlProps } from '@shell/components/Drawer/ResourceDetailDrawer/YamlTab.vue';
|
|
7
7
|
import { useDefaultConfigTabProps, useDefaultYamlTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/composables';
|
|
8
8
|
import ConfigTab from '@shell/components/Drawer/ResourceDetailDrawer/ConfigTab.vue';
|
|
9
9
|
import { computed, ref } from 'vue';
|
|
@@ -87,10 +87,10 @@ const canEdit = computed(() => {
|
|
|
87
87
|
v-if="configTabProps"
|
|
88
88
|
v-bind="configTabProps"
|
|
89
89
|
/>
|
|
90
|
-
<YamlTab
|
|
90
|
+
<!-- <YamlTab
|
|
91
91
|
v-if="yamlTabProps"
|
|
92
92
|
v-bind="yamlTabProps"
|
|
93
|
-
/>
|
|
93
|
+
/> -->
|
|
94
94
|
</Tabbed>
|
|
95
95
|
</template>
|
|
96
96
|
<template #additional-actions>
|
|
@@ -108,12 +108,7 @@ export default {
|
|
|
108
108
|
} catch (e) { }
|
|
109
109
|
},
|
|
110
110
|
data() {
|
|
111
|
-
|
|
112
|
-
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
|
|
113
|
-
|
|
114
111
|
return {
|
|
115
|
-
topLevelPermissions,
|
|
116
|
-
|
|
117
112
|
// This not only identifies global roles but the order here is the order we want to display them in the UI
|
|
118
113
|
globalPermissions: [
|
|
119
114
|
'admin',
|
|
@@ -333,62 +328,60 @@ export default {
|
|
|
333
328
|
|
|
334
329
|
<div v-else>
|
|
335
330
|
<form v-if="selectedRoles">
|
|
336
|
-
<
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
331
|
+
<div
|
|
332
|
+
v-for="(sortedRole, roleType) in sortedRoles"
|
|
333
|
+
:key="roleType"
|
|
334
|
+
class="role-group mb-10"
|
|
335
|
+
>
|
|
336
|
+
<Card
|
|
337
|
+
v-if="Object.keys(sortedRole).length"
|
|
338
|
+
:show-highlight-border="false"
|
|
339
|
+
:show-actions="false"
|
|
341
340
|
>
|
|
342
|
-
<
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
<template v-slot:title>
|
|
348
|
-
<div class="type-title">
|
|
349
|
-
<h3>{{ t(`rbac.globalRoles.types.${roleType}.label`) }}</h3>
|
|
350
|
-
<div class="type-description">
|
|
351
|
-
{{ t(`rbac.globalRoles.types.${roleType}.description`, { isUser }) }}
|
|
352
|
-
</div>
|
|
341
|
+
<template v-slot:title>
|
|
342
|
+
<div class="type-title">
|
|
343
|
+
<h3>{{ t(`rbac.globalRoles.types.${roleType}.label`) }}</h3>
|
|
344
|
+
<div class="type-description">
|
|
345
|
+
{{ t(`rbac.globalRoles.types.${roleType}.description`, { isUser }) }}
|
|
353
346
|
</div>
|
|
354
|
-
</
|
|
355
|
-
|
|
347
|
+
</div>
|
|
348
|
+
</template>
|
|
349
|
+
<template v-slot:body>
|
|
350
|
+
<div
|
|
351
|
+
class="checkbox-section"
|
|
352
|
+
:class="'checkbox-section--' + roleType"
|
|
353
|
+
>
|
|
356
354
|
<div
|
|
357
|
-
|
|
358
|
-
:
|
|
355
|
+
v-for="(role, i) in sortedRoles[roleType]"
|
|
356
|
+
:key="i"
|
|
357
|
+
class="checkbox mb-10 mr-10"
|
|
359
358
|
>
|
|
360
|
-
<
|
|
361
|
-
v-
|
|
362
|
-
:
|
|
363
|
-
|
|
359
|
+
<Checkbox
|
|
360
|
+
v-model:value="selectedRoles"
|
|
361
|
+
:value-when-true="role.id"
|
|
362
|
+
:disabled="!!assignOnlyRoles[role.id]"
|
|
363
|
+
:label="role.nameDisplay"
|
|
364
|
+
:description="role.descriptionDisplay"
|
|
365
|
+
:mode="mode"
|
|
366
|
+
:data-testId="'grb-checkbox-' + role.id"
|
|
367
|
+
@update:value="checkboxChanged"
|
|
364
368
|
>
|
|
365
|
-
<
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
>
|
|
375
|
-
|
|
376
|
-
<div class="checkbox-label-slot">
|
|
377
|
-
<span class="checkbox-label">{{ role.nameDisplay }}</span>
|
|
378
|
-
<i
|
|
379
|
-
v-if="!!assignOnlyRoles[role.id]"
|
|
380
|
-
v-clean-tooltip="t('rbac.globalRoles.assignOnlyRole')"
|
|
381
|
-
class="checkbox-info icon icon-info icon-lg"
|
|
382
|
-
/>
|
|
383
|
-
</div>
|
|
384
|
-
</template>
|
|
385
|
-
</Checkbox>
|
|
386
|
-
</div>
|
|
369
|
+
<template #label>
|
|
370
|
+
<div class="checkbox-label-slot">
|
|
371
|
+
<span class="checkbox-label">{{ role.nameDisplay }}</span>
|
|
372
|
+
<i
|
|
373
|
+
v-if="!!assignOnlyRoles[role.id]"
|
|
374
|
+
v-clean-tooltip="t('rbac.globalRoles.assignOnlyRole')"
|
|
375
|
+
class="checkbox-info icon icon-info icon-lg"
|
|
376
|
+
/>
|
|
377
|
+
</div>
|
|
378
|
+
</template>
|
|
379
|
+
</Checkbox>
|
|
387
380
|
</div>
|
|
388
|
-
</
|
|
389
|
-
</
|
|
390
|
-
</
|
|
391
|
-
</
|
|
381
|
+
</div>
|
|
382
|
+
</template>
|
|
383
|
+
</Card>
|
|
384
|
+
</div>
|
|
392
385
|
</form>
|
|
393
386
|
</div>
|
|
394
387
|
</template>
|
|
@@ -265,7 +265,7 @@ export default {
|
|
|
265
265
|
>
|
|
266
266
|
|
|
267
267
|
<div class="row">
|
|
268
|
-
<div class="col">
|
|
268
|
+
<div style="width: 100%;" class="col">
|
|
269
269
|
<div
|
|
270
270
|
v-if="title"
|
|
271
271
|
class="clearfix"
|
|
@@ -289,7 +289,7 @@ export default {
|
|
|
289
289
|
</slot>
|
|
290
290
|
</div>
|
|
291
291
|
</div>
|
|
292
|
-
<div class="col">
|
|
292
|
+
<div style="width: 100%;" class="col">
|
|
293
293
|
<div>
|
|
294
294
|
<template v-if="rows.length">
|
|
295
295
|
<div
|
|
@@ -392,10 +392,10 @@ export default {
|
|
|
392
392
|
|
|
393
393
|
rows = rows.map((item) => {
|
|
394
394
|
if (item.key.includes('harvester')) {
|
|
395
|
-
item.key = item.key
|
|
395
|
+
item.key = item.key?.replace('harvester', 'cloud');
|
|
396
396
|
}
|
|
397
397
|
if (item.value.includes('harvester')) {
|
|
398
|
-
item.value = item.value
|
|
398
|
+
item.value = item.value?.replace('harvester', 'cloud');
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
return item;
|
|
@@ -411,8 +411,8 @@ export default {
|
|
|
411
411
|
[this.valueName]: value,
|
|
412
412
|
};
|
|
413
413
|
|
|
414
|
-
obj.key = obj.key
|
|
415
|
-
obj.value = obj.value
|
|
414
|
+
obj.key = obj.key?.replace('harvester', 'cloud');
|
|
415
|
+
obj.value = obj.value?.replace('harvester', 'cloud');
|
|
416
416
|
obj.binary = false;
|
|
417
417
|
obj.canEncode = this.handleBase64;
|
|
418
418
|
obj.supported = true;
|
|
@@ -494,8 +494,8 @@ export default {
|
|
|
494
494
|
// let value = (row[valueName] || '');
|
|
495
495
|
// const key = (row[keyName] || '').trim();
|
|
496
496
|
|
|
497
|
-
const key = (row[keyName]
|
|
498
|
-
let value = (row[valueName]
|
|
497
|
+
const key = (row[keyName]?.replace('cloud', 'harvester') || '').trim();
|
|
498
|
+
let value = (row[valueName]?.replace('cloud', 'harvester') || '').trim();
|
|
499
499
|
|
|
500
500
|
if (value && typeOf(value) === 'object') {
|
|
501
501
|
out[key] = JSON.parse(JSON.stringify(value));
|
|
@@ -161,11 +161,11 @@ export default {
|
|
|
161
161
|
value: 'member'
|
|
162
162
|
},
|
|
163
163
|
...customRoles,
|
|
164
|
-
{
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
164
|
+
// {
|
|
165
|
+
// label: this.t('members.clusterPermissions.custom.label'),
|
|
166
|
+
// description: this.t('members.clusterPermissions.custom.description'),
|
|
167
|
+
// value: 'custom'
|
|
168
|
+
// }
|
|
169
169
|
];
|
|
170
170
|
},
|
|
171
171
|
principal() {
|
|
@@ -170,7 +170,7 @@ export default {
|
|
|
170
170
|
>
|
|
171
171
|
<template #column-headers>
|
|
172
172
|
<div class="box mb-0">
|
|
173
|
-
<div class="column-headers row" style="width:
|
|
173
|
+
<div class="column-headers row" style="width: calc(100% - 100px);">
|
|
174
174
|
<div class="col span-6">
|
|
175
175
|
<label class="text-label">{{ t('membershipEditor.user') }}</label>
|
|
176
176
|
</div>
|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
181
181
|
</div>
|
|
182
182
|
</template>
|
|
183
183
|
<template #columns="{row, i}">
|
|
184
|
-
<div class="columns row">
|
|
184
|
+
<div style="width: 100%;" class="columns row">
|
|
185
185
|
<div class="col span-6">
|
|
186
186
|
<Principal
|
|
187
187
|
:value="row.value.principalId"
|
|
@@ -72,13 +72,13 @@ export default {
|
|
|
72
72
|
<template>
|
|
73
73
|
<div>
|
|
74
74
|
<div class="headers mb-10">
|
|
75
|
-
<div style="width:
|
|
75
|
+
<div style="width: 450px;">
|
|
76
76
|
<label>{{ t('resourceQuota.headers.resourceType') }}</label>
|
|
77
77
|
</div>
|
|
78
|
-
<div style="width:
|
|
78
|
+
<div style="width: 450px;">
|
|
79
79
|
<label>{{ t('resourceQuota.headers.projectResourceAvailability') }}</label>
|
|
80
80
|
</div>
|
|
81
|
-
<div style="width:
|
|
81
|
+
<div style="width: 450px;">
|
|
82
82
|
<label>{{ t('resourceQuota.headers.limit') }}</label>
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
@@ -101,7 +101,7 @@ export default {
|
|
|
101
101
|
.headers {
|
|
102
102
|
display: flex;
|
|
103
103
|
flex-direction: row;
|
|
104
|
-
justify-content:
|
|
104
|
+
justify-content: left;
|
|
105
105
|
align-items: center;
|
|
106
106
|
border-bottom: 1px solid var(--border);
|
|
107
107
|
height: 30px;
|
|
@@ -175,13 +175,15 @@ export default {
|
|
|
175
175
|
v-if="typeOption"
|
|
176
176
|
class="rowNew"
|
|
177
177
|
>
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
178
|
+
<div style="width: 450px;">
|
|
179
|
+
<Select
|
|
180
|
+
:mode="mode"
|
|
181
|
+
:value="type"
|
|
182
|
+
:disabled="true"
|
|
183
|
+
:options="types"
|
|
184
|
+
/>
|
|
185
|
+
</div>
|
|
186
|
+
<div style="width: 450px;" class="resource-availability">
|
|
185
187
|
<PercentageBar
|
|
186
188
|
v-clean-tooltip="tooltip"
|
|
187
189
|
class="percentage-bar"
|
|
@@ -190,7 +192,7 @@ export default {
|
|
|
190
192
|
:color-stops="{'100': '--primary'}"
|
|
191
193
|
/>
|
|
192
194
|
</div>
|
|
193
|
-
<div style="width:
|
|
195
|
+
<div style="width: 450px;">
|
|
194
196
|
<UnitInput
|
|
195
197
|
:value="value.limit[type]"
|
|
196
198
|
:mode="mode"
|
|
@@ -212,7 +214,7 @@ export default {
|
|
|
212
214
|
.rowNew {
|
|
213
215
|
margin-bottom: 10px;
|
|
214
216
|
display: flex;
|
|
215
|
-
justify-content:
|
|
217
|
+
justify-content: left;
|
|
216
218
|
|
|
217
219
|
& > * {
|
|
218
220
|
width: 400px;
|
|
@@ -57,14 +57,14 @@ export default {
|
|
|
57
57
|
</script>
|
|
58
58
|
<template>
|
|
59
59
|
<div>
|
|
60
|
-
<div style="justify-content:
|
|
61
|
-
<div style="width:
|
|
60
|
+
<div style="justify-content: left;" class="headers mb-10">
|
|
61
|
+
<div style="width: 450px;">
|
|
62
62
|
<label>{{ t('resourceQuota.headers.resourceType') }}</label>
|
|
63
63
|
</div>
|
|
64
|
-
<div style="width:
|
|
64
|
+
<div style="width: 450px;">
|
|
65
65
|
<label>{{ t('resourceQuota.headers.projectLimit') }}</label>
|
|
66
66
|
</div>
|
|
67
|
-
<div style="width:
|
|
67
|
+
<div style="width: 450px;">
|
|
68
68
|
<label>{{ t('resourceQuota.headers.namespaceDefaultLimit') }}</label>
|
|
69
69
|
</div>
|
|
70
70
|
</div>
|
|
@@ -72,41 +72,47 @@ export default {
|
|
|
72
72
|
v-if="typeOption"
|
|
73
73
|
class="rowNew"
|
|
74
74
|
>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
75
|
+
<div style="width: 450px;">
|
|
76
|
+
<Select
|
|
77
|
+
:value="type"
|
|
78
|
+
:mode="mode"
|
|
79
|
+
:options="types"
|
|
80
|
+
data-testid="projectrow-type-input"
|
|
81
|
+
@update:value="updateType($event)"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
<div style="width: 450px;">
|
|
85
|
+
<UnitInput
|
|
86
|
+
:value="resourceQuotaLimit[type]"
|
|
87
|
+
:mode="mode"
|
|
88
|
+
:placeholder="typeOption.placeholder"
|
|
89
|
+
:increment="typeOption.increment"
|
|
90
|
+
:input-exponent="typeOption.inputExponent"
|
|
91
|
+
:base-unit="typeOption.baseUnit"
|
|
92
|
+
:output-modifier="true"
|
|
93
|
+
data-testid="projectrow-project-quota-input"
|
|
94
|
+
@update:value="updateQuotaLimit('resourceQuota', type, $event)"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
<div style="width: 450px;">
|
|
98
|
+
<UnitInput
|
|
99
|
+
:value="namespaceDefaultResourceQuotaLimit[type]"
|
|
100
|
+
:mode="mode"
|
|
101
|
+
:placeholder="typeOption.placeholder"
|
|
102
|
+
:increment="typeOption.increment"
|
|
103
|
+
:input-exponent="typeOption.inputExponent"
|
|
104
|
+
:base-unit="typeOption.baseUnit"
|
|
105
|
+
:output-modifier="true"
|
|
106
|
+
data-testid="projectrow-namespace-quota-input"
|
|
107
|
+
@update:value="updateQuotaLimit('namespaceDefaultResourceQuota', type, $event)"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
104
110
|
</div>
|
|
105
111
|
</template>
|
|
106
112
|
|
|
107
113
|
<style lang='scss' scoped>
|
|
108
114
|
.rowNew {
|
|
109
115
|
display: flex;
|
|
110
|
-
justify-content:
|
|
116
|
+
justify-content: left;
|
|
111
117
|
}
|
|
112
118
|
</style>
|
|
@@ -867,6 +867,7 @@ export default {
|
|
|
867
867
|
@click="hide()"
|
|
868
868
|
>
|
|
869
869
|
<router-link
|
|
870
|
+
v-if="a.value !== 'fleet'"
|
|
870
871
|
class="option"
|
|
871
872
|
:class="{'active-menu-link': a.isMenuActive }"
|
|
872
873
|
:to="a.to"
|
|
@@ -923,7 +924,7 @@ export default {
|
|
|
923
924
|
<div
|
|
924
925
|
class="footer"
|
|
925
926
|
>
|
|
926
|
-
<div
|
|
927
|
+
<!-- <div
|
|
927
928
|
v-if="canEditSettings"
|
|
928
929
|
class="support"
|
|
929
930
|
@click="hide()"
|
|
@@ -948,7 +949,7 @@ export default {
|
|
|
948
949
|
>
|
|
949
950
|
{{ aboutText }}
|
|
950
951
|
</router-link>
|
|
951
|
-
</div>
|
|
952
|
+
</div> -->
|
|
952
953
|
</div>
|
|
953
954
|
</div>
|
|
954
955
|
</transition>
|
package/components/nav/Type.vue
CHANGED
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
<a
|
|
142
142
|
role="link"
|
|
143
143
|
:aria-label="type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label)"
|
|
144
|
-
:href="href"
|
|
144
|
+
:href="href.replace(/harvester/g, 'cloud')"
|
|
145
145
|
class="type-link"
|
|
146
146
|
:aria-current="isActive ? 'page' : undefined"
|
|
147
147
|
@click="selectType(); navigate($event);"
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
<div v-else style="display: flex; align-items: center;" class="labelKey_menu">
|
|
159
159
|
<i v-if="!type.labelDisplay || (type.labelDisplay && type.labelDisplay.indexOf('</i>') === -1)" class="icon icon-fw icon-globe" style="color: var(--muted);width: 32px;text-align: left;"></i>
|
|
160
160
|
<span
|
|
161
|
-
v-clean-html="type.labelDisplay
|
|
161
|
+
v-clean-html="type.labelDisplay || type.label"
|
|
162
162
|
class="label"
|
|
163
163
|
:class="{'no-icon': !type.icon}"
|
|
164
164
|
/>
|
|
@@ -199,7 +199,7 @@ export default {
|
|
|
199
199
|
>
|
|
200
200
|
<a
|
|
201
201
|
role="link"
|
|
202
|
-
:href="type.link"
|
|
202
|
+
:href="type.link.replace(/harvester/g, 'cloud')"
|
|
203
203
|
:target="type.target"
|
|
204
204
|
rel="noopener noreferrer nofollow"
|
|
205
205
|
:aria-label="type.label"
|
package/package.json
CHANGED
package/pages/account/index.vue
CHANGED
|
@@ -183,7 +183,7 @@ export default {
|
|
|
183
183
|
</button>
|
|
184
184
|
</div>
|
|
185
185
|
</div>
|
|
186
|
-
<button
|
|
186
|
+
<!-- <button
|
|
187
187
|
v-if="apiKeySchema"
|
|
188
188
|
role="button"
|
|
189
189
|
:aria-label="t('accountAndKeys.apiKeys.add.label')"
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
@click="addKey"
|
|
193
193
|
>
|
|
194
194
|
{{ t('accountAndKeys.apiKeys.add.label') }}
|
|
195
|
-
</button>
|
|
195
|
+
</button> -->
|
|
196
196
|
</div>
|
|
197
197
|
|
|
198
198
|
<div class="account_card mb-20">
|
package/pages/auth/setup.vue
CHANGED
|
@@ -21,6 +21,7 @@ import FormValidation from '@shell/mixins/form-validation';
|
|
|
21
21
|
import isUrl from 'is-url';
|
|
22
22
|
import { isLocalhost } from '@shell/utils/validators/setting';
|
|
23
23
|
import Loading from '@shell/components/Loading';
|
|
24
|
+
import { copyTextToClipboard } from '@shell/utils/clipboard';
|
|
24
25
|
|
|
25
26
|
const calcIsFirstLogin = (store) => {
|
|
26
27
|
const firstLoginSetting = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.FIRST_LOGIN);
|
|
@@ -259,6 +260,14 @@ export default {
|
|
|
259
260
|
this.$router.replace('/');
|
|
260
261
|
},
|
|
261
262
|
|
|
263
|
+
copyPassword(val) {
|
|
264
|
+
copyTextToClipboard(val).then(() => {
|
|
265
|
+
console.log('复制成功')
|
|
266
|
+
}).catch(() => {
|
|
267
|
+
console.log('复制失败')
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
|
|
262
271
|
onServerUrlChange(value) {
|
|
263
272
|
this.serverUrl = value.trim();
|
|
264
273
|
},
|
|
@@ -324,13 +333,14 @@ export default {
|
|
|
324
333
|
>
|
|
325
334
|
<div class="mb-20">
|
|
326
335
|
<RadioGroup
|
|
336
|
+
class="setupRadioGroupCls"
|
|
327
337
|
v-model:value="useRandom"
|
|
328
338
|
data-testid="setup-password-mode"
|
|
329
339
|
name="password-mode"
|
|
330
340
|
:options="passwordOptions"
|
|
331
341
|
/>
|
|
332
342
|
</div>
|
|
333
|
-
<div class="mb-20">
|
|
343
|
+
<div class="setup_radom-password mb-20">
|
|
334
344
|
<LabeledInput
|
|
335
345
|
v-if="useRandom"
|
|
336
346
|
ref="password"
|
|
@@ -347,13 +357,9 @@ export default {
|
|
|
347
357
|
>
|
|
348
358
|
<div
|
|
349
359
|
class="addon"
|
|
350
|
-
style="padding:
|
|
360
|
+
style="padding: 4px 0px 0px;"
|
|
351
361
|
>
|
|
352
|
-
<
|
|
353
|
-
:aria-label="t('setup.copyRandom')"
|
|
354
|
-
:text="password"
|
|
355
|
-
class="btn-sm"
|
|
356
|
-
/>
|
|
362
|
+
<a @click="copyPassword(password)" href="javascript:;">复制</a>
|
|
357
363
|
</div>
|
|
358
364
|
</template>
|
|
359
365
|
</LabeledInput>
|
|
@@ -367,15 +373,17 @@ export default {
|
|
|
367
373
|
:required="true"
|
|
368
374
|
/>
|
|
369
375
|
</div>
|
|
370
|
-
<
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
376
|
+
<div class="setup_radom-password">
|
|
377
|
+
<Password
|
|
378
|
+
v-show="!useRandom"
|
|
379
|
+
v-model:value.trim="confirm"
|
|
380
|
+
autocomplete="new-password"
|
|
381
|
+
data-testid="setup-password-confirm"
|
|
382
|
+
class="setup-password"
|
|
383
|
+
:label="t('setup.confirmPassword')"
|
|
384
|
+
:required="true"
|
|
385
|
+
/>
|
|
386
|
+
</div>
|
|
379
387
|
</template>
|
|
380
388
|
|
|
381
389
|
<template v-if="isFirstLogin">
|
|
@@ -467,6 +475,16 @@ export default {
|
|
|
467
475
|
</template>
|
|
468
476
|
|
|
469
477
|
<style lang="scss" scoped>
|
|
478
|
+
.setup_radom-password {
|
|
479
|
+
:deep(.label-input-all) LABEL {
|
|
480
|
+
color: #fff;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
.setupRadioGroupCls {
|
|
484
|
+
:deep(.radio-label) {
|
|
485
|
+
color: #fff;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
470
488
|
.principal {
|
|
471
489
|
display: block;
|
|
472
490
|
background: var(--box-bg);
|
|
@@ -538,6 +556,7 @@ export default {
|
|
|
538
556
|
}
|
|
539
557
|
|
|
540
558
|
.setup-title {
|
|
559
|
+
color: #fff;
|
|
541
560
|
:deep() code {
|
|
542
561
|
font-size: 12px;
|
|
543
562
|
padding: 0;
|