From 7339fad70c72377536c0190f223895077bb66105 Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Wed, 25 Sep 2024 15:40:43 +0100 Subject: [PATCH] feat: Review Site navigation button style - MEED-7543 - Meeds-io/meeds#273 This change will use the same style for navigation button in top bar as other displayed buttons. --- .../site-navigation/SiteNavigationDrawer.vue | 2 +- .../components/SiteCardMenu.vue | 13 ++- .../components/SiteNavigation.vue | 4 +- .../components/SiteNavigationButton.vue | 81 ++++--------------- 4 files changed, 24 insertions(+), 76 deletions(-) diff --git a/layout-webapp/src/main/webapp/vue-app/common-layout-components/components/site-navigation/SiteNavigationDrawer.vue b/layout-webapp/src/main/webapp/vue-app/common-layout-components/components/site-navigation/SiteNavigationDrawer.vue index e7f1ada36..f57a4eb8c 100644 --- a/layout-webapp/src/main/webapp/vue-app/common-layout-components/components/site-navigation/SiteNavigationDrawer.vue +++ b/layout-webapp/src/main/webapp/vue-app/common-layout-components/components/site-navigation/SiteNavigationDrawer.vue @@ -120,7 +120,7 @@ export default { methods: { open(event) { this.siteName = event?.siteName || eXo.env.portal.spaceDisplayName || eXo.env.portal.siteKeyName; - this.siteType = event?.siteType || 'PORTAL'; + this.siteType = event?.siteType || eXo.env.portal.siteKeyType; this.siteId = event?.siteId || eXo.env.portal.siteId; this.includeGlobal = event?.includeGlobal || false; this.getNavigationNodes(); diff --git a/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteCardMenu.vue b/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteCardMenu.vue index 645007f57..271f03d98 100644 --- a/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteCardMenu.vue +++ b/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteCardMenu.vue @@ -117,23 +117,20 @@ export default { displayActionMenu: false, }), computed: { - isDefaultPortalSite() { - return this.site.name.toLowerCase() === eXo.env.portal.defaultPortalName.toLowerCase(); + isMetaSite() { + return this.site.name === eXo.env.portal.defaultPortal; }, isGlobalSite() { - return this.site.name.toLowerCase() === eXo.env.portal.globalPortalName.toLowerCase(); + return this.site.name === 'global'; }, isGroupSite() { return this.site.siteType === 'GROUP'; }, - canDelete() { - return !(this.isDefaultPortalSite || this.isGlobalSite || this.isGroupSite); - }, isPortalSite() { return this.site.siteType === 'PORTAL'; }, - canEditLayout() { - return !(this.isGlobalSite || this.isGroupSite) && (this.site?.metaSite || !this.site.displayed); + canDelete() { + return !this.isMetaSite && !this.isGlobalSite && !this.isGroupSite; }, canEditSite() { return this.site.canEdit; diff --git a/layout-webapp/src/main/webapp/vue-app/site-navigation/components/SiteNavigation.vue b/layout-webapp/src/main/webapp/vue-app/site-navigation/components/SiteNavigation.vue index 59047da0f..fda14560b 100644 --- a/layout-webapp/src/main/webapp/vue-app/site-navigation/components/SiteNavigation.vue +++ b/layout-webapp/src/main/webapp/vue-app/site-navigation/components/SiteNavigation.vue @@ -18,9 +18,7 @@ -->