dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.8
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/icons/demo.css +539 -0
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +216 -0
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +324 -0
- 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 +3 -0
- package/assets/images/action.svg +6 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +19 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/half-logo.svg +2 -23
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +63 -0
- package/assets/styles/app.scss +4 -0
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +14 -7
- package/assets/styles/global/_button.scss +43 -25
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +45 -13
- package/assets/styles/global/_labeled-input.scss +54 -26
- package/assets/styles/global/_layout.scss +8 -3
- package/assets/styles/global/_select.scss +25 -17
- package/assets/styles/global/_table.scss +7 -1
- package/assets/styles/global/_tooltip.scss +56 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +66 -43
- package/assets/styles/vendor/vue-select.scss +22 -9
- package/assets/translations/en-us.yaml +28 -4
- package/assets/translations/zh-hans.yaml +452 -189
- package/components/ActionDropdown.vue +2 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +2 -0
- package/components/AppModal.vue +46 -5
- package/components/BrandImage.vue +1 -0
- package/components/ButtonDropdown.vue +26 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +20 -6
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +9 -8
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- package/components/DotState.vue +84 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
- package/components/ExplorerMembers.vue +18 -3
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +112 -48
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +3 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/IndentedPanel.vue +4 -10
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +20 -1
- package/components/ModalWithCard.vue +12 -3
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +30 -11
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/index.vue +109 -24
- package/components/ResourceDetail/Masthead/legacy.vue +181 -38
- package/components/ResourceDetail/legacy.vue +32 -14
- package/components/ResourceList/Masthead.vue +226 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +24 -2
- package/components/SideNav.vue +74 -20
- package/components/SortableTable/THead.vue +33 -3
- package/components/SortableTable/index.vue +1016 -463
- package/components/SortableTable/paging.js +26 -16
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +47 -29
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +37 -13
- package/components/auth/RoleDetailEdit.vue +58 -7
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +316 -0
- package/components/form/ArrayList.vue +41 -33
- package/components/form/ArrayListGrouped.vue +10 -2
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Footer.vue +11 -8
- package/components/form/InputWithSelect.vue +8 -5
- package/components/form/KeyValue.vue +47 -7
- package/components/form/LabeledSelect.vue +214 -242
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +24 -7
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +59 -20
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +4 -5
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +3 -6
- package/components/form/Select.vue +5 -2
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/UnitInput.vue +8 -3
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +132 -99
- package/components/nav/Header.vue +124 -27
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +20 -17
- package/components/nav/TopLevelMenu.vue +182 -119
- package/components/nav/Type.vue +63 -41
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +15 -11
- package/config/product/auth.js +17 -7
- package/config/product/settings.js +19 -9
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +17 -4
- 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 +36 -12
- 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 +1 -2
- package/edit/token.vue +31 -12
- package/edit/workload/index.vue +4 -4
- package/list/management.cattle.io.setting.vue +22 -13
- package/list/management.cattle.io.user.vue +7 -3
- package/list/namespace.vue +3 -0
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/package.json +1 -1
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +220 -52
- package/pages/auth/setup.vue +142 -19
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +56 -5
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +174 -102
- package/pages/c/_cluster/settings/brand.vue +350 -302
- package/pages/c/_cluster/settings/performance.vue +61 -38
- package/pages/home.vue +70 -30
- package/pages/prefs.vue +27 -25
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +38 -55
- package/rancher-components/Banner/Banner.vue +12 -8
- package/rancher-components/Card/Card.vue +7 -8
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
- package/rancher-components/Form/Radio/RadioButton.vue +35 -11
- package/rancher-components/Form/Radio/RadioGroup.vue +13 -5
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -4
- package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/rancher-components/StringList/StringList.vue +1 -1
- package/scripts/publish-shell.sh +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 +5 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +32 -2
- package/types/shell/index.d.ts +78 -97
- package/utils/error.js +89 -8
- package/utils/errorTranslate.json +1351 -0
- package/utils/router.js +21 -0
- package/utils/select.js +26 -3
- package/utils/string.js +8 -5
- package/utils/title.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { MANAGEMENT } from '@shell/config/types';
|
|
3
|
-
import { ALLOWED_SETTINGS, PROVISIONING_SETTINGS } from '@shell/config/settings';
|
|
3
|
+
import { ALLOWED_SETTINGS_NEW, ALLOWED_SETTINGS, PROVISIONING_SETTINGS } from '@shell/config/settings';
|
|
4
4
|
import { Banner } from '@components/Banner';
|
|
5
5
|
import Loading from '@shell/components/Loading';
|
|
6
6
|
import { VIEW_IN_API } from '@shell/store/prefs';
|
|
@@ -26,8 +26,12 @@ export default {
|
|
|
26
26
|
const settings = [];
|
|
27
27
|
const provisioningSettings = [];
|
|
28
28
|
|
|
29
|
+
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
|
|
30
|
+
|
|
31
|
+
const allowedSettings = topLevelPermissions && topLevelPermissions === 'superadmin' ? ALLOWED_SETTINGS : ALLOWED_SETTINGS_NEW
|
|
32
|
+
|
|
29
33
|
// Combine the allowed settings with the data from the API
|
|
30
|
-
for ( const id in
|
|
34
|
+
for ( const id in allowedSettings ) {
|
|
31
35
|
const setting = settingsMap[id];
|
|
32
36
|
|
|
33
37
|
if ( !setting ) {
|
|
@@ -69,7 +73,10 @@ export default {
|
|
|
69
73
|
},
|
|
70
74
|
|
|
71
75
|
data() {
|
|
72
|
-
|
|
76
|
+
|
|
77
|
+
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
|
|
78
|
+
|
|
79
|
+
return { topLevelPermissions, settings: null, provisioningSettings: null };
|
|
73
80
|
},
|
|
74
81
|
computed: { ...mapGetters({ t: 'i18n/t' }) }
|
|
75
82
|
};
|
|
@@ -96,16 +103,18 @@ export default {
|
|
|
96
103
|
/>
|
|
97
104
|
</div>
|
|
98
105
|
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
<div v-if="topLevelPermissions && topLevelPermissions === 'superadmin'">
|
|
107
|
+
<h2>
|
|
108
|
+
{{ t('advancedSettings.provisioning.header') }}
|
|
109
|
+
</h2>
|
|
110
|
+
<div
|
|
111
|
+
v-for="(setting) in provisioningSettings"
|
|
112
|
+
:key="setting.id"
|
|
113
|
+
>
|
|
114
|
+
<Setting
|
|
115
|
+
:value="setting"
|
|
116
|
+
/>
|
|
117
|
+
</div>
|
|
109
118
|
</div>
|
|
110
119
|
</div>
|
|
111
120
|
</template>
|
|
@@ -142,9 +142,10 @@ export default {
|
|
|
142
142
|
:to="{ name: 'c-cluster-auth-user.retention'}"
|
|
143
143
|
class="btn role-link btn-sm btn-user-retention"
|
|
144
144
|
data-testid="router-link-user-retention"
|
|
145
|
+
style="text-align: left;min-width: auto !important;width: auto;"
|
|
145
146
|
>
|
|
146
|
-
<i class="icon icon-gear" />
|
|
147
|
-
{{ t('user.retention.button.label') }}
|
|
147
|
+
<!-- <i class="icon icon-gear" />
|
|
148
|
+
{{ t('user.retention.button.label') }} -->
|
|
148
149
|
</router-link>
|
|
149
150
|
</template>
|
|
150
151
|
</Masthead>
|
|
@@ -171,8 +172,11 @@ export default {
|
|
|
171
172
|
|
|
172
173
|
<style lang="scss">
|
|
173
174
|
.btn-user-retention {
|
|
174
|
-
display:
|
|
175
|
+
display: block;
|
|
175
176
|
gap: 0.25rem;
|
|
176
177
|
padding: 0;
|
|
177
178
|
}
|
|
179
|
+
.btn-user-retention:hover {
|
|
180
|
+
color: #333 !important;
|
|
181
|
+
}
|
|
178
182
|
</style>
|
package/list/namespace.vue
CHANGED
|
@@ -42,6 +42,9 @@ export default {
|
|
|
42
42
|
headers() {
|
|
43
43
|
const headersFromSchema = this.$store.getters['type-map/headersFor'](this.schema);
|
|
44
44
|
|
|
45
|
+
[headersFromSchema[0], headersFromSchema[1]] = [headersFromSchema[1], headersFromSchema[0]];
|
|
46
|
+
headersFromSchema[0].width = '200px';
|
|
47
|
+
headersFromSchema[1].width = '100px';
|
|
45
48
|
// harvester is reusing this namespace.js to render ns page, we need to make sure harvester backend support quota schema to show this column.
|
|
46
49
|
if (this.hasHarvesterResourceQuotaSchema && Array.isArray(headersFromSchema) && headersFromSchema.length > 1) {
|
|
47
50
|
const columnIdx = headersFromSchema.length - 1;
|
|
@@ -307,19 +307,18 @@ export default {
|
|
|
307
307
|
<router-link
|
|
308
308
|
v-if="row.mgmt && row.mgmt.isReady && !row.hasError"
|
|
309
309
|
data-testid="cluster-manager-list-explore-management"
|
|
310
|
-
class="btn btn-sm role-secondary"
|
|
311
310
|
:to="{name: 'c-cluster', params: {cluster: row.mgmt.id}}"
|
|
312
311
|
>
|
|
313
|
-
|
|
312
|
+
<a href="javascript:;">
|
|
313
|
+
{{ t('cluster.explore') }}
|
|
314
|
+
</a>
|
|
314
315
|
</router-link>
|
|
315
|
-
<
|
|
316
|
-
v-else
|
|
316
|
+
<span
|
|
317
317
|
data-testid="cluster-manager-list-explore"
|
|
318
|
-
|
|
319
|
-
class="btn btn-sm role-secondary"
|
|
318
|
+
v-else
|
|
320
319
|
>
|
|
321
320
|
{{ t('cluster.explore') }}
|
|
322
|
-
</
|
|
321
|
+
</span>
|
|
323
322
|
</template>
|
|
324
323
|
</ResourceTable>
|
|
325
324
|
</div>
|
package/mixins/brand.js
CHANGED
|
@@ -175,7 +175,24 @@ export default {
|
|
|
175
175
|
const vars = createCssVars(color, this.theme, name);
|
|
176
176
|
|
|
177
177
|
for (const prop in vars) {
|
|
178
|
+
|
|
178
179
|
document.body.style.setProperty(prop, vars[prop]);
|
|
180
|
+
|
|
181
|
+
// 主色调hover值动态
|
|
182
|
+
if (prop === '--primary-hover-bg') {
|
|
183
|
+
// 如果是你要设置透明度的变量,比如 hover
|
|
184
|
+
let value = '#E8F4FF';
|
|
185
|
+
if (vars[prop]) {
|
|
186
|
+
const match = vars[prop].match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
187
|
+
if (match) {
|
|
188
|
+
const [_, r, g, b] = match;
|
|
189
|
+
value = `rgba(${r}, ${g}, ${b}, 0.15)`;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
document.body.style.setProperty('--nav-hover-color', vars[prop]);
|
|
194
|
+
document.body.style.setProperty('--nav-active', value);
|
|
195
|
+
}
|
|
179
196
|
}
|
|
180
197
|
},
|
|
181
198
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { NORMAN } from '@shell/config/types';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
props: {
|
|
6
|
+
value: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
useMuted: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: true,
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
showLabels: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
isShowPass: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false,
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async fetch() {
|
|
27
|
+
this.principal = this.$store.getters['rancher/byId'](NORMAN.PRINCIPAL, this.value);
|
|
28
|
+
|
|
29
|
+
if ( this.principal ) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const principalId = escape(this.value).replace(/\//g, '%2F');
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
this.principal = await this.$store.dispatch('rancher/find', {
|
|
37
|
+
type: NORMAN.PRINCIPAL,
|
|
38
|
+
id: this.value,
|
|
39
|
+
opt: { url: `/v3/principals/${ principalId }` }
|
|
40
|
+
});
|
|
41
|
+
} catch (e) {
|
|
42
|
+
console.error('Failed to fetch principal', this.value, principalId); // eslint-disable-line no-console
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
data() {
|
|
47
|
+
// Load from cache immediately if possible
|
|
48
|
+
return { principal: null };
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
computed: {
|
|
52
|
+
showBoth() {
|
|
53
|
+
const p = this.principal;
|
|
54
|
+
|
|
55
|
+
return p.name && p.loginName && p.name.trim().toLowerCase() !== p.loginName.trim().toLowerCase();
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<div
|
|
63
|
+
class="principal"
|
|
64
|
+
:class="{'showLabels': showLabels}"
|
|
65
|
+
>
|
|
66
|
+
<template v-if="!principal && $fetchState.pending">
|
|
67
|
+
<div class="avatar">
|
|
68
|
+
<div class="empty">
|
|
69
|
+
<i class="icon icon-spinner icon-lg" />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div
|
|
73
|
+
v-clean-html="t('principal.loading', null, true)"
|
|
74
|
+
class="name"
|
|
75
|
+
:class="{'text-muted': useMuted}"
|
|
76
|
+
/>
|
|
77
|
+
<div class="description" />
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<template v-else-if="principal">
|
|
81
|
+
<div class="avatar">
|
|
82
|
+
<img
|
|
83
|
+
src="@shell/assets/images/user.png"
|
|
84
|
+
>
|
|
85
|
+
</div>
|
|
86
|
+
<div
|
|
87
|
+
v-if="showLabels"
|
|
88
|
+
class="name"
|
|
89
|
+
>
|
|
90
|
+
<table>
|
|
91
|
+
<tr class="mb-10">
|
|
92
|
+
<td>{{ t('principal.name') }}: </td><td>{{ principal.name || principal.loginName }}</td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr class="mb-10">
|
|
95
|
+
<td>{{ t('principal.loginName') }}: </td><td>{{ principal.loginName }}</td>
|
|
96
|
+
</tr>
|
|
97
|
+
<tr
|
|
98
|
+
v-if="isShowPass"
|
|
99
|
+
class="mb-10"
|
|
100
|
+
>
|
|
101
|
+
<td>修改密码: </td><td>****** <slot name="edit" /></td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr><td>{{ t('principal.type') }}: </td><td>{{ principal.displayType }}</td></tr>
|
|
104
|
+
</table>
|
|
105
|
+
</div>
|
|
106
|
+
<template v-else>
|
|
107
|
+
<div class="name">
|
|
108
|
+
<template v-if="showBoth">
|
|
109
|
+
{{ principal.name }}
|
|
110
|
+
<span
|
|
111
|
+
v-if="principal.loginName"
|
|
112
|
+
:class="{'text-muted': useMuted}"
|
|
113
|
+
>({{ principal.loginName }})</span>
|
|
114
|
+
</template>
|
|
115
|
+
<template v-else-if="principal.name">
|
|
116
|
+
{{ principal.name }}
|
|
117
|
+
</template>
|
|
118
|
+
<template v-else>
|
|
119
|
+
{{ principal.loginName }}
|
|
120
|
+
</template>
|
|
121
|
+
</div>
|
|
122
|
+
<div
|
|
123
|
+
class="description"
|
|
124
|
+
:class="{'text-muted': useMuted}"
|
|
125
|
+
>
|
|
126
|
+
{{ principal.displayType }}
|
|
127
|
+
</div>
|
|
128
|
+
</template>
|
|
129
|
+
</template>
|
|
130
|
+
|
|
131
|
+
<template v-else>
|
|
132
|
+
<div class="avatar">
|
|
133
|
+
<div
|
|
134
|
+
class="empty"
|
|
135
|
+
:class="{'text-muted': useMuted}"
|
|
136
|
+
>
|
|
137
|
+
<i class="icon icon-warning icon-lg" />
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
<div
|
|
141
|
+
v-t="'principal.error'"
|
|
142
|
+
class="name text-error"
|
|
143
|
+
/>
|
|
144
|
+
<div
|
|
145
|
+
class="description"
|
|
146
|
+
:class="{'text-muted': useMuted}"
|
|
147
|
+
>
|
|
148
|
+
{{ value }}
|
|
149
|
+
</div>
|
|
150
|
+
</template>
|
|
151
|
+
</div>
|
|
152
|
+
</template>
|
|
153
|
+
|
|
154
|
+
<style lang="scss" scoped>
|
|
155
|
+
$size: 79px;
|
|
156
|
+
|
|
157
|
+
.principal {
|
|
158
|
+
display: grid;
|
|
159
|
+
grid-template-areas:
|
|
160
|
+
"avatar name"
|
|
161
|
+
"avatar description";
|
|
162
|
+
grid-template-columns: $size auto;
|
|
163
|
+
grid-template-rows: auto math.div($size, 2);
|
|
164
|
+
column-gap: 10px;
|
|
165
|
+
|
|
166
|
+
th {
|
|
167
|
+
text-align: left;
|
|
168
|
+
font-weight: normal;
|
|
169
|
+
padding-right: 10px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.showLabels {
|
|
173
|
+
/* grid-template-areas:
|
|
174
|
+
"avatar name";
|
|
175
|
+
grid-template-columns: 60px auto;
|
|
176
|
+
grid-template-rows: 60px;
|
|
177
|
+
column-gap: 0; */
|
|
178
|
+
display: flex;
|
|
179
|
+
column-gap:0;
|
|
180
|
+
.name {
|
|
181
|
+
display: flex;
|
|
182
|
+
line-height: unset;
|
|
183
|
+
}
|
|
184
|
+
table tr {
|
|
185
|
+
display: block;
|
|
186
|
+
}
|
|
187
|
+
table tr td:not(:first-of-type) {
|
|
188
|
+
padding-left: 10px;
|
|
189
|
+
}
|
|
190
|
+
table tr td:not(:last-of-type) {
|
|
191
|
+
width: 100px;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.avatar {
|
|
196
|
+
/* grid-area: avatar;
|
|
197
|
+
text-align: center; */
|
|
198
|
+
width: 287px;
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
align-items: center;
|
|
202
|
+
|
|
203
|
+
DIV.empty {
|
|
204
|
+
border: 1px solid var(--border);
|
|
205
|
+
line-height: $size;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
IMG {
|
|
209
|
+
width: $size;
|
|
210
|
+
height: $size;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
DIV.round, IMG.round {
|
|
214
|
+
border-radius: 50%;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.name {
|
|
219
|
+
grid-area: name;
|
|
220
|
+
line-height: math.div($size, 2);
|
|
221
|
+
overflow-wrap: anywhere;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.description {
|
|
225
|
+
grid-area: description;
|
|
226
|
+
line-height: math.div($size, 2);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
</style>
|