dashboard-shell-shell 3.0.5-test.4 → 3.0.5-test.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/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/images/pl/half-logo.svg +23 -2
- package/assets/images/pl/harvester.png +0 -0
- package/assets/styles/app.scss +0 -4
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +1 -2
- package/assets/styles/base/_variables.scss +4 -11
- package/assets/styles/global/_button.scss +27 -45
- package/assets/styles/global/_columns.scss +1 -3
- package/assets/styles/global/_form.scss +13 -45
- package/assets/styles/global/_labeled-input.scss +26 -54
- package/assets/styles/global/_layout.scss +3 -8
- package/assets/styles/global/_select.scss +17 -25
- package/assets/styles/global/_table.scss +1 -7
- package/assets/styles/global/_tooltip.scss +6 -54
- package/assets/styles/themes/_dark.scss +0 -3
- package/assets/styles/themes/_light.scss +42 -63
- package/assets/styles/vendor/vue-select.scss +9 -22
- package/assets/translations/en-us.yaml +4 -28
- package/assets/translations/zh-hans.yaml +189 -376
- package/components/ActionDropdown.vue +1 -2
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -2
- package/components/AppModal.vue +5 -46
- package/components/BrandImage.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonMultiAction.vue +0 -1
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +6 -20
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CruResource.vue +8 -9
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +17 -29
- package/components/ExplorerProjectsNamespaces.vue +5 -19
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -3
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/IndentedPanel.vue +10 -4
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -20
- package/components/ModalWithCard.vue +3 -12
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +11 -30
- package/components/ResourceDetail/Masthead/legacy.vue +38 -181
- package/components/ResourceDetail/legacy.vue +13 -29
- package/components/ResourceList/Masthead.vue +54 -226
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +2 -24
- package/components/SideNav.vue +20 -74
- package/components/SortableTable/THead.vue +3 -33
- package/components/SortableTable/index.vue +464 -1017
- package/components/SortableTable/paging.js +16 -26
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +29 -47
- package/components/YamlEditor.vue +1 -0
- package/components/auth/Principal.vue +12 -36
- package/components/auth/RoleDetailEdit.vue +7 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/ArrayList.vue +33 -41
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +59 -64
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +8 -11
- package/components/form/InputWithSelect.vue +5 -8
- package/components/form/KeyValue.vue +7 -47
- package/components/form/LabeledSelect.vue +241 -212
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +7 -24
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +20 -59
- package/components/form/Password.vue +7 -16
- package/components/form/PodAffinity.vue +5 -4
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +17 -18
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +6 -3
- package/components/form/Select.vue +2 -5
- package/components/form/SimpleSecretSelector.vue +9 -29
- package/components/form/UnitInput.vue +3 -8
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +99 -132
- package/components/nav/Header.vue +27 -124
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +15 -19
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +41 -63
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +11 -15
- package/config/product/auth.js +7 -17
- package/config/product/settings.js +9 -19
- package/config/settings.ts +0 -28
- package/config/table-headers.js +2 -3
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +12 -36
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +2 -1
- package/edit/token.vue +12 -31
- package/edit/workload/index.vue +1 -1
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +3 -7
- package/list/namespace.vue +0 -3
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/account/index.vue +12 -74
- package/pages/auth/login.vue +51 -214
- package/pages/auth/setup.vue +19 -142
- package/pages/c/_cluster/_product/namespaces.vue +4 -4
- package/pages/c/_cluster/auth/roles/index.vue +1 -19
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +102 -174
- package/pages/c/_cluster/settings/brand.vue +302 -350
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +30 -70
- package/pages/prefs.vue +25 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +4 -6
- package/rancher-components/Banner/Banner.vue +8 -12
- package/rancher-components/Card/Card.vue +8 -7
- package/rancher-components/Form/Checkbox/Checkbox.vue +0 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +3 -42
- package/rancher-components/Form/Radio/RadioButton.vue +11 -35
- package/rancher-components/Form/Radio/RadioGroup.vue +5 -13
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -12
- package/rancher-components/RcDropdown/RcDropdown.vue +7 -35
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +4 -9
- package/rancher-components/RcDropdown/types.ts +0 -1
- package/rancher-components/StringList/StringList.vue +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +2 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +4 -11
- package/store/type-map.js +2 -32
- package/types/shell/index.d.ts +67 -74
- package/utils/error.js +8 -87
- package/utils/router.js +0 -21
- package/utils/select.js +3 -26
- package/utils/string.js +5 -8
- package/utils/title.ts +1 -1
- package/assets/icons/demo.css +0 -539
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +0 -1131
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +0 -216
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +0 -1
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +0 -324
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +0 -3
- package/assets/images/action.svg +0 -6
- package/assets/images/login/password.svg +0 -20
- package/assets/images/login/user.svg +0 -6
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +0 -19
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +0 -5
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +0 -63
- package/components/DotState.vue +0 -84
- package/utils/errorTranslate.json +0 -1336
|
@@ -127,16 +127,8 @@ export default {
|
|
|
127
127
|
& > .remove {
|
|
128
128
|
position: absolute;
|
|
129
129
|
|
|
130
|
-
top:
|
|
131
|
-
right:
|
|
132
|
-
& > .close{
|
|
133
|
-
width: 32px;
|
|
134
|
-
min-width: 32px !important;
|
|
135
|
-
color: var(--body-text);
|
|
136
|
-
&:hover{
|
|
137
|
-
color: var(--link);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
130
|
+
top: 0;
|
|
131
|
+
right: 0;
|
|
140
132
|
}
|
|
141
133
|
|
|
142
134
|
& > .info-box {
|
|
@@ -117,7 +117,7 @@ export default ({
|
|
|
117
117
|
|
|
118
118
|
<template>
|
|
119
119
|
<div>
|
|
120
|
-
<div class="row">
|
|
120
|
+
<div class="row mb-20">
|
|
121
121
|
<div class="col span-6">
|
|
122
122
|
<ColorInput
|
|
123
123
|
v-model:value="value[bannerType].color"
|
|
@@ -137,7 +137,7 @@ export default ({
|
|
|
137
137
|
/>
|
|
138
138
|
</div>
|
|
139
139
|
</div>
|
|
140
|
-
<div class="row
|
|
140
|
+
<div class="row pb-10">
|
|
141
141
|
<ToggleSwitch
|
|
142
142
|
v-model:value="isHtml"
|
|
143
143
|
:aria-label="`${t(`banner.${bannerType}`)} ${t('banner.toggleTextHtml')}`"
|
|
@@ -147,76 +147,71 @@ export default ({
|
|
|
147
147
|
:on-label="t('banner.type.html')"
|
|
148
148
|
/>
|
|
149
149
|
</div>
|
|
150
|
-
<div
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
<div
|
|
151
|
+
v-if="!isHtml"
|
|
152
|
+
class="row"
|
|
153
|
+
>
|
|
154
|
+
<p
|
|
155
|
+
:id="bannerTitleId"
|
|
156
|
+
class="sr-only"
|
|
153
157
|
>
|
|
158
|
+
{{ t(`banner.${bannerType}`) }}
|
|
159
|
+
</p>
|
|
160
|
+
<div class="col span-6">
|
|
161
|
+
<LabeledInput
|
|
162
|
+
v-model:value="value[bannerType].text"
|
|
163
|
+
:disabled="isUiDisabled"
|
|
164
|
+
:label="t('banner.text')"
|
|
165
|
+
type="multiline"
|
|
166
|
+
:aria-describedby="bannerTitleId"
|
|
167
|
+
/>
|
|
154
168
|
<p
|
|
155
|
-
|
|
156
|
-
class="
|
|
169
|
+
v-if="isConsentBanner"
|
|
170
|
+
class="banner-input-footnote mt-5 mb-20"
|
|
157
171
|
>
|
|
158
|
-
{{ t(
|
|
172
|
+
{{ t('banner.consentFootnote') }}
|
|
159
173
|
</p>
|
|
160
|
-
<div class="col span-6">
|
|
161
|
-
<LabeledInput
|
|
162
|
-
v-model:value="value[bannerType].text"
|
|
163
|
-
:disabled="isUiDisabled"
|
|
164
|
-
:label="t('banner.text')"
|
|
165
|
-
type="multiline"
|
|
166
|
-
:aria-describedby="bannerTitleId"
|
|
167
|
-
/>
|
|
168
|
-
<p
|
|
169
|
-
v-if="isConsentBanner"
|
|
170
|
-
class="banner-input-footnote mt-5 mb-20"
|
|
171
|
-
>
|
|
172
|
-
{{ t('banner.consentFootnote') }}
|
|
173
|
-
</p>
|
|
174
|
-
</div>
|
|
175
|
-
<div class="col span-6">
|
|
176
|
-
<LabeledSelect
|
|
177
|
-
v-model:value="value[bannerType].fontSize"
|
|
178
|
-
:data-testid="`banner_font_size_options${bannerType}`"
|
|
179
|
-
:disabled="isUiDisabled"
|
|
180
|
-
:label="t('banner.bannerFontSize.label')"
|
|
181
|
-
:options="uiBannerFontSizeOptions"
|
|
182
|
-
:aria-describedby="bannerTitleId"
|
|
183
|
-
/>
|
|
184
|
-
</div>
|
|
185
174
|
</div>
|
|
186
|
-
<div class="
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
175
|
+
<div class="col span-2">
|
|
176
|
+
<RadioGroup
|
|
177
|
+
v-model:value="value[bannerType].textAlignment"
|
|
178
|
+
name="bannerAlignment"
|
|
179
|
+
:data-testid="`banner_alignment_radio_options${bannerType}`"
|
|
180
|
+
:label="t('banner.bannerAlignment.label')"
|
|
181
|
+
:options="radioOptions.options"
|
|
182
|
+
:labels="radioOptions.labels"
|
|
183
|
+
:mode="mode"
|
|
184
|
+
:aria-label="`${t(`banner.${bannerType}`)} ${t('banner.bannerAlignment.label')}`"
|
|
185
|
+
/>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="col span-2">
|
|
188
|
+
<h3 id="decoration-banner-title-id">
|
|
189
|
+
{{ t('banner.bannerDecoration.label') }}
|
|
190
|
+
</h3>
|
|
191
|
+
<div
|
|
192
|
+
v-for="(o, i) in textDecorationOptions"
|
|
193
|
+
:key="i"
|
|
194
|
+
>
|
|
195
|
+
<Checkbox
|
|
196
|
+
v-model:value="value[bannerType][o.style]"
|
|
197
|
+
name="bannerDecoration"
|
|
198
|
+
:data-testid="`banner_decoration_checkbox${bannerType}${o.label}`"
|
|
199
|
+
class="banner-decoration-checkbox"
|
|
195
200
|
:mode="mode"
|
|
196
|
-
:
|
|
201
|
+
:label="o.label"
|
|
202
|
+
:aria-describedby="`${bannerTitleId} decoration-banner-title-id`"
|
|
197
203
|
/>
|
|
198
204
|
</div>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
v-model:value="value[bannerType][o.style]"
|
|
210
|
-
name="bannerDecoration"
|
|
211
|
-
:data-testid="`banner_decoration_checkbox${bannerType}${o.label}`"
|
|
212
|
-
class="banner-decoration-checkbox"
|
|
213
|
-
:mode="mode"
|
|
214
|
-
:label="o.label"
|
|
215
|
-
:aria-describedby="`${bannerTitleId} decoration-banner-title-id`"
|
|
216
|
-
/>
|
|
217
|
-
</div>
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
205
|
+
</div>
|
|
206
|
+
<div class="col span-2">
|
|
207
|
+
<LabeledSelect
|
|
208
|
+
v-model:value="value[bannerType].fontSize"
|
|
209
|
+
:data-testid="`banner_font_size_options${bannerType}`"
|
|
210
|
+
:disabled="isUiDisabled"
|
|
211
|
+
:label="t('banner.bannerFontSize.label')"
|
|
212
|
+
:options="uiBannerFontSizeOptions"
|
|
213
|
+
:aria-describedby="bannerTitleId"
|
|
214
|
+
/>
|
|
220
215
|
</div>
|
|
221
216
|
</div>
|
|
222
217
|
<div
|
|
@@ -355,7 +355,7 @@ export default {
|
|
|
355
355
|
v-if="isRandomGenerated"
|
|
356
356
|
:class="{'row': isCreateEdit}"
|
|
357
357
|
>
|
|
358
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
358
|
+
<div :class="{'col': isCreateEdit, 'span-8': isCreateEdit}">
|
|
359
359
|
<Password
|
|
360
360
|
v-model:value="passwordGen"
|
|
361
361
|
class="mt-10"
|
|
@@ -370,7 +370,7 @@ export default {
|
|
|
370
370
|
class="userGen"
|
|
371
371
|
:class="{'row': isCreateEdit}"
|
|
372
372
|
>
|
|
373
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
373
|
+
<div :class="{'col': isCreateEdit, 'span-4': isCreateEdit}">
|
|
374
374
|
<Password
|
|
375
375
|
v-model:value="passwordNew"
|
|
376
376
|
data-testid="account__new_password"
|
|
@@ -380,7 +380,7 @@ export default {
|
|
|
380
380
|
:ignore-password-managers="!isChange"
|
|
381
381
|
/>
|
|
382
382
|
</div>
|
|
383
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
383
|
+
<div :class="{'col': isCreateEdit, 'span-4': isCreateEdit}">
|
|
384
384
|
<Password
|
|
385
385
|
v-model:value="passwordConfirm"
|
|
386
386
|
data-testid="account__confirm_password"
|
|
@@ -405,7 +405,7 @@ export default {
|
|
|
405
405
|
class="text-error"
|
|
406
406
|
:class="{'row': isCreateEdit}"
|
|
407
407
|
>
|
|
408
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
408
|
+
<div :class="{'col': isCreateEdit, 'span-8': isCreateEdit}">
|
|
409
409
|
<Banner
|
|
410
410
|
v-for="(err, i) in errorMessages"
|
|
411
411
|
:key="i"
|
|
@@ -112,7 +112,8 @@ export default {
|
|
|
112
112
|
|
|
113
113
|
<template>
|
|
114
114
|
<div
|
|
115
|
-
class="color-input
|
|
115
|
+
class="color-input"
|
|
116
|
+
:class="{[mode]:mode, disabled: isDisabled}"
|
|
116
117
|
:data-testid="componentTestid + '-color-input'"
|
|
117
118
|
:tabindex="isDisabled ? -1 : 0"
|
|
118
119
|
@keydown.space.prevent
|
|
@@ -134,7 +135,6 @@ export default {
|
|
|
134
135
|
</label>
|
|
135
136
|
<div
|
|
136
137
|
:data-testid="componentTestid + '-color-input_preview-container'"
|
|
137
|
-
:class="{[mode]:mode, disabled: isDisabled}"
|
|
138
138
|
class="preview-container"
|
|
139
139
|
@click.stop="$refs.input.click($event)"
|
|
140
140
|
>
|
|
@@ -143,31 +143,28 @@ export default {
|
|
|
143
143
|
class="color-display"
|
|
144
144
|
>
|
|
145
145
|
<input
|
|
146
|
-
style="margin-bottom: 6px;"
|
|
147
146
|
ref="input"
|
|
148
147
|
:aria-disabled="isDisabled ? 'true' : 'false'"
|
|
149
148
|
:aria-label="ariaLabel"
|
|
150
149
|
:aria-describedby="ariaDescribedBy"
|
|
151
150
|
type="color"
|
|
152
|
-
class="color-input"
|
|
153
151
|
:disabled="isDisabled"
|
|
154
152
|
tabindex="-1"
|
|
155
153
|
:value="inputValue"
|
|
156
154
|
@input="$emit('update:value', $event.target.value)"
|
|
157
155
|
>
|
|
158
156
|
</span>
|
|
159
|
-
<span class="color-value">{{ inputValue }}</span>
|
|
157
|
+
<span class="text-muted color-value">{{ inputValue }}</span>
|
|
160
158
|
</div>
|
|
161
159
|
</div>
|
|
162
160
|
</template>
|
|
163
161
|
|
|
164
162
|
<style lang='scss' scoped>
|
|
165
|
-
.color-input
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
163
|
+
.color-input {
|
|
164
|
+
border: 1px solid var(--border);
|
|
165
|
+
border-radius: var(--border-radius);
|
|
166
|
+
padding: 10px;
|
|
167
|
+
|
|
171
168
|
&:focus-visible {
|
|
172
169
|
@include focus-outline;
|
|
173
170
|
}
|
|
@@ -204,26 +201,6 @@ export default {
|
|
|
204
201
|
|
|
205
202
|
.color-value {
|
|
206
203
|
margin-left: 4px;
|
|
207
|
-
color: var(--input-label);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&.disabled, &.disabled .selected, &[disabled], &[disabled]:hover {
|
|
211
|
-
color: var(--input-disabled-text);
|
|
212
|
-
outline-width: 0;
|
|
213
|
-
border-color: var(--input-disabled-border);
|
|
214
|
-
cursor: not-allowed;
|
|
215
|
-
|
|
216
|
-
label, span, div, input {
|
|
217
|
-
cursor: not-allowed !important;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.color-value {
|
|
221
|
-
color: var(--muted);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
&::placeholder {
|
|
225
|
-
color: var(--input-disabled-placeholder);
|
|
226
|
-
}
|
|
227
204
|
}
|
|
228
205
|
}
|
|
229
206
|
|
|
@@ -249,5 +226,4 @@ export default {
|
|
|
249
226
|
}
|
|
250
227
|
}
|
|
251
228
|
}
|
|
252
|
-
|
|
253
229
|
</style>
|
|
@@ -55,7 +55,7 @@ export default defineComponent({
|
|
|
55
55
|
<div v-if="!isView">
|
|
56
56
|
<div class="spacer-small" />
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
<div
|
|
59
59
|
v-for="(err,idx) in errors"
|
|
60
60
|
:key="idx"
|
|
61
61
|
>
|
|
@@ -65,7 +65,7 @@ export default defineComponent({
|
|
|
65
65
|
:closable="true"
|
|
66
66
|
@close="closeError(idx)"
|
|
67
67
|
/>
|
|
68
|
-
</div>
|
|
68
|
+
</div>
|
|
69
69
|
<div class="buttons">
|
|
70
70
|
<div class="left">
|
|
71
71
|
<slot name="left" />
|
|
@@ -97,10 +97,9 @@ export default defineComponent({
|
|
|
97
97
|
|
|
98
98
|
<style lang='scss'>
|
|
99
99
|
.buttons {
|
|
100
|
-
|
|
100
|
+
display: grid;
|
|
101
101
|
grid-template-areas: "left right";
|
|
102
|
-
grid-template-columns: "min-content auto";
|
|
103
|
-
display: flex;
|
|
102
|
+
grid-template-columns: "min-content auto";
|
|
104
103
|
|
|
105
104
|
.left {
|
|
106
105
|
grid-area: left;
|
|
@@ -112,13 +111,11 @@ export default defineComponent({
|
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
.right {
|
|
115
|
-
|
|
116
|
-
text-align: right;
|
|
117
|
-
|
|
118
|
-
justify-content: flex-end;
|
|
114
|
+
grid-area: right;
|
|
115
|
+
text-align: right;
|
|
116
|
+
|
|
119
117
|
.btn, button {
|
|
120
|
-
|
|
121
|
-
margin: 0 10px 0 0px;
|
|
118
|
+
margin: 0 0 0 $column-gutter;
|
|
122
119
|
}
|
|
123
120
|
}
|
|
124
121
|
}
|
|
@@ -217,7 +217,6 @@ export default {
|
|
|
217
217
|
|
|
218
218
|
&.labeled-select {
|
|
219
219
|
.selected {
|
|
220
|
-
background-color: var(--input-bg);
|
|
221
220
|
color: var(--input-text);
|
|
222
221
|
text-align: center;
|
|
223
222
|
margin-right: 1em;
|
|
@@ -270,19 +269,19 @@ export default {
|
|
|
270
269
|
margin-right: 0;
|
|
271
270
|
|
|
272
271
|
&:hover:not(.focused):not(.disabled):not(.view) {
|
|
273
|
-
border:
|
|
272
|
+
border: 1px solid var(--input-hover-border) !important;
|
|
274
273
|
}
|
|
275
274
|
|
|
276
275
|
&.focused {
|
|
277
|
-
border:
|
|
276
|
+
border: 1px solid var(--outline) !important;
|
|
278
277
|
}
|
|
279
278
|
|
|
280
279
|
&:hover:not(.focused):not(.disabled) {
|
|
281
|
-
border:
|
|
280
|
+
border: 1px solid var(--input-hover-border) !important;
|
|
282
281
|
}
|
|
283
282
|
|
|
284
283
|
&.focused {
|
|
285
|
-
border:
|
|
284
|
+
border: 1px solid var(--outline) !important;
|
|
286
285
|
}
|
|
287
286
|
|
|
288
287
|
&.labeled-select.focused :deep(),
|
|
@@ -292,8 +291,7 @@ export default {
|
|
|
292
291
|
|
|
293
292
|
&.labeled-select:not(.disabled):not(.view) :deep(),
|
|
294
293
|
&.unlabeled-select:not(.disabled):not(.view) :deep() {
|
|
295
|
-
|
|
296
|
-
height: 32px;
|
|
294
|
+
border: solid 1px var(--input-border);
|
|
297
295
|
}
|
|
298
296
|
|
|
299
297
|
&.labeled-select :deep(),
|
|
@@ -304,7 +302,6 @@ export default {
|
|
|
304
302
|
// position: relative;
|
|
305
303
|
|
|
306
304
|
.vs__selected {
|
|
307
|
-
background-color: var(--input-bg);
|
|
308
305
|
color: var(--input-text);
|
|
309
306
|
}
|
|
310
307
|
|
|
@@ -283,7 +283,7 @@ export default {
|
|
|
283
283
|
const gap = this.canRemove ? ' 50px' : '';
|
|
284
284
|
const size = 2 + this.extraColumns.length;
|
|
285
285
|
|
|
286
|
-
return `grid-template-columns: repeat(${ size },
|
|
286
|
+
return `grid-template-columns: repeat(${ size }, 1fr)${ gap };`;
|
|
287
287
|
},
|
|
288
288
|
usedKeyOptions() {
|
|
289
289
|
return this.rows.map((row) => row[this.keyName]);
|
|
@@ -330,7 +330,7 @@ export default {
|
|
|
330
330
|
},
|
|
331
331
|
|
|
332
332
|
getRows(value) {
|
|
333
|
-
|
|
333
|
+
const rows = [];
|
|
334
334
|
|
|
335
335
|
if ( this.asMap ) {
|
|
336
336
|
const input = value || {};
|
|
@@ -403,18 +403,6 @@ export default {
|
|
|
403
403
|
obj.binary = false;
|
|
404
404
|
obj.canEncode = this.handleBase64;
|
|
405
405
|
obj.supported = true;
|
|
406
|
-
|
|
407
|
-
// 上传镜像问题
|
|
408
|
-
const s = this.rows.filter(item => {
|
|
409
|
-
// 如果 item.key 或 obj.key 为空,直接保留
|
|
410
|
-
if (!item.key || !obj.key) {
|
|
411
|
-
return true;
|
|
412
|
-
}
|
|
413
|
-
// 两者都有值时才比较
|
|
414
|
-
return item.key !== obj.key;
|
|
415
|
-
});
|
|
416
|
-
this.rows = s;
|
|
417
|
-
|
|
418
406
|
this.rows.push(obj);
|
|
419
407
|
this.queueUpdate();
|
|
420
408
|
this.$nextTick(() => {
|
|
@@ -478,11 +466,8 @@ export default {
|
|
|
478
466
|
const valueName = this.valueName;
|
|
479
467
|
|
|
480
468
|
for ( const row of this.rows ) {
|
|
481
|
-
|
|
482
|
-
// const key = (row[keyName] || '').trim();
|
|
483
|
-
|
|
469
|
+
let value = (row[valueName] || '');
|
|
484
470
|
const key = (row[keyName] || '').trim();
|
|
485
|
-
let value = (row[valueName] || '').trim();
|
|
486
471
|
|
|
487
472
|
if (value && typeOf(value) === 'object') {
|
|
488
473
|
out[key] = JSON.parse(JSON.stringify(value));
|
|
@@ -603,7 +588,6 @@ export default {
|
|
|
603
588
|
</script>
|
|
604
589
|
<template>
|
|
605
590
|
<div class="key-value">
|
|
606
|
-
<!-- 标题部分:如果传了 title 或者插槽 title 才显示 -->
|
|
607
591
|
<div
|
|
608
592
|
v-if="title || $slots.title"
|
|
609
593
|
class="clearfix"
|
|
@@ -611,7 +595,6 @@ export default {
|
|
|
611
595
|
<slot name="title">
|
|
612
596
|
<h3>
|
|
613
597
|
{{ title }}
|
|
614
|
-
<!-- 标题右侧提示信息 -->
|
|
615
598
|
<i
|
|
616
599
|
v-if="titleProtip"
|
|
617
600
|
v-clean-tooltip="titleProtip"
|
|
@@ -620,8 +603,6 @@ export default {
|
|
|
620
603
|
</h3>
|
|
621
604
|
</slot>
|
|
622
605
|
</div>
|
|
623
|
-
|
|
624
|
-
<!-- 整个 Key-Value 表格容器 -->
|
|
625
606
|
<div
|
|
626
607
|
class="kv-container"
|
|
627
608
|
role="grid"
|
|
@@ -630,8 +611,6 @@ export default {
|
|
|
630
611
|
:aria-colcount="extraColumns.length + 2"
|
|
631
612
|
:style="containerStyle"
|
|
632
613
|
>
|
|
633
|
-
|
|
634
|
-
<!-- 表头:有数据或者处于 view 模式才显示 -->
|
|
635
614
|
<template v-if="rows.length || isView">
|
|
636
615
|
<div class="rowgroup">
|
|
637
616
|
<div class="row">
|
|
@@ -681,8 +660,6 @@ export default {
|
|
|
681
660
|
</div>
|
|
682
661
|
</div>
|
|
683
662
|
</template>
|
|
684
|
-
|
|
685
|
-
<!-- 如果是 view 模式但没有数据,显示占位符 -->
|
|
686
663
|
<template v-if="!rows.length && isView">
|
|
687
664
|
<div class="rowgroup">
|
|
688
665
|
<div class="row">
|
|
@@ -701,8 +678,6 @@ export default {
|
|
|
701
678
|
</div>
|
|
702
679
|
</div>
|
|
703
680
|
</template>
|
|
704
|
-
|
|
705
|
-
<!-- 遍历 rows 渲染每一行 -->
|
|
706
681
|
<template
|
|
707
682
|
v-for="(row,i) in rows"
|
|
708
683
|
v-else
|
|
@@ -811,7 +786,7 @@ export default {
|
|
|
811
786
|
:disabled="disabled"
|
|
812
787
|
:mode="mode"
|
|
813
788
|
:placeholder="_valuePlaceholder"
|
|
814
|
-
:min-height="
|
|
789
|
+
:min-height="40"
|
|
815
790
|
:spellcheck="false"
|
|
816
791
|
:aria-label="t('generic.ariaLabel.value', {index: i+1})"
|
|
817
792
|
@update:value="queueUpdate"
|
|
@@ -890,8 +865,6 @@ export default {
|
|
|
890
865
|
</div>
|
|
891
866
|
</template>
|
|
892
867
|
</div>
|
|
893
|
-
|
|
894
|
-
<!-- 底部新增/从文件导入 -->
|
|
895
868
|
<div
|
|
896
869
|
v-if="(addAllowed || readAllowed) && !isView"
|
|
897
870
|
class="footer mt-10"
|
|
@@ -900,8 +873,6 @@ export default {
|
|
|
900
873
|
name="add"
|
|
901
874
|
:add="add"
|
|
902
875
|
>
|
|
903
|
-
|
|
904
|
-
<!-- 添加按钮 -->
|
|
905
876
|
<button
|
|
906
877
|
v-if="addAllowed"
|
|
907
878
|
type="button"
|
|
@@ -918,8 +889,6 @@ export default {
|
|
|
918
889
|
:class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
|
|
919
890
|
/> {{ _addLabel }}
|
|
920
891
|
</button>
|
|
921
|
-
|
|
922
|
-
<!-- 从文件读取 -->
|
|
923
892
|
<FileSelector
|
|
924
893
|
v-if="readAllowed"
|
|
925
894
|
:aria-label="t('generic.ariaLabel.readKeyValue')"
|
|
@@ -944,8 +913,8 @@ export default {
|
|
|
944
913
|
}
|
|
945
914
|
.kv-container {
|
|
946
915
|
display: grid;
|
|
947
|
-
|
|
948
|
-
column-gap:
|
|
916
|
+
align-items: center;
|
|
917
|
+
column-gap: 20px;
|
|
949
918
|
|
|
950
919
|
.key-value-label {
|
|
951
920
|
margin-bottom: 0;
|
|
@@ -970,9 +939,6 @@ export default {
|
|
|
970
939
|
}
|
|
971
940
|
&.value textarea {
|
|
972
941
|
padding: 10px 10px 10px 10px;
|
|
973
|
-
min-height:32px;
|
|
974
|
-
line-height: 12px;
|
|
975
|
-
border: solid var(--border-width) var(--input-border);
|
|
976
942
|
}
|
|
977
943
|
|
|
978
944
|
.text-monospace:not(.conceal) {
|
|
@@ -1011,14 +977,8 @@ export default {
|
|
|
1011
977
|
}
|
|
1012
978
|
}
|
|
1013
979
|
input {
|
|
1014
|
-
height:
|
|
980
|
+
height: 40px;
|
|
1015
981
|
line-height: 1;
|
|
1016
|
-
border: solid var(--border-width) var(--input-border);
|
|
1017
|
-
padding: 4px 11px;
|
|
1018
|
-
&:hover{
|
|
1019
|
-
border: solid var(--border-width) var(--input-border);
|
|
1020
|
-
box-shadow: 0 4px 6px 0 var(--input-border-box-shadow);
|
|
1021
|
-
}
|
|
1022
982
|
}
|
|
1023
983
|
.footer {
|
|
1024
984
|
.protip {
|