dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.9

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.
Files changed (218) hide show
  1. package/assets/brand/harvester/favicon.png +0 -0
  2. package/assets/brand/suse/favicon.png +0 -0
  3. package/assets/icons/demo.css +539 -0
  4. package/assets/icons/demo.css:Zone.Identifier +0 -0
  5. package/assets/icons/demo_index.html +1131 -0
  6. package/assets/icons/demo_index.html:Zone.Identifier +0 -0
  7. package/assets/icons/iconfont.css +216 -0
  8. package/assets/icons/iconfont.css:Zone.Identifier +0 -0
  9. package/assets/icons/iconfont.js +1 -0
  10. package/assets/icons/iconfont.js:Zone.Identifier +0 -0
  11. package/assets/icons/iconfont.json +324 -0
  12. package/assets/icons/iconfont.json:Zone.Identifier +0 -0
  13. package/assets/icons/iconfont.ttf +0 -0
  14. package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
  15. package/assets/icons/iconfont.woff +0 -0
  16. package/assets/icons/iconfont.woff2 +0 -0
  17. package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
  18. package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
  19. package/assets/images/API.svg +3 -0
  20. package/assets/images/action.svg +6 -0
  21. package/assets/images/login/password.svg +20 -0
  22. package/assets/images/login/user.svg +6 -0
  23. package/assets/images/login-bg.png +0 -0
  24. package/assets/images/login-left.png +0 -0
  25. package/assets/images/login-logo.svg +19 -0
  26. package/assets/images/logo.png +0 -0
  27. package/assets/images/pl/half-logo.svg +2 -23
  28. package/assets/images/pl/harvester.png +0 -0
  29. package/assets/images/pl/logo.png +0 -0
  30. package/assets/images/promp-yellow.svg +5 -0
  31. package/assets/images/user.png +0 -0
  32. package/assets/styles/all.scss +63 -0
  33. package/assets/styles/app.scss +4 -0
  34. package/assets/styles/base/_basic.scss +2 -2
  35. package/assets/styles/base/_mixins.scss +1 -1
  36. package/assets/styles/base/_typography.scss +2 -1
  37. package/assets/styles/base/_variables.scss +14 -7
  38. package/assets/styles/global/_button.scss +43 -25
  39. package/assets/styles/global/_columns.scss +3 -1
  40. package/assets/styles/global/_form.scss +45 -13
  41. package/assets/styles/global/_labeled-input.scss +54 -26
  42. package/assets/styles/global/_layout.scss +8 -3
  43. package/assets/styles/global/_select.scss +25 -17
  44. package/assets/styles/global/_table.scss +7 -1
  45. package/assets/styles/global/_tooltip.scss +56 -8
  46. package/assets/styles/themes/_dark.scss +3 -0
  47. package/assets/styles/themes/_light.scss +66 -43
  48. package/assets/styles/vendor/vue-select.scss +22 -9
  49. package/assets/translations/en-us.yaml +28 -4
  50. package/assets/translations/zh-hans.yaml +452 -189
  51. package/components/ActionDropdown.vue +2 -1
  52. package/components/ActionMenu.vue +2 -2
  53. package/components/ActionMenuShell.vue +2 -0
  54. package/components/AppModal.vue +46 -5
  55. package/components/BrandImage.vue +1 -0
  56. package/components/ButtonDropdown.vue +26 -4
  57. package/components/ButtonMultiAction.vue +1 -0
  58. package/components/ClusterIconMenu.vue +1 -1
  59. package/components/CodeMirror.vue +20 -6
  60. package/components/ConsumptionGauge.vue +24 -5
  61. package/components/CopyToClipboard.vue +15 -0
  62. package/components/CruResource.vue +9 -8
  63. package/components/CruResourceFooter.vue +2 -2
  64. package/components/DashboardOptions.vue +29 -17
  65. package/components/DotState.vue +84 -0
  66. package/components/Drawer/Chrome.vue +2 -2
  67. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
  68. package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
  69. package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
  70. package/components/ExplorerMembers.vue +18 -3
  71. package/components/ExplorerProjectsNamespaces.vue +19 -5
  72. package/components/GlobalRoleBindings.vue +112 -48
  73. package/components/GrafanaDashboard.vue +4 -4
  74. package/components/GrowlManager.vue +3 -1
  75. package/components/HardwareResourceGauge.vue +39 -3
  76. package/components/IndentedPanel.vue +4 -10
  77. package/components/InfoBox.vue +3 -3
  78. package/components/InputOrDisplay.vue +28 -2
  79. package/components/LabelValue.vue +20 -1
  80. package/components/ModalWithCard.vue +12 -3
  81. package/components/PodSecurityAdmission.vue +1 -1
  82. package/components/PromptModal.vue +1 -1
  83. package/components/PromptRemove.vue +30 -11
  84. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
  85. package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
  86. package/components/Resource/Detail/Metadata/index.vue +3 -1
  87. package/components/Resource/Detail/TitleBar/Title.vue +4 -3
  88. package/components/Resource/Detail/TitleBar/Top.vue +2 -0
  89. package/components/Resource/Detail/TitleBar/index.vue +109 -24
  90. package/components/ResourceDetail/Masthead/legacy.vue +181 -38
  91. package/components/ResourceDetail/legacy.vue +32 -14
  92. package/components/ResourceList/Masthead.vue +226 -54
  93. package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
  94. package/components/ResourceTable.vue +24 -2
  95. package/components/SideNav.vue +74 -20
  96. package/components/SortableTable/THead.vue +33 -3
  97. package/components/SortableTable/index.vue +1016 -463
  98. package/components/SortableTable/paging.js +26 -16
  99. package/components/SortableTable/selection.js +2 -2
  100. package/components/Tabbed/Tab.vue +3 -3
  101. package/components/Tabbed/index.vue +47 -29
  102. package/components/YamlEditor.vue +0 -1
  103. package/components/auth/Principal.vue +37 -13
  104. package/components/auth/RoleDetailEdit.vue +58 -7
  105. package/components/auth/SelectPrincipal.vue +1 -0
  106. package/components/breadcrumb/index.vue +316 -0
  107. package/components/form/ArrayList.vue +41 -33
  108. package/components/form/ArrayListGrouped.vue +10 -2
  109. package/components/form/ArrayListSelect.vue +1 -1
  110. package/components/form/BannerSettings.vue +64 -59
  111. package/components/form/ChangePassword.vue +4 -4
  112. package/components/form/ColorInput.vue +32 -8
  113. package/components/form/Footer.vue +11 -8
  114. package/components/form/InputWithSelect.vue +8 -5
  115. package/components/form/KeyValue.vue +47 -7
  116. package/components/form/LabeledSelect.vue +214 -242
  117. package/components/form/Labels.vue +3 -3
  118. package/components/form/MatchExpressions.vue +24 -7
  119. package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
  120. package/components/form/Members/MembershipEditor.vue +1 -1
  121. package/components/form/NameNsDescription.vue +59 -20
  122. package/components/form/Password.vue +16 -7
  123. package/components/form/PodAffinity.vue +4 -5
  124. package/components/form/ResourceQuota/Namespace.vue +4 -4
  125. package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
  126. package/components/form/ResourceQuota/Project.vue +4 -4
  127. package/components/form/ResourceQuota/ProjectRow.vue +3 -6
  128. package/components/form/Select.vue +5 -2
  129. package/components/form/SimpleSecretSelector.vue +29 -9
  130. package/components/form/Taints.vue +2 -1
  131. package/components/form/UnitInput.vue +8 -3
  132. package/components/form/WorkloadPorts.vue +143 -123
  133. package/components/formatter/BadgeStateFormatter.vue +8 -5
  134. package/components/formatter/LiveDate.vue +3 -3
  135. package/components/nav/Favorite.vue +5 -1
  136. package/components/nav/Group.vue +132 -99
  137. package/components/nav/Header.vue +124 -27
  138. package/components/nav/HeaderPageActionMenu.vue +1 -0
  139. package/components/nav/NamespaceFilter.vue +20 -17
  140. package/components/nav/TopLevelMenu.vue +182 -119
  141. package/components/nav/Type.vue +63 -41
  142. package/composables/useClickOutside.ts +1 -1
  143. package/config/private-label.js +15 -11
  144. package/config/product/auth.js +17 -7
  145. package/config/product/settings.js +19 -9
  146. package/config/settings.ts +28 -0
  147. package/config/table-headers.js +3 -2
  148. package/dialog/ForceMachineRemoveDialog.vue +2 -2
  149. package/dialog/ScalePoolDownDialog.vue +2 -2
  150. package/edit/management.cattle.io.user.vue +17 -4
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
  152. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
  153. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
  154. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
  155. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  156. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
  157. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
  158. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
  159. package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
  160. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
  161. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
  162. package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
  163. package/edit/namespace.vue +1 -2
  164. package/edit/token.vue +31 -12
  165. package/edit/workload/index.vue +4 -4
  166. package/list/management.cattle.io.setting.vue +22 -13
  167. package/list/management.cattle.io.user.vue +7 -3
  168. package/list/namespace.vue +3 -0
  169. package/list/provisioning.cattle.io.cluster.vue +6 -7
  170. package/mixins/brand.js +17 -0
  171. package/package.json +1 -1
  172. package/pages/account/pri.vue +229 -0
  173. package/pages/auth/login.vue +220 -52
  174. package/pages/auth/setup.vue +142 -19
  175. package/pages/c/_cluster/_product/namespaces.vue +5 -5
  176. package/pages/c/_cluster/auth/roles/index.vue +56 -5
  177. package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
  178. package/pages/c/_cluster/settings/banners.vue +174 -102
  179. package/pages/c/_cluster/settings/brand.vue +350 -302
  180. package/pages/c/_cluster/settings/performance.vue +61 -38
  181. package/pages/home.vue +70 -30
  182. package/pages/prefs.vue +27 -25
  183. package/pkg/tsconfig.json +9 -9
  184. package/pkg/vue.config.js +1 -1
  185. package/plugins/dashboard-store/resource-class.js +28 -27
  186. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  187. package/public/index.html +4 -4
  188. package/rancher-components/BadgeState/BadgeState.vue +38 -55
  189. package/rancher-components/Banner/Banner.vue +12 -8
  190. package/rancher-components/Card/Card.vue +7 -8
  191. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
  192. package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
  193. package/rancher-components/Form/Radio/RadioButton.vue +35 -11
  194. package/rancher-components/Form/Radio/RadioGroup.vue +13 -5
  195. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
  196. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
  197. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -4
  198. package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
  199. package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
  200. package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
  201. package/rancher-components/RcDropdown/types.ts +1 -0
  202. package/rancher-components/StringList/StringList.vue +1 -1
  203. package/scripts/publish-shell.sh +1 -1
  204. package/static/favicon.ico +0 -0
  205. package/static/favicon.png +0 -0
  206. package/static/loading-indicator.html +3 -3
  207. package/store/i18n.js +5 -2
  208. package/store/modal.ts +3 -3
  209. package/store/prefs.js +11 -4
  210. package/store/type-map.js +32 -2
  211. package/types/shell/index.d.ts +78 -97
  212. package/utils/error.js +89 -8
  213. package/utils/errorTranslate.json +1351 -0
  214. package/utils/router.js +21 -0
  215. package/utils/select.js +26 -3
  216. package/utils/string.js +8 -5
  217. package/utils/title.ts +1 -1
  218. package/vue.config.js +1 -1
@@ -52,7 +52,10 @@ export default {
52
52
  helper.update(args);
53
53
  }
54
54
 
55
+ const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
56
+
55
57
  return {
58
+ topLevelPermissions,
56
59
  shown: false,
57
60
  displayVersion,
58
61
  fullVersion,
@@ -471,12 +474,14 @@ export default {
471
474
 
472
475
  <template>
473
476
  <div>
474
- <!-- Overlay -->
477
+ <!-- ====================== 遮罩层(点击可关闭菜单) ====================== -->
475
478
  <div
476
479
  v-if="shown"
477
480
  class="side-menu-glass"
478
481
  @click="hide()"
479
482
  />
483
+
484
+ <!-- ====================== 菜单主容器(带淡入淡出过渡) ====================== -->
480
485
  <transition name="fade">
481
486
  <!-- Side menu -->
482
487
  <div
@@ -487,8 +492,11 @@ export default {
487
492
  role="navigation"
488
493
  :aria-label="t('nav.ariaLabel.topLevelMenu')"
489
494
  >
490
- <!-- Logo and name -->
495
+
496
+ <!-- ====================== 菜单头部(Logo + 菜单按钮) ====================== -->
491
497
  <div class="title">
498
+
499
+ <!-- 菜单按钮(汉堡图标) -->
492
500
  <div
493
501
  data-testid="top-level-menu"
494
502
  :aria-label="t('nav.expandCollapseAppBar')"
@@ -499,6 +507,8 @@ export default {
499
507
  @keyup.space="toggle()"
500
508
  @click="toggle()"
501
509
  >
510
+
511
+ <!-- 汉堡菜单SVG图标 -->
502
512
  <svg
503
513
  class="menu-icon"
504
514
  xmlns="http://www.w3.org/2000/svg"
@@ -511,19 +521,22 @@ export default {
511
521
  fill="none"
512
522
  /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" /></svg>
513
523
  </div>
514
- <div class="side-menu-logo">
524
+
525
+ <!-- 品牌Logo -->
526
+ <div v-if="topLevelPermissions && topLevelPermissions === 'superadmin'" class="side-menu-logo">
515
527
  <BrandImage
516
528
  data-testid="side-menu__brand-img"
517
529
  :alt="t('nav.alt.mainMenuRancherLogo')"
518
- file-name="rancher-logo.svg"
530
+ file-name="logo.png"
519
531
  />
520
532
  </div>
521
533
  </div>
522
534
 
523
- <!-- Menu body -->
535
+ <!-- ====================== 菜单内容区 ====================== -->
524
536
  <div class="body">
525
- <div>
526
- <!-- Home button -->
537
+ <div v-if="topLevelPermissions && topLevelPermissions === 'superadmin'">
538
+
539
+ <!-- 首页按钮 -->
527
540
  <div @click="hide()">
528
541
  <router-link
529
542
  class="option cluster selector home"
@@ -531,6 +544,8 @@ export default {
531
544
  role="link"
532
545
  :aria-label="t('nav.ariaLabel.homePage')"
533
546
  >
547
+
548
+ <!-- 首页图标 -->
534
549
  <svg
535
550
  v-clean-tooltip="getTooltipConfig(t('nav.home'))"
536
551
  class="top-menu-icon"
@@ -547,12 +562,14 @@ export default {
547
562
  </div>
548
563
  </router-link>
549
564
  </div>
550
- <!-- Search bar -->
565
+
566
+ <!-- 集群搜索框 -->
551
567
  <div
552
568
  v-if="showClusterSearch"
553
569
  class="clusters-search"
554
570
  >
555
571
  <div class="clusters-search-count">
572
+ <!-- 当前搜索到的集群数量 -->
556
573
  <span>{{ clusterFilterCount }}</span>
557
574
  {{ t('nav.search.clusters') }}
558
575
  <i
@@ -571,10 +588,14 @@ export default {
571
588
  :tabindex="!shown ? -1 : 0"
572
589
  :aria-label="t('nav.search.ariaLabel')"
573
590
  >
591
+
592
+ <!-- 搜索图标 -->
574
593
  <i
575
594
  class="magnifier icon icon-search"
576
595
  :class="{ active: clusterFilter }"
577
596
  />
597
+
598
+ <!-- 清空按钮 -->
578
599
  <i
579
600
  v-if="clusterFilter"
580
601
  class="icon icon-close"
@@ -584,9 +605,11 @@ export default {
584
605
  </div>
585
606
  </div>
586
607
 
587
- <!-- Harvester extras -->
608
+ <!-- ====================== Harvester 相关功能区 ====================== -->
588
609
  <template v-if="hciApps.length">
589
610
  <div class="category" />
611
+
612
+ <!-- 跳转 Harvester Dashboard -->
590
613
  <div>
591
614
  <a
592
615
  v-if="isRancherInHarvester"
@@ -602,6 +625,8 @@ export default {
602
625
  </div>
603
626
  </a>
604
627
  </div>
628
+
629
+ <!-- Harvester 应用列表 -->
605
630
  <div
606
631
  v-for="(a, i) in appBar.hciApps"
607
632
  :key="i"
@@ -624,14 +649,14 @@ export default {
624
649
  </div>
625
650
  </template>
626
651
 
627
- <!-- Cluster menu -->
628
- <template v-if="!!allClustersCount">
652
+ <!-- ====================== 集群列表 ====================== -->
653
+ <template v-if="topLevelPermissions && topLevelPermissions === 'superadmin' && !!allClustersCount">
629
654
  <div
630
655
  ref="clusterList"
631
656
  class="clusters"
632
657
  :style="pinnedClustersHeight"
633
658
  >
634
- <!-- Pinned Clusters -->
659
+ <!-- 已固定集群 -->
635
660
  <div
636
661
  v-if="showPinClusters && pinFiltered.length"
637
662
  class="clustersPinned"
@@ -642,11 +667,13 @@ export default {
642
667
  :data-testid="`pinned-ready-cluster-${index}`"
643
668
  @click="hide()"
644
669
  >
645
- <button
670
+
671
+ <!-- 可用集群按钮 -->
672
+ <span
646
673
  v-if="c.ready"
647
674
  v-shortkey.push="{windows: ['alt'], mac: ['option']}"
648
675
  :data-testid="`pinned-menu-cluster-${ c.id }`"
649
- class="cluster selector option"
676
+ class="clusterBtn cluster selector option"
650
677
  :class="{'active-menu-link': c.isMenuActive }"
651
678
  :to="c.clusterRoute"
652
679
  role="button"
@@ -676,7 +703,9 @@ export default {
676
703
  :cluster="c"
677
704
  :tab-order="shown ? 0 : -1"
678
705
  />
679
- </button>
706
+ </span>
707
+
708
+ <!-- 不可用集群 -->
680
709
  <span
681
710
  v-else
682
711
  class="option cluster selector disabled"
@@ -705,6 +734,8 @@ export default {
705
734
  />
706
735
  </span>
707
736
  </div>
737
+
738
+ <!-- 分割线 -->
708
739
  <div
709
740
  v-if="clustersFiltered.length > 0"
710
741
  class="category-title"
@@ -713,7 +744,7 @@ export default {
713
744
  </div>
714
745
  </div>
715
746
 
716
- <!-- Clusters Search result -->
747
+ <!-- 搜索结果集群列表 -->
717
748
  <div class="clustersList">
718
749
  <div
719
750
  v-for="(c, index) in appBar.clustersFiltered"
@@ -721,11 +752,13 @@ export default {
721
752
  :data-testid="`top-level-menu-cluster-${index}`"
722
753
  @click="hide()"
723
754
  >
724
- <button
755
+
756
+ <!-- 可用集群 -->
757
+ <span
725
758
  v-if="c.ready"
726
759
  v-shortkey.push="{windows: ['alt'], mac: ['option']}"
727
760
  :data-testid="`menu-cluster-${ c.id }`"
728
- class="cluster selector option"
761
+ class="cluster selector option clusterBtn"
729
762
  :class="{'active-menu-link': c.isMenuActive }"
730
763
  :to="c.clusterRoute"
731
764
  role="button"
@@ -756,7 +789,9 @@ export default {
756
789
  :tab-order="shown ? 0 : -1"
757
790
  :cluster="c"
758
791
  />
759
- </button>
792
+ </span>
793
+
794
+ <!-- 不可用集群 -->
760
795
  <span
761
796
  v-else
762
797
  class="option cluster selector disabled"
@@ -788,7 +823,7 @@ export default {
788
823
  </div>
789
824
  </div>
790
825
 
791
- <!-- No clusters message -->
826
+ <!-- 无匹配集群提示 -->
792
827
  <div
793
828
  v-if="clustersFiltered.length === 0 && searchActive"
794
829
  data-testid="top-level-menu-no-results"
@@ -798,7 +833,7 @@ export default {
798
833
  </div>
799
834
  </div>
800
835
 
801
- <!-- See all clusters -->
836
+ <!-- 查看所有集群按钮 -->
802
837
  <router-link
803
838
  v-if="allClustersCount > maxClustersToShow"
804
839
  class="clusters-all"
@@ -817,104 +852,129 @@ export default {
817
852
  </router-link>
818
853
  </template>
819
854
 
820
- <!-- MULTI CLUSTER APPS -->
821
- <div class="category">
855
+ <!-- ====================== 多集群应用区 ====================== -->
856
+ <div :style="!(topLevelPermissions && topLevelPermissions === 'superadmin') ? { placeContent: 'flex-start', display: 'flex', flexDirection: 'column' } : {}" class="category">
857
+ <!-- 多集群应用 -->
822
858
  <template v-if="multiClusterApps.length">
823
- <div
824
- class="category-title"
825
- >
826
- <hr role="none">
827
- <span>
828
- {{ t('nav.categories.multiCluster') }}
829
- </span>
830
- </div>
831
- <div
832
- v-for="(a, i) in appBar.multiClusterApps"
833
- :key="i"
834
- @click="hide()"
835
- >
836
- <router-link
837
- class="option"
838
- :class="{'active-menu-link': a.isMenuActive }"
839
- :to="a.to"
840
- role="link"
841
- :aria-label="`${t('nav.ariaLabel.multiClusterApps')} ${ a.label }`"
842
- >
843
- <IconOrSvg
844
- v-clean-tooltip="getTooltipConfig(a.label)"
845
- class="app-icon"
846
- :icon="a.icon"
847
- :src="a.svg"
848
- />
849
- <span class="option-link">{{ a.label }}</span>
850
- </router-link>
851
- </div>
852
- </template>
853
-
854
- <!-- Configuration apps menu -->
855
- <template v-if="configurationApps.length">
856
- <div
857
- class="category-title"
858
- >
859
- <hr role="none">
860
- <span>
861
- {{ t('nav.categories.configuration') }}
862
- </span>
863
- </div>
864
- <div
865
- v-for="(a, i) in appBar.configurationApps"
866
- :key="i"
867
- @click="hide()"
868
- >
869
- <router-link
870
- class="option"
871
- :class="{'active-menu-link': a.isMenuActive }"
872
- :to="a.to"
873
- role="link"
874
- :aria-label="`${t('nav.ariaLabel.configurationApps')} ${ a.label }`"
859
+ <template v-if="topLevelPermissions && topLevelPermissions === 'superadmin'">
860
+ <div
861
+ class="category-title"
875
862
  >
876
- <IconOrSvg
877
- v-clean-tooltip="getTooltipConfig(a.label)"
878
- class="app-icon"
879
- :icon="a.icon"
880
- :src="a.svg"
881
- />
882
- <div>{{ a.label }}</div>
883
- </router-link>
884
- </div>
863
+ <hr role="none">
864
+ <span>
865
+ {{ t('nav.categories.multiCluster') }}
866
+ </span>
867
+ </div>
868
+ <template v-for="(a, i) in appBar.multiClusterApps" :key="i">
869
+ <div
870
+ v-if="a.value === 'harvesterManager'"
871
+ @click="hide()"
872
+ >
873
+ <router-link
874
+ class="option"
875
+ :class="{'active-menu-link': a.isMenuActive }"
876
+ :to="a.to"
877
+ role="link"
878
+ :aria-label="`${t('nav.ariaLabel.multiClusterApps')} ${ a.label }`"
879
+ >
880
+ <IconOrSvg
881
+ v-clean-tooltip="getTooltipConfig(a.label)"
882
+ class="app-icon"
883
+ :icon="a.icon"
884
+ :src="a.svg"
885
+ />
886
+ <span class="option-link">{{ a.label }}</span>
887
+ </router-link>
888
+ </div>
889
+ </template>
890
+ </template>
891
+ <template v-else>
892
+ <template v-for="(a, i) in appBar.multiClusterApps" :key="i">
893
+ <div
894
+ v-if="a.value === 'harvesterManager'"
895
+ @click="hide()"
896
+ >
897
+ <router-link
898
+ class="option"
899
+ :class="{'active-menu-link': a.isMenuActive }"
900
+ :to="a.to"
901
+ role="link"
902
+ :aria-label="`${t('nav.ariaLabel.multiClusterApps')} ${ a.label }`"
903
+ >
904
+ <IconOrSvg
905
+ v-clean-tooltip="getTooltipConfig(a.label)"
906
+ class="app-icon"
907
+ :icon="a.icon"
908
+ :src="a.svg"
909
+ />
910
+ <span class="option-link">{{ a.label }}</span>
911
+ </router-link>
912
+ </div>
913
+ </template>
914
+ </template>
885
915
  </template>
886
- </div>
887
- </div>
888
916
 
889
- <!-- Footer -->
890
- <div
891
- class="footer"
892
- >
893
- <div
894
- v-if="canEditSettings"
895
- class="support"
896
- @click="hide()"
897
- >
898
- <router-link
899
- :to="{name: 'support'}"
900
- role="link"
901
- :aria-label="t('nav.ariaLabel.support')"
902
- >
903
- {{ t('nav.support', {hasSupport}) }}
904
- </router-link>
905
- </div>
906
- <div
907
- class="version"
908
- :class="{'version-small': largeAboutText}"
909
- @click="hide()"
910
- >
911
- <router-link
912
- :to="{ name: 'about' }"
913
- role="link"
914
- :aria-label="t('nav.ariaLabel.about')"
915
- >
916
- {{ aboutText }}
917
- </router-link>
917
+ <!-- 配置类应用 -->
918
+ <div>
919
+ <template v-if="configurationApps.length">
920
+ <template v-if="topLevelPermissions && topLevelPermissions === 'superadmin'">
921
+ <div
922
+ class="category-title"
923
+ >
924
+ <hr role="none">
925
+ <span>
926
+ {{ t('nav.categories.configuration') }}
927
+ </span>
928
+ </div>
929
+ <div
930
+ v-for="(a, i) in appBar.configurationApps"
931
+ :key="i"
932
+ @click="hide()"
933
+ >
934
+ <router-link
935
+ class="option"
936
+ :class="{'active-menu-link': a.isMenuActive }"
937
+ :to="a.to"
938
+ role="link"
939
+ :aria-label="`${t('nav.ariaLabel.configurationApps')} ${ a.label }`"
940
+ >
941
+ <IconOrSvg
942
+ v-clean-tooltip="getTooltipConfig(a.label)"
943
+ class="app-icon"
944
+ :icon="a.icon"
945
+ :src="a.svg"
946
+ />
947
+ <div>{{ a.label }}</div>
948
+ </router-link>
949
+ </div>
950
+ </template>
951
+ <template v-else>
952
+ <template v-for="(a, i) in appBar.configurationApps" :key="i">
953
+ <div
954
+ v-if="a.value === 'settings' || a.value === 'auth'"
955
+ @click="hide()"
956
+ >
957
+ <router-link
958
+ class="option"
959
+ :class="{'active-menu-link': a.isMenuActive }"
960
+ :to="a.to"
961
+ role="link"
962
+ :aria-label="`${t('nav.ariaLabel.configurationApps')} ${ a.label }`"
963
+ >
964
+ <IconOrSvg
965
+ v-clean-tooltip="getTooltipConfig(a.label)"
966
+ class="app-icon"
967
+ :icon="a.icon"
968
+ :src="a.svg"
969
+ />
970
+ <div>{{ a.label }}</div>
971
+ </router-link>
972
+ </div>
973
+ </template>
974
+ </template>
975
+ <div style="height: 40px;"></div>
976
+ </template>
977
+ </div>
918
978
  </div>
919
979
  </div>
920
980
  </div>
@@ -973,6 +1033,10 @@ export default {
973
1033
  $option-padding-left: 14px;
974
1034
  $option-height: $icon-size + $option-padding + $option-padding;
975
1035
 
1036
+ .clusterBtn {
1037
+ background-color: var(--nav-icon-badge-bg);
1038
+ }
1039
+
976
1040
  .side-menu {
977
1041
  .menu {
978
1042
  position: absolute;
@@ -1069,7 +1133,6 @@ export default {
1069
1133
  flex: 1;
1070
1134
  display: flex;
1071
1135
  flex-direction: column;
1072
- margin: 10px 0;
1073
1136
  width: 300px;
1074
1137
  overflow: auto;
1075
1138
 
@@ -1077,7 +1140,7 @@ export default {
1077
1140
  align-items: center;
1078
1141
  cursor: pointer;
1079
1142
  display: flex;
1080
- color: var(--link);
1143
+ color: var(--primary);
1081
1144
  font-size: 14px;
1082
1145
  height: $option-height;
1083
1146
  white-space: nowrap;
@@ -1087,7 +1150,7 @@ export default {
1087
1150
  border: none;
1088
1151
 
1089
1152
  .cluster-badge-logo-text {
1090
- color: var(--default-active-text);
1153
+ color: var(--primary);
1091
1154
  font-weight: 500;
1092
1155
  }
1093
1156
 
@@ -1159,7 +1222,7 @@ export default {
1159
1222
  .rancher-provider-icon,
1160
1223
  svg {
1161
1224
  margin-right: 16px;
1162
- fill: var(--link);
1225
+ fill: var(--primary);
1163
1226
  }
1164
1227
 
1165
1228
  .top-menu-icon {