dashboard-shell-shell 3.0.5-logtest.2 → 3.0.5-order.1

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 (37) hide show
  1. package/assets/images/arrow.svg +1 -0
  2. package/assets/images/headerIcon/auth.svg +1 -0
  3. package/assets/images/headerIcon/settings.svg +1 -0
  4. package/assets/images/home.svg +6 -0
  5. package/assets/images/pl/logo.png +0 -0
  6. package/assets/styles/global/_layout.scss +2 -2
  7. package/assets/styles/global/_tooltip.scss +3 -1
  8. package/assets/translations/en-us.yaml +1 -0
  9. package/assets/translations/zh-hans.yaml +41 -36
  10. package/components/HoverDropdown.vue +0 -0
  11. package/components/ResourceList/Masthead.vue +8 -1
  12. package/components/form/NameNsDescription.vue +15 -0
  13. package/components/nav/Header copy.vue +1157 -0
  14. package/components/nav/Header.vue +70 -59
  15. package/components/nav/TopLevelMenu.vue +0 -1
  16. package/components/nav/TopLevelMenuNew.vue +607 -0
  17. package/components/nav/configurationApps.vue +102 -0
  18. package/components/nav/menuDropdown.vue +132 -0
  19. package/components/nav/menuPrompt.vue +204 -0
  20. package/components/templates/omsLayout.vue +109 -0
  21. package/config/product/order.js +117 -0
  22. package/config/router/routes.js +39 -2
  23. package/list/IframePage.vue +3 -0
  24. package/list/provisioning.cattle.io.cluster.vue +33 -2
  25. package/package.json +1 -1
  26. package/pages/auth/login.vue +11 -2
  27. package/pages/csm/ServiceMarket-iframe.vue +32 -0
  28. package/pages/csm/order-iframe.vue +32 -0
  29. package/pages/csm/orderInfo-iframe.vue +32 -0
  30. package/pages/csm/shelfist-iframe.vue +32 -0
  31. package/pages/csm/tenant-iframe.vue +32 -0
  32. package/pages/home.vue +1 -1
  33. package/rancher-components/Accordion/Accordion.vue +3 -1
  34. package/rancher-components/RcDropdown/RcDropdown.vue +1 -1
  35. package/scripts/publish-shell.sh +1 -1
  36. package/store/index.js +4 -4
  37. package/store/type-map.js +4 -0
@@ -14,6 +14,7 @@ import { LOGGED_OUT, IS_SSO } from '@shell/config/query-params';
14
14
  import NamespaceFilter from './NamespaceFilter';
15
15
  import WorkspaceSwitcher from './WorkspaceSwitcher';
16
16
  import TopLevelMenu from './TopLevelMenu';
17
+ import TopLevelMenuNew from './TopLevelMenuNew';
17
18
 
18
19
  import { allHash } from '@shell/utils/promise';
19
20
  import { ActionLocation, ExtensionPoint } from '@shell/core/types';
@@ -29,12 +30,17 @@ import {
29
30
  RcDropdownSeparator,
30
31
  RcDropdownTrigger
31
32
  } from '@components/RcDropdown';
33
+ import configurationApps from './configurationApps'
34
+ import menuDropdown from './menuDropdown'
32
35
 
33
36
  export default {
34
37
 
35
38
  components: {
39
+ menuDropdown,
40
+ configurationApps,
36
41
  NamespaceFilter,
37
42
  WorkspaceSwitcher,
43
+ TopLevelMenuNew,
38
44
  TopLevelMenu,
39
45
  BrandImage,
40
46
  ClusterBadge,
@@ -81,6 +87,7 @@ export default {
81
87
  showImportModal: false,
82
88
  showSearchModal: false,
83
89
  userIcon: require('@shell/assets/images/logo.png'),
90
+ homeIcon: require('@shell/assets/images/home.svg'),
84
91
  };
85
92
  },
86
93
 
@@ -228,14 +235,21 @@ export default {
228
235
 
229
236
  singleProductLogoRoute() {
230
237
  const cluster = this.$store.getters.defaultClusterId;
231
-
232
- return {
233
- ...this.isSingleProduct.logoRoute,
238
+ let objs = {
234
239
  params: {
235
- cluster,
236
- ...this.isSingleProduct.logoRoute.params,
240
+ cluster
237
241
  }
238
- };
242
+ }
243
+ if (this.isSingleProduct?.logoRoute?.params) {
244
+ objs = {
245
+ ...this.isSingleProduct.logoRoute,
246
+ params: {
247
+ cluster,
248
+ ...this.isSingleProduct.logoRoute.params,
249
+ }
250
+ };
251
+ }
252
+ return objs
239
253
  },
240
254
 
241
255
  isHarvester() {
@@ -420,19 +434,33 @@ export default {
420
434
  data-testid="header"
421
435
  >
422
436
  <div>
423
-
424
437
  <!-- 顶部一级菜单(根据不同产品/集群条件决定是否显示) -->
425
- <TopLevelMenu v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" />
438
+ <!-- <TopLevelMenu v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" /> -->
426
439
  </div>
427
440
 
428
441
  <!-- ===== 左侧 logo 区域 ===== -->
429
- <div class="menu-spacer">
442
+ <div v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" class="menu-spacer">
443
+ <!-- <div class="menu_home_img">
444
+ <router-link
445
+ class="option cluster selector home"
446
+ :to="{ name: 'home' }"
447
+ role="link"
448
+ :aria-label="t('nav.ariaLabel.homePage')"
449
+ >
450
+ <img :src="homeIcon" >
451
+ </router-link>
452
+ </div> -->
453
+ <!-- 显示用户头像或 logo 图片 -->
454
+ <img
455
+ :src="userIcon"
456
+ >
457
+ </div>
458
+
459
+ <div v-else>
430
460
  <!-- 如果是单产品模式且不是 RancherInHarvester,就显示 logo 路由跳转 -->
431
461
  <router-link
432
- v-if="isSingleProduct && !isRancherInHarvester"
433
462
  :to="singleProductLogoRoute"
434
463
  >
435
-
436
464
  <!-- 显示用户头像或 logo 图片 -->
437
465
  <img
438
466
  :src="userIcon"
@@ -446,6 +474,8 @@ export default {
446
474
  <!-- ===== 右侧功能区域 ===== -->
447
475
  <div class="rd-header-right">
448
476
 
477
+ <TopLevelMenuNew v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct"/>
478
+
449
479
  <!-- 动态插入右侧自定义组件(例如插件扩展的 header) -->
450
480
  <component :is="navHeaderRight" />
451
481
 
@@ -612,57 +642,26 @@ export default {
612
642
 
613
643
  <!-- ===== 用户菜单(右上角头像 + 下拉) ===== -->
614
644
  <div class="center-self">
615
- <header-page-action-menu v-if="showPageActions" />
616
645
 
617
- <rc-dropdown
618
- v-if="showUserMenu"
619
- :aria-label="t('nav.userMenu.label')"
620
- >
621
-
622
- <!-- 头像触发按钮 -->
623
- <rc-dropdown-trigger
624
- ghost
625
- small
626
- data-testid="nav_header_showUserMenu"
627
- :aria-label="t('nav.userMenu.button.label')"
628
- >
629
- <!-- <img
630
- v-if="principal && principal.avatarSrc"
631
- :src="principal.avatarSrc"
632
- :class="{'avatar-round': principal.roundAvatar}"
633
- width="36"
634
- height="36"
635
- :alt="t('nav.alt.userAvatar')"
636
- >
637
- <i
638
- v-else
639
- class="icon icon-user icon-3x avatar"
640
- /> -->
641
- <i class="icon icon-usericon" style="padding-bottom: 5px;" />
642
- <span class="login-name">{{ principal.loginName }}</span>
643
- </rc-dropdown-trigger>
646
+ <configurationApps style="margin-left: 10px;"/>
644
647
 
648
+ <!-- <header-page-action-menu v-if="showPageActions" /> -->
649
+
650
+ <menuDropdown :position="'bottom-right'">
651
+ <template #title>
652
+ <!-- 头像触发按钮 -->
653
+ <rc-dropdown-trigger
654
+ ghost
655
+ small
656
+ data-testid="nav_header_showUserMenu"
657
+ :aria-label="t('nav.userMenu.button.label')"
658
+ >
659
+ <i class="icon icon-usericon" style="padding-bottom: 5px;" />
660
+ <span class="login-name">{{ principal.loginName }}</span>
661
+ </rc-dropdown-trigger>
662
+ </template>
645
663
  <!-- 下拉菜单内容 -->
646
664
  <template #dropdownCollection>
647
- <!-- <template v-if="authEnabled">
648
- <div class="user-info">
649
- <div class="user-name">
650
- <i class="icon icon-lg icon-user" /> {{ principal.loginName }}
651
- </div>
652
- <div class="text-small">
653
- <template v-if="principal.loginName !== principal.name">
654
- {{ principal.name }}
655
- </template>
656
- </div>
657
- </div>
658
- <rc-dropdown-separator />
659
- </template> -->
660
- <!-- <rc-dropdown-item
661
- v-if="showPreferencesLink"
662
- @click="$router.push({ name: 'prefs'})"
663
- >
664
- {{ t('nav.userMenu.preferences') }}
665
- </rc-dropdown-item> -->
666
665
 
667
666
  <!-- 退出登录(支持 SLO 弹窗) -->
668
667
  <rc-dropdown-item
@@ -688,7 +687,7 @@ export default {
688
687
  {{ t('nav.userMenu.logOut') }}
689
688
  </rc-dropdown-item>
690
689
  </template>
691
- </rc-dropdown>
690
+ </menuDropdown>
692
691
  </div>
693
692
  </div>
694
693
  </header>
@@ -698,6 +697,17 @@ export default {
698
697
  // It would be nice to grab this from `Group.vue`, but there's margin, padding and border, which is overkill to var
699
698
  $side-menu-group-padding-left: 16px;
700
699
 
700
+ .menu_home_img {
701
+ width: 51px;
702
+ display: flex;
703
+ align-items: center;
704
+ padding: 0 15px;
705
+ border-right: 1px solid rgb(215, 215, 215);
706
+ box-sizing: border-box;
707
+ height: 100%;
708
+ cursor: pointer;
709
+ }
710
+
701
711
  HEADER {
702
712
  display: flex;
703
713
  z-index: z-index('mainHeader');
@@ -708,6 +718,7 @@ export default {
708
718
  }
709
719
 
710
720
  > .menu-spacer {
721
+ display: flex;
711
722
  flex: 0 0 15px;
712
723
 
713
724
  &.isSingleProduct {
@@ -749,7 +749,6 @@ export default {
749
749
  :data-testid="`top-level-menu-cluster-${index}`"
750
750
  @click="hide()"
751
751
  >
752
-
753
752
  <!-- 可用集群 -->
754
753
  <span
755
754
  v-if="c.ready"