diff --git a/shell/components/SideNav.vue b/shell/components/SideNav.vue index 9b3856ee0f2..e772c9fbbc8 100644 --- a/shell/components/SideNav.vue +++ b/shell/components/SideNav.vue @@ -423,17 +423,24 @@ export default { - - - {{ t('nav.clusterTools') }} - + + + {{ t('nav.clusterTools') }} + +
-export default { - name: 'TabbedLinks', - - props: { - /** - * Default tab to display from the list - */ - defaultTab: { - type: String, - default: null, - required: false, - }, - /** - * The list of tabs to display - * @model - */ - tabList: { - type: Array, - required: true, - default: () => [], - } - }, - - data() { - const { tabList } = this; - - return { tabs: tabList }; - }, -}; - - - - - diff --git a/shell/components/nav/Header.vue b/shell/components/nav/Header.vue index feb5fbf3939..d4ce077299f 100644 --- a/shell/components/nav/Header.vue +++ b/shell/components/nav/Header.vue @@ -690,27 +690,48 @@ export default { - {{ t('nav.userMenu.preferences') }} +
  • + {{ t('nav.userMenu.preferences') }} +
  • - {{ t('nav.userMenu.accountAndKeys', {}, true) }} +
  • + {{ t('nav.userMenu.accountAndKeys', {}, true) }} +
  • - {{ t('nav.userMenu.logOut') }} +
  • + {{ t('nav.userMenu.logOut') }} +
  • diff --git a/shell/components/nav/Type.vue b/shell/components/nav/Type.vue index cbd1fdd6d1e..60a8a1045e5 100644 --- a/shell/components/nav/Type.vue +++ b/shell/components/nav/Type.vue @@ -28,65 +28,10 @@ export default { }, data() { - return { - near: false, - over: false, - menuPath: this.type.route ? this.$router.resolve(this.type.route)?.route?.path : undefined, - }; + return { near: false }; }, computed: { - isCurrent() { - // This is required to avoid scenarios where fragments break vue routers location matching - // For example, the following fails - // Curruent Path /c/c-m-hzqf4tqt/explorer/members#project-membership - // Menu Path /c/c-m-hzqf4tqt/explorer/members - // vue-router exact-path="true" fixes this (https://v3.router.vuejs.org/api/#exact-path), - // but fails when the the current path is a child (for instance a resource detail page) - - // Scenarios to consider - // - Fragement world - // Curruent Path /c/c-m-hzqf4tqt/explorer/members#project-membership - // Menu Path /c/c-m-hzqf4tqt/explorer/members - // - Similar current paths - // /c/c-m-hzqf4tqt/fleet/fleet.cattle.io.bundlenamespacemapping - // /c/c-m-hzqf4tqt/fleet/fleet.cattle.io.bundle - // - Other menu items that appear in current menu item - // /c/c-m-hzqf4tqt/fleet - // /c/c-m-hzqf4tqt/fleet/management.cattle.io.fleetworkspace - - // If there's no hash the n-link will determine it's linkActiveClass correctly, so avoid this faff - const invalidHash = !this.$route.hash; - // Lets be super safe - const invalidProps = !this.menuPath || !this.$route.path; - - if (invalidHash || invalidProps) { - return false; - } - - // We're kind of, but in a fixing way, copying n-link --> vue-router link see vue-router/src/components/link.js & vue-router/src/util/route.js - // We're only going to compare the path and ignore query and fragment - - if (this.type.exact) { - return this.$route.path === this.menuPath; - } - - const currentPath = this.$route.path.split('/'); - const menuPath = this.menuPath.split('/'); - - if (menuPath.length > currentPath.length) { - return false; - } - - for (let i = 0; i < menuPath.length; i++) { - if (menuPath[i] !== currentPath[i]) { - return false; - } - } - - return true; - }, - showFavorite() { return ( this.type.mode && this.near && showFavoritesFor.includes(this.type.mode) ); }, @@ -116,14 +61,6 @@ export default { this.near = val; }, - setOver(val) { - this.over = val; - }, - - removeFavorite() { - this.$store.dispatch('type-map/removeFavorite', this.type.name); - }, - selectType() { // Prevent issues if custom NavLink is used #5047 if (this.type?.route) { @@ -142,63 +79,70 @@ export default { - - {{ type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label) }} - - - - - - - + + + {{ count }} - - + v-if="showFavorite || namespaceIcon || showCount" + class="count" + > + + + {{ count }} + + +