dashboard-shell-shell 0.0.3 → 0.0.1000000000001124
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/images/action.svg +6 -0
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/global/_button.scss +17 -10
- package/assets/styles/global/_form.scss +2 -2
- package/assets/styles/global/_labeled-input.scss +6 -3
- package/assets/styles/global/_select.scss +5 -6
- package/assets/styles/global/_tooltip.scss +8 -1
- package/assets/styles/themes/_dark.scss +2 -0
- package/assets/styles/themes/_light.scss +5 -2
- package/assets/styles/vendor/vue-select.scss +2 -1
- package/components/ActionDropdown.vue +1 -0
- package/components/ActionMenuShell.vue +6 -1
- package/components/BrandImage.vue +21 -0
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +1 -0
- package/components/CruResource.vue +1 -0
- package/components/CruResourceFooter.vue +1 -1
- package/components/IndentedPanel.vue +4 -10
- package/components/PromptRemove.vue +2 -2
- package/components/ResourceDetail/Masthead.vue +161 -232
- package/components/ResourceDetail/index.vue +20 -1
- package/components/ResourceList/Masthead-btn.vue +225 -0
- package/components/ResourceList/Masthead.vue +96 -68
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +64 -1
- package/components/SideNav.vue +24 -17
- package/components/SortableTable/THead.vue +6 -0
- package/components/SortableTable/index.vue +474 -366
- package/components/Tabbed/index.vue +4 -5
- package/components/auth/Principal.vue +3 -2
- package/components/auth/RoleDetailEdit.vue +56 -3
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/form/BannerSettings.vue +18 -16
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Footer.vue +1 -1
- package/components/form/InputWithSelect.vue +2 -0
- package/components/form/KeyValue.vue +31 -7
- package/components/form/LabeledSelect.vue +178 -178
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +24 -11
- package/components/form/Password.vue +6 -2
- package/components/form/Select.vue +2 -2
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +45 -24
- package/components/nav/Header.vue +103 -14
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/TopLevelMenu.vue +63 -23
- package/components/nav/Type.vue +24 -5
- package/composables/useClickOutside.ts +1 -1
- package/config/product/auth.js +1 -1
- package/config/product/explorer.js +1 -1
- package/config/product/settings.js +10 -10
- package/detail/management.cattle.io.user.vue +1 -0
- package/edit/management.cattle.io.user.vue +17 -4
- package/list/management.cattle.io.user.vue +23 -12
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/package.json +1 -1
- package/pages/auth/login.vue +8 -22
- package/pages/c/_cluster/auth/roles/index.vue +48 -14
- package/pages/c/_cluster/settings/banners.vue +164 -101
- package/pages/c/_cluster/settings/brand.vue +338 -301
- package/pages/c/_cluster/settings/performance.vue +53 -38
- package/pages/home.vue +64 -8
- package/pages/prefs.vue +23 -21
- package/rancher-components/Banner/Banner.vue +4 -0
- package/rancher-components/Card/Card.vue +3 -6
- package/rancher-components/Form/Checkbox/Checkbox.vue +3 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +4 -2
- package/rancher-components/Form/Radio/RadioButton.vue +3 -3
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +0 -4
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
- package/rancher-components/RcDropdown/RcDropdownItem.vue +1 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +3 -2
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/scripts/typegen.sh +0 -1
- package/store/i18n.js +5 -5
- package/store/prefs.js +1 -1
- package/store/type-map.js +2 -1
- package/utils/router.js +1 -1
- package/types/resources/fleet.d.ts +0 -57
- package/types/resources/pod-security-admission.ts +0 -36
- package/types/resources/settings.d.ts +0 -93
- package/types/resources/userPreferences.d.ts +0 -13
package/components/nav/Group.vue
CHANGED
|
@@ -179,8 +179,7 @@ export default {
|
|
|
179
179
|
const withoutQuery = withoutHash.split('?')[0];
|
|
180
180
|
const itemFullPath = this.$router.resolve(item.route).fullPath;
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
if (matchesNavLevel || itemFullPath === withoutQuery || withoutQuery.includes(itemFullPath)) {
|
|
182
|
+
if (matchesNavLevel || itemFullPath === withoutQuery) {
|
|
184
183
|
return true;
|
|
185
184
|
} else if (parentPath && itemFullPath === parentPath) {
|
|
186
185
|
return true;
|
|
@@ -222,6 +221,7 @@ export default {
|
|
|
222
221
|
class="accordion"
|
|
223
222
|
:class="{[`depth-${depth}`]: true, 'expanded': isExpanded, 'has-children': hasChildren, 'group-highlight': isGroupActive}"
|
|
224
223
|
>
|
|
224
|
+
<!-- 分组标题区 -->
|
|
225
225
|
<div
|
|
226
226
|
v-if="showHeader"
|
|
227
227
|
class="header"
|
|
@@ -233,26 +233,31 @@ export default {
|
|
|
233
233
|
@keyup.enter="groupSelected()"
|
|
234
234
|
@keyup.space="groupSelected()"
|
|
235
235
|
>
|
|
236
|
+
|
|
237
|
+
<!-- 具名插槽 header,允许外部自定义标题内容 -->
|
|
236
238
|
<slot name="header">
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
239
|
+
|
|
240
|
+
<!-- 如果分组有概览页(overview) 跳转到第一个子路由 -->
|
|
241
|
+
<h6 v-if="hasOverview">
|
|
242
|
+
<router-link
|
|
243
|
+
class="menuRouterLink"
|
|
244
|
+
:to="group.children[0].route"
|
|
245
|
+
:exact="group.children[0].exact"
|
|
246
|
+
:tabindex="-1"
|
|
247
|
+
>
|
|
244
248
|
<span v-clean-html="group.labelDisplay || group.label" />
|
|
245
|
-
</
|
|
246
|
-
</
|
|
249
|
+
</router-link>
|
|
250
|
+
</h6>
|
|
251
|
+
|
|
252
|
+
<!-- 没有概览页的情况 -->
|
|
247
253
|
<h6
|
|
248
254
|
v-else
|
|
249
|
-
@click="peek($event, true)"
|
|
250
255
|
>
|
|
251
|
-
|
|
252
|
-
{{ group.labelDisplay || group.label }}
|
|
253
|
-
<!-- <span v-clean-html="group.labelDisplay || group.label" /> -->
|
|
256
|
+
<span v-clean-html="group.labelDisplay || group.label" />
|
|
254
257
|
</h6>
|
|
255
258
|
</slot>
|
|
259
|
+
|
|
260
|
+
<!-- 折叠/展开图标 -->
|
|
256
261
|
<i
|
|
257
262
|
v-if="!onlyHasOverview && canCollapse"
|
|
258
263
|
class="icon toggle toggle-accordion"
|
|
@@ -265,6 +270,8 @@ export default {
|
|
|
265
270
|
@keyup.space="peek($event, true)"
|
|
266
271
|
/>
|
|
267
272
|
</div>
|
|
273
|
+
|
|
274
|
+
<!-- 子列表(Accordion 内容) -->
|
|
268
275
|
<ul
|
|
269
276
|
v-if="isExpanded"
|
|
270
277
|
class="list-unstyled body"
|
|
@@ -319,14 +326,19 @@ export default {
|
|
|
319
326
|
position: relative;
|
|
320
327
|
cursor: pointer;
|
|
321
328
|
color: var(--body-text);
|
|
322
|
-
height:
|
|
323
|
-
outline: none;
|
|
329
|
+
height: 50px;
|
|
324
330
|
|
|
325
331
|
H6 {
|
|
326
332
|
color: var(--body-text);
|
|
327
333
|
user-select: none;
|
|
328
334
|
text-transform: none;
|
|
329
335
|
font-size: 14px;
|
|
336
|
+
.menuRouterLink {
|
|
337
|
+
color: var(--body-text);
|
|
338
|
+
user-select: none;
|
|
339
|
+
text-transform: none;
|
|
340
|
+
font-size: 14px;
|
|
341
|
+
}
|
|
330
342
|
}
|
|
331
343
|
|
|
332
344
|
> A {
|
|
@@ -367,6 +379,9 @@ export default {
|
|
|
367
379
|
/* padding: 8px 0 8px 16px;
|
|
368
380
|
font-weight: bold; */
|
|
369
381
|
color: var(--nav-hover-color);
|
|
382
|
+
.menuRouterLink {
|
|
383
|
+
color: var(--nav-hover-color);
|
|
384
|
+
}
|
|
370
385
|
}
|
|
371
386
|
I{
|
|
372
387
|
color: var(--nav-hover-color);
|
|
@@ -381,6 +396,9 @@ export default {
|
|
|
381
396
|
color: var(--nav-hover-color);
|
|
382
397
|
h6{
|
|
383
398
|
color: var(--nav-hover-color);
|
|
399
|
+
.menuRouterLink {
|
|
400
|
+
color: var(--nav-hover-color);
|
|
401
|
+
}
|
|
384
402
|
}
|
|
385
403
|
}
|
|
386
404
|
}
|
|
@@ -422,6 +440,7 @@ export default {
|
|
|
422
440
|
|
|
423
441
|
&.depth-1 {
|
|
424
442
|
> .header {
|
|
443
|
+
line-height: 50px;
|
|
425
444
|
> H6 {
|
|
426
445
|
font-size: 13px;
|
|
427
446
|
line-height: 16px;
|
|
@@ -431,11 +450,13 @@ export default {
|
|
|
431
450
|
padding: 9px 7px 8px 7px !important;
|
|
432
451
|
}
|
|
433
452
|
}
|
|
453
|
+
|
|
434
454
|
}
|
|
435
455
|
|
|
436
456
|
&:not(.depth-0) {
|
|
437
457
|
> .header {
|
|
438
|
-
padding-left:
|
|
458
|
+
padding-left: 30px;
|
|
459
|
+
line-height: 50px;
|
|
439
460
|
> H6 {
|
|
440
461
|
// Child groups that aren't linked themselves
|
|
441
462
|
display: inline-block;
|
|
@@ -446,7 +467,9 @@ export default {
|
|
|
446
467
|
position: absolute;
|
|
447
468
|
right: 0;
|
|
448
469
|
top: 0;
|
|
449
|
-
padding:
|
|
470
|
+
padding: 0px 20px 0px 0px !important;
|
|
471
|
+
user-select: none;
|
|
472
|
+
line-height: 50px;
|
|
450
473
|
}
|
|
451
474
|
}
|
|
452
475
|
}
|
|
@@ -459,6 +482,9 @@ export default {
|
|
|
459
482
|
A, A I {
|
|
460
483
|
/* color: var(--primary-hover-text); */
|
|
461
484
|
color: var(--nav-hover-color);
|
|
485
|
+
.menuRouterLink {
|
|
486
|
+
color: var(--nav-hover-color);
|
|
487
|
+
}
|
|
462
488
|
}
|
|
463
489
|
|
|
464
490
|
A {
|
|
@@ -488,9 +514,4 @@ export default {
|
|
|
488
514
|
}
|
|
489
515
|
}
|
|
490
516
|
}
|
|
491
|
-
.nav-icon{
|
|
492
|
-
font-size: 32px;
|
|
493
|
-
margin-top: -11px;
|
|
494
|
-
color: #a8abb2;
|
|
495
|
-
}
|
|
496
517
|
</style>
|
|
@@ -265,6 +265,8 @@ export default {
|
|
|
265
265
|
},
|
|
266
266
|
|
|
267
267
|
mounted() {
|
|
268
|
+
console.log(this.$config.rancherEnv, ' this.$config.rancherEnv-------------------')
|
|
269
|
+
|
|
268
270
|
this.checkClusterName();
|
|
269
271
|
this.debouncedLayoutHeader = debounce(this.layoutHeader, 400);
|
|
270
272
|
window.addEventListener('resize', this.debouncedLayoutHeader);
|
|
@@ -397,24 +399,33 @@ export default {
|
|
|
397
399
|
</script>
|
|
398
400
|
|
|
399
401
|
<template>
|
|
402
|
+
|
|
403
|
+
<!-- 整个页面的顶部 header -->
|
|
400
404
|
<header
|
|
401
405
|
ref="header"
|
|
402
406
|
data-testid="header"
|
|
403
407
|
>
|
|
404
408
|
<div>
|
|
409
|
+
|
|
410
|
+
<!-- 顶部一级菜单(根据不同产品/集群条件决定是否显示) -->
|
|
405
411
|
<TopLevelMenu v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" />
|
|
406
412
|
</div>
|
|
407
413
|
|
|
408
|
-
<!--
|
|
414
|
+
<!-- ===== 左侧 logo 区域 ===== -->
|
|
415
|
+
<div
|
|
409
416
|
class="menu-spacer"
|
|
410
417
|
:class="{'isSingleProduct': isSingleProduct }"
|
|
411
418
|
>
|
|
419
|
+
|
|
420
|
+
<!-- 如果是单产品模式且不是 RancherInHarvester,就显示 logo 路由跳转 -->
|
|
412
421
|
<router-link
|
|
413
422
|
v-if="isSingleProduct && !isRancherInHarvester"
|
|
414
423
|
:to="singleProductLogoRoute"
|
|
415
424
|
role="link"
|
|
416
425
|
:alt="t('branding.logos.home')"
|
|
417
426
|
>
|
|
427
|
+
|
|
428
|
+
<!-- Harvester 自定义 Logo -->
|
|
418
429
|
<BrandImage
|
|
419
430
|
v-if="isSingleProduct.supportCustomLogo && isHarvester"
|
|
420
431
|
class="side-menu-logo"
|
|
@@ -422,6 +433,8 @@ export default {
|
|
|
422
433
|
:support-custom-logo="true"
|
|
423
434
|
:alt="t('branding.logos.label')"
|
|
424
435
|
/>
|
|
436
|
+
|
|
437
|
+
<!-- 普通单产品 Logo -->
|
|
425
438
|
<img
|
|
426
439
|
v-else
|
|
427
440
|
class="side-menu-logo"
|
|
@@ -431,20 +444,27 @@ export default {
|
|
|
431
444
|
</router-link>
|
|
432
445
|
</div>
|
|
433
446
|
|
|
447
|
+
<!-- 产品/集群信息展示区域(非 simple 模式) -->
|
|
434
448
|
<div
|
|
435
449
|
v-if="!simple"
|
|
436
450
|
ref="product"
|
|
437
451
|
class="product"
|
|
438
452
|
>
|
|
453
|
+
|
|
454
|
+
<!-- 当前产品支持集群切换 -->
|
|
439
455
|
<div
|
|
440
456
|
v-if="currentProduct && currentProduct.showClusterSwitcher"
|
|
441
457
|
v-clean-tooltip="nameTooltip"
|
|
442
458
|
class="cluster cluster-clipped"
|
|
443
459
|
>
|
|
460
|
+
|
|
461
|
+
<!-- 单产品模式(无集群选择器) -->
|
|
444
462
|
<div
|
|
445
463
|
v-if="isSingleProduct && !isRancherInHarvester"
|
|
446
464
|
class="product-name"
|
|
447
465
|
>
|
|
466
|
+
|
|
467
|
+
<!-- 如果支持自定义 Logo 显示厂商名,否则显示产品名 -->
|
|
448
468
|
<template v-if="isSingleProduct.supportCustomLogo">
|
|
449
469
|
{{ vendor }}
|
|
450
470
|
</template>
|
|
@@ -452,13 +472,19 @@ export default {
|
|
|
452
472
|
{{ t(isSingleProduct.productNameKey) }}
|
|
453
473
|
</template>
|
|
454
474
|
</div>
|
|
475
|
+
|
|
476
|
+
<!-- 多集群模式 -->
|
|
455
477
|
<template v-else>
|
|
478
|
+
|
|
479
|
+
<!-- 集群提供商图标 -->
|
|
456
480
|
<ClusterProviderIcon
|
|
457
481
|
v-if="currentCluster"
|
|
458
482
|
:cluster="currentCluster"
|
|
459
483
|
class="mr-10"
|
|
460
484
|
:alt="t('branding.logos.label')"
|
|
461
485
|
/>
|
|
486
|
+
|
|
487
|
+
<!-- 集群名称 -->
|
|
462
488
|
<div
|
|
463
489
|
v-if="currentCluster"
|
|
464
490
|
ref="clusterName"
|
|
@@ -466,12 +492,16 @@ export default {
|
|
|
466
492
|
>
|
|
467
493
|
{{ currentCluster.spec.displayName }}
|
|
468
494
|
</div>
|
|
495
|
+
|
|
496
|
+
<!-- 集群状态徽章 -->
|
|
469
497
|
<ClusterBadge
|
|
470
498
|
v-if="currentCluster"
|
|
471
499
|
:cluster="currentCluster"
|
|
472
500
|
class="ml-10"
|
|
473
501
|
:alt="t('branding.logos.label')"
|
|
474
502
|
/>
|
|
503
|
+
|
|
504
|
+
<!-- 无当前集群时显示默认 Logo -->
|
|
475
505
|
<div
|
|
476
506
|
v-if="!currentCluster"
|
|
477
507
|
class="simple-title"
|
|
@@ -484,10 +514,14 @@ export default {
|
|
|
484
514
|
</div>
|
|
485
515
|
</template>
|
|
486
516
|
</div>
|
|
517
|
+
|
|
518
|
+
<!-- 当前产品不支持集群切换 -->
|
|
487
519
|
<div
|
|
488
520
|
v-if="currentProduct && !currentProduct.showClusterSwitcher"
|
|
489
521
|
class="cluster"
|
|
490
522
|
>
|
|
523
|
+
|
|
524
|
+
<!-- 产品头部图标 -->
|
|
491
525
|
<img
|
|
492
526
|
v-if="currentProduct.iconHeader"
|
|
493
527
|
v-bind="$attrs"
|
|
@@ -496,16 +530,21 @@ export default {
|
|
|
496
530
|
style="width: 44px; height: 36px;"
|
|
497
531
|
:alt="t('branding.logos.label')"
|
|
498
532
|
>
|
|
533
|
+
|
|
534
|
+
<!-- 产品名称 -->
|
|
499
535
|
<div class="product-name">
|
|
500
536
|
{{ prod }}
|
|
501
537
|
</div>
|
|
502
538
|
</div>
|
|
503
539
|
</div>
|
|
504
540
|
|
|
541
|
+
<!-- simple 模式下的标题展示 -->
|
|
505
542
|
<div
|
|
506
543
|
v-else
|
|
507
544
|
class="simple-title"
|
|
508
545
|
>
|
|
546
|
+
|
|
547
|
+
<!-- 单产品模式 -->
|
|
509
548
|
<div
|
|
510
549
|
v-if="isSingleProduct"
|
|
511
550
|
class="product-name"
|
|
@@ -513,6 +552,7 @@ export default {
|
|
|
513
552
|
{{ t(isSingleProduct.productNameKey) }}
|
|
514
553
|
</div>
|
|
515
554
|
|
|
555
|
+
<!-- 非单产品模式显示默认 Logo -->
|
|
516
556
|
<div
|
|
517
557
|
v-else
|
|
518
558
|
class="side-menu-logo"
|
|
@@ -524,36 +564,56 @@ export default {
|
|
|
524
564
|
:alt="t('branding.logos.label')"
|
|
525
565
|
/>
|
|
526
566
|
</div>
|
|
527
|
-
</div>
|
|
567
|
+
</div>
|
|
568
|
+
|
|
569
|
+
<!-- ===== 左侧 logo 区域 ===== -->
|
|
570
|
+
<div class="menu-spacer">
|
|
528
571
|
|
|
529
|
-
<!-- logo -->
|
|
530
|
-
<div class="menu-spacer">
|
|
572
|
+
<!-- 如果是单产品模式且不是 RancherInHarvester,就显示 logo 路由跳转 -->
|
|
531
573
|
<router-link
|
|
532
574
|
v-if="isSingleProduct && !isRancherInHarvester"
|
|
533
575
|
:to="singleProductLogoRoute"
|
|
534
576
|
>
|
|
577
|
+
|
|
578
|
+
<!-- 显示用户头像或 logo 图片 -->
|
|
535
579
|
<img
|
|
536
580
|
:src="userIcon"
|
|
537
581
|
>
|
|
538
582
|
</router-link>
|
|
539
583
|
</div>
|
|
540
|
-
|
|
584
|
+
|
|
585
|
+
<!-- ===== 中间占位符(把左右内容分开) ===== -->
|
|
541
586
|
<div class="spacer" />
|
|
542
587
|
|
|
588
|
+
<!-- ===== 右侧功能区域 ===== -->
|
|
543
589
|
<div class="rd-header-right">
|
|
590
|
+
|
|
591
|
+
<!-- 动态插入右侧自定义组件(例如插件扩展的 header) -->
|
|
544
592
|
<component :is="navHeaderRight" />
|
|
593
|
+
|
|
594
|
+
<!-- ===== 集群/命名空间过滤器 ===== -->
|
|
545
595
|
<div
|
|
546
596
|
v-if="showFilter"
|
|
547
597
|
class="top"
|
|
548
598
|
>
|
|
599
|
+
|
|
600
|
+
<!-- 如果集群就绪 + 当前产品支持命名空间过滤器 或 Explorer 模式 -->
|
|
549
601
|
<NamespaceFilter v-if="clusterReady && currentProduct && (currentProduct.showNamespaceFilter || isExplorer)" />
|
|
602
|
+
|
|
603
|
+
<!-- 否则显示工作空间切换器 -->
|
|
550
604
|
<WorkspaceSwitcher v-else-if="clusterReady && currentProduct && currentProduct.showWorkspaceSwitcher" />
|
|
551
605
|
</div>
|
|
606
|
+
|
|
607
|
+
<!-- ===== 集群相关按钮(仅在有集群且不是 simple 模式下显示) ===== -->
|
|
552
608
|
<div
|
|
553
609
|
v-if="currentCluster && !simple"
|
|
554
610
|
class="header-buttons"
|
|
555
611
|
>
|
|
612
|
+
|
|
613
|
+
<!-- 如果当前产品支持集群切换器 -->
|
|
556
614
|
<template v-if="currentProduct && currentProduct.showClusterSwitcher">
|
|
615
|
+
|
|
616
|
+
<!-- 导入 YAML 按钮 -->
|
|
557
617
|
<button
|
|
558
618
|
v-if="showImportYaml"
|
|
559
619
|
v-clean-tooltip="t('nav.import')"
|
|
@@ -568,6 +628,8 @@ export default {
|
|
|
568
628
|
>
|
|
569
629
|
<i class="icon icon-upload icon-lg" />
|
|
570
630
|
</button>
|
|
631
|
+
|
|
632
|
+
<!-- 导入 YAML 弹窗 -->
|
|
571
633
|
<app-modal
|
|
572
634
|
v-if="showImportModal"
|
|
573
635
|
class="import-modal"
|
|
@@ -583,6 +645,7 @@ export default {
|
|
|
583
645
|
/>
|
|
584
646
|
</app-modal>
|
|
585
647
|
|
|
648
|
+
<!-- KubeShell 终端按钮 -->
|
|
586
649
|
<button
|
|
587
650
|
v-if="showKubeShell"
|
|
588
651
|
id="btn-kubectl"
|
|
@@ -600,6 +663,7 @@ export default {
|
|
|
600
663
|
<i class="icon icon-terminal icon-lg" />
|
|
601
664
|
</button>
|
|
602
665
|
|
|
666
|
+
<!-- 下载 kubeconfig 按钮 -->
|
|
603
667
|
<button
|
|
604
668
|
v-if="showKubeConfig"
|
|
605
669
|
v-clean-tooltip="t('nav.kubeconfig.download')"
|
|
@@ -615,6 +679,7 @@ export default {
|
|
|
615
679
|
<i class="icon icon-file icon-lg" />
|
|
616
680
|
</button>
|
|
617
681
|
|
|
682
|
+
<!-- 复制 kubeconfig 按钮 -->
|
|
618
683
|
<button
|
|
619
684
|
v-if="showCopyConfig"
|
|
620
685
|
v-clean-tooltip="t('nav.kubeconfig.copy')"
|
|
@@ -627,10 +692,14 @@ export default {
|
|
|
627
692
|
:aria-label="t('nav.kubeconfig.copy')"
|
|
628
693
|
@click="copyKubeConfig($event)"
|
|
629
694
|
>
|
|
695
|
+
|
|
696
|
+
<!-- 点击复制后显示对勾 -->
|
|
630
697
|
<i
|
|
631
698
|
v-if="kubeConfigCopying"
|
|
632
699
|
class="icon icon-checkmark icon-lg"
|
|
633
700
|
/>
|
|
701
|
+
|
|
702
|
+
<!-- 未复制状态显示复制图标 -->
|
|
634
703
|
<i
|
|
635
704
|
v-else
|
|
636
705
|
class="icon icon-copy icon-lg"
|
|
@@ -638,6 +707,7 @@ export default {
|
|
|
638
707
|
</button>
|
|
639
708
|
</template>
|
|
640
709
|
|
|
710
|
+
<!-- 资源搜索按钮 -->
|
|
641
711
|
<button
|
|
642
712
|
v-if="showSearch"
|
|
643
713
|
id="header-btn-search"
|
|
@@ -654,6 +724,8 @@ export default {
|
|
|
654
724
|
>
|
|
655
725
|
<i class="icon icon-search icon-lg" />
|
|
656
726
|
</button>
|
|
727
|
+
|
|
728
|
+
<!-- 搜索弹窗 -->
|
|
657
729
|
<app-modal
|
|
658
730
|
v-if="showSearch && showSearchModal"
|
|
659
731
|
class="search-modal"
|
|
@@ -668,7 +740,7 @@ export default {
|
|
|
668
740
|
</app-modal>
|
|
669
741
|
</div>
|
|
670
742
|
|
|
671
|
-
<!--
|
|
743
|
+
<!-- ===== 插件扩展按钮区 ===== -->
|
|
672
744
|
<div
|
|
673
745
|
v-if="extensionHeaderActions.length"
|
|
674
746
|
class="header-buttons"
|
|
@@ -697,12 +769,16 @@ export default {
|
|
|
697
769
|
</button>
|
|
698
770
|
</div>
|
|
699
771
|
|
|
772
|
+
<!-- ===== 用户菜单(右上角头像 + 下拉) ===== -->
|
|
700
773
|
<div class="center-self">
|
|
701
774
|
<header-page-action-menu v-if="showPageActions" />
|
|
775
|
+
|
|
702
776
|
<rc-dropdown
|
|
703
777
|
v-if="showUserMenu"
|
|
704
778
|
:aria-label="t('nav.userMenu.label')"
|
|
705
779
|
>
|
|
780
|
+
|
|
781
|
+
<!-- 头像触发按钮 -->
|
|
706
782
|
<rc-dropdown-trigger
|
|
707
783
|
ghost
|
|
708
784
|
small
|
|
@@ -721,9 +797,11 @@ export default {
|
|
|
721
797
|
v-else
|
|
722
798
|
class="icon icon-user icon-3x avatar"
|
|
723
799
|
/> -->
|
|
724
|
-
<i class="icon icon-usericon" />
|
|
800
|
+
<i class="icon icon-usericon" style="padding-bottom: 5px;" />
|
|
725
801
|
<span class="login-name">{{ principal.loginName }}</span>
|
|
726
802
|
</rc-dropdown-trigger>
|
|
803
|
+
|
|
804
|
+
<!-- 下拉菜单内容 -->
|
|
727
805
|
<template #dropdownCollection>
|
|
728
806
|
<!-- <template v-if="authEnabled">
|
|
729
807
|
<div class="user-info">
|
|
@@ -744,18 +822,24 @@ export default {
|
|
|
744
822
|
>
|
|
745
823
|
{{ t('nav.userMenu.preferences') }}
|
|
746
824
|
</rc-dropdown-item> -->
|
|
825
|
+
|
|
826
|
+
<!-- 退出登录(支持 SLO 弹窗) -->
|
|
747
827
|
<rc-dropdown-item
|
|
748
828
|
v-if="showAccountAndApiKeyLink"
|
|
749
829
|
@click="$router.push({ name: 'account'})"
|
|
750
830
|
>
|
|
751
831
|
{{ t('nav.userMenu.accountAndKeys', {}, true) }}
|
|
752
832
|
</rc-dropdown-item>
|
|
833
|
+
|
|
834
|
+
<!-- 普通退出登录 -->
|
|
753
835
|
<rc-dropdown-item
|
|
754
836
|
v-if="authEnabled && shouldShowSloLogoutModal"
|
|
755
837
|
@click="showSloModal"
|
|
756
838
|
>
|
|
757
839
|
{{ t('nav.userMenu.logOut') }}
|
|
758
840
|
</rc-dropdown-item>
|
|
841
|
+
|
|
842
|
+
<!-- 普通退出登录 -->
|
|
759
843
|
<rc-dropdown-item
|
|
760
844
|
v-else-if="authEnabled"
|
|
761
845
|
@click="$router.push(generateLogoutRoute)"
|
|
@@ -944,6 +1028,8 @@ export default {
|
|
|
944
1028
|
// Spacing between header buttons
|
|
945
1029
|
.btn:not(:last-of-type) {
|
|
946
1030
|
margin-right: 10px;
|
|
1031
|
+
width: 30px;
|
|
1032
|
+
min-width: 30px;
|
|
947
1033
|
}
|
|
948
1034
|
|
|
949
1035
|
.btn:focus {
|
|
@@ -965,6 +1051,8 @@ export default {
|
|
|
965
1051
|
|
|
966
1052
|
.header-btn {
|
|
967
1053
|
width: 40px;
|
|
1054
|
+
display: flex;
|
|
1055
|
+
align-items: center;
|
|
968
1056
|
}
|
|
969
1057
|
|
|
970
1058
|
:deep() div .btn.role-tertiary {
|
|
@@ -972,19 +1060,21 @@ export default {
|
|
|
972
1060
|
border: none;
|
|
973
1061
|
background: var(--header-btn-bg);
|
|
974
1062
|
color: var(--header-btn-text);
|
|
975
|
-
padding: 0 10px;
|
|
1063
|
+
padding: 0 15px 0 10px;
|
|
976
1064
|
line-height: 32px;
|
|
977
1065
|
min-height: 32px;
|
|
1066
|
+
width: 30px;
|
|
1067
|
+
min-width: 30px;
|
|
978
1068
|
|
|
979
1069
|
i {
|
|
980
1070
|
// Ideally same height as the parent button, but this means tooltip needs adjusting (which is it's own can of worms)
|
|
981
1071
|
line-height: 20px;
|
|
982
1072
|
}
|
|
983
1073
|
|
|
984
|
-
&:hover {
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
}
|
|
1074
|
+
// &:hover {
|
|
1075
|
+
// background: var(--primary);
|
|
1076
|
+
// color: #fff;
|
|
1077
|
+
// }
|
|
988
1078
|
|
|
989
1079
|
&[disabled=disabled] {
|
|
990
1080
|
background-color: rgba(0,0,0,0.25) !important;
|
|
@@ -1067,7 +1157,6 @@ export default {
|
|
|
1067
1157
|
> .center-self {
|
|
1068
1158
|
align-self: center;
|
|
1069
1159
|
display: flex;
|
|
1070
|
-
gap: 1rem;
|
|
1071
1160
|
align-items: center;
|
|
1072
1161
|
padding-right: 1rem;
|
|
1073
1162
|
}
|
|
@@ -1176,7 +1265,7 @@ export default {
|
|
|
1176
1265
|
.login-name{
|
|
1177
1266
|
font-size: 14px;
|
|
1178
1267
|
margin-left: 5px;
|
|
1179
|
-
margin-top: 5px;
|
|
1268
|
+
// margin-top: 5px;
|
|
1180
1269
|
line-height: 20px;
|
|
1181
1270
|
}
|
|
1182
1271
|
</style>
|