Skip to content

Commit

Permalink
fix: Fix Site Click on Mobile from Sidebar - MEED-7964 - Meeds-io/mee…
Browse files Browse the repository at this point in the history
…ds#2681 (#4275)

Prior to this change, when clicking on site in Mobile, it doesn't
display the second level like for space Templates and Spaces Directory
item. In addition, when clicking on Header, the site is displayed in a
new Tab. This change will consider Sites items as Spaces and Space
templates in click behavior on Mobile. In addition, the target Window is
fixed switch user Home URL.
  • Loading branch information
boubaker authored Dec 16, 2024
1 parent 0ba6b51 commit bc0ea0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,15 @@ export default {
urls: true,
email: true,
phone: true,
}) || this.$root.defaultUserPath;
});
},
defaultUserPath() {
return this.defaultUserExternalPath || this.$root.defaultUserPath;
},
defaultUserPathTarget() {
return this.defaultUserExternalPath && '_blank' || '_self';
return this.defaultUserPath?.startsWith?.(window.location.origin)
|| this.defaultUserPath?.startsWith?.('/')
|| this.defaultUserPath?.startsWith?.('./') ? '_self' : '_blank';
},
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default {
return this.drawerOpened && this.arrowIconLeft || this.arrowIconRight;
},
isUrl() {
return this.item.url && (this.$root.displaySequentially || (!this.isSpaces && !this.isSpaceTemplate && !this.isSpace));
return this.item.url && (this.$root.displaySequentially || (!this.isSpaces && !this.isSpaceTemplate && !this.isSpace && !this.isSite));
},
url() {
return this.isUrl && this.item.url && this.$utils.toLinkUrl(this.item.url, {
Expand Down

0 comments on commit bc0ea0e

Please sign in to comment.