Skip to content

Commit

Permalink
feat: Display Full Company Name in Standalone Sites independently fro…
Browse files Browse the repository at this point in the history
…m Topbar Settings - MEED-7889 - Meeds-io/MIPs#159 (#4220)

This change will ensure to display full company name and logo in
standalone sites independently from what is configured for shared layout
based sites.
  • Loading branch information
boubaker committed Dec 3, 2024
1 parent d2ffd5d commit a028b0a
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ generalSettings.defaultLanguageSettingError=Error while saving default language
generalSettings.navigationCharacteristics=Topbar & Sidebar
generalSettings.subtitle.navigationCharacteristics=Customize the navigation experience
generalSettings.topbar=Topbar
generalSettings.topbar={0}Topbar{1}
generalSettings.brandingInfos=Branding Infos
generalSettings.displayCompanyName=Company Name
generalSettings.displaySiteName=Site Name
Expand Down Expand Up @@ -260,3 +260,10 @@ generalSettings.sidebar.linkDescriptionPlaceHolder=Add a description to display
generalSettings.sidebar.linkDescriptionDrawerTitle=Add the description translations
generalSettings.sidebar.invalidLink=Invalid link
generalSettings.sidebar.exceedsMaxLength=Input exceeds max length
generalSettings.topbar.helpTooltip=What can I customize?
generalSettings.topbar.helpDescription1=Below, find options you can customize for the topbar.
generalSettings.topbar.helpDescription2=FYI, public site topbar will not get those customization.
generalSettings.topbar.helpDescription3=- Decide to display platform logo and/or name when the menu is hidden
generalSettings.topbar.helpDescription4=- Hide or not the site name or the space name. Icon or logo will be displayed no matter you decided to hide the name
generalSettings.topbar.helpDescription5=- Identify which options can be listed for users in the topbar
generalSettings.topbar.helpDescription6=- Precise which one can be accessed using a mobile device
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,35 @@
-->
<template>
<div v-if="topbarSettings">
<div class="text-header mb-4">
{{ $t('generalSettings.topbar') }}
</div>
<help-label
label="generalSettings.topbar"
label-class="text-header"
tooltip="generalSettings.topbar.helpTooltip">
<template slot="helpContent">
<p>
{{ $t('generalSettings.topbar.helpDescription1') }}
</p>
<p>
{{ $t('generalSettings.topbar.helpDescription2') }}
</p>
<div>
{{ $t('generalSettings.topbar.helpDescription3') }}
</div>
<div>
{{ $t('generalSettings.topbar.helpDescription4') }}
</div>
<div>
{{ $t('generalSettings.topbar.helpDescription5') }}
</div>
<div>
{{ $t('generalSettings.topbar.helpDescription6') }}
</div>
</template>
</help-label>
<!-- Preview -->
<portal-general-settings-navigation-settings-topbar-preview
:settings="settings"
class="elevation-3 mb-6" />
class="elevation-3 mb-6 mt-4" />
<!-- Branding Infos -->
<div class="font-weight-bold mb-2">
{{ $t('generalSettings.brandingInfos') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
:alt="companyName"
height="36"
width="auto"
class="object-fit-contain" />
class="object-fit-contain">
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title v-if="$root.expand" class="font-weight-bold menu-text-color text-truncate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ export default {
apply() {
this.$emit('input', this.emails);
if (this.invitedMembers?.length) {
console.warn('this.invitedMembers', this.invitedMembers);
this.$emit('update-members', this.invitedMembers);
}
this.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:alt="$t('space.avatar.img.alt',{0: $root.logoTitle})"
height="36"
width="auto"
class="object-fit-contain" />
class="object-fit-contain">
</v-list-item-avatar>
</a>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
:alt="$t('space.avatar.img.alt',{0: $root.spaceLogoTitle})"
height="28"
width="auto"
class="object-fit-contain" />
class="object-fit-contain">
</v-list-item-avatar>
</a>
<a
Expand Down
14 changes: 8 additions & 6 deletions webapp/src/main/webapp/vue-apps/top-bar-logo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function init(params) {
return this.displayCompanyLogo || this.displayCompanyTitle;
},
displayCompanyLogo() {
return (this.displayCompanyName && this.isStandaloneSite)
return this.isStandaloneSite
|| (
(this.mdAndUp || !this.displaySite)
&& (
Expand All @@ -84,11 +84,13 @@ export function init(params) {
);
},
displayCompanyTitle() {
return this.displayCompanyName
&& this.logoTitle
&& this.portalPath
&& (this.xl || (this.mdAndUp && !this.displaySite))
&& (this.sidebarModeDisplay === 'HIDDEN' || this.sidebarModeDisplay === 'ICON' || !this.displaySite);
return this.isStandaloneSite
|| (this.displayCompanyName
&& this.logoTitle
&& this.portalPath
&& (this.xl || (this.mdAndUp && !this.displaySite))
&& (this.sidebarModeDisplay === 'HIDDEN' || this.sidebarModeDisplay === 'ICON' || !this.displaySite)
);
},
displaySite() {
return this.displaySiteLogo || this.displaySiteTitle;
Expand Down

0 comments on commit a028b0a

Please sign in to comment.