diff --git a/javascripts/discourse/components/brand-header-contents.gjs b/javascripts/discourse/components/brand-header-contents.gjs index 86591bb..1d466b0 100644 --- a/javascripts/discourse/components/brand-header-contents.gjs +++ b/javascripts/discourse/components/brand-header-contents.gjs @@ -7,66 +7,54 @@ export default class BrandHeaderContents extends Component { @service site; get shouldShow() { - return !this.site.mobileView || settings.show_bar_on_mobile; + return this.site.desktopView || settings.show_bar_on_mobile; } - get brandLogo() { - const mobileView = this.site.mobileView; - const mobileLogoUrl = settings.mobile_logo_url || ""; - const showMobileLogo = mobileView && mobileLogoUrl.length > 0; - const logoUrl = settings.logo_url || ""; - const logoDarkUrl = settings.logo_dark_url || ""; - const title = settings.brand_name; - - return { - mobileUrl: showMobileLogo ? mobileLogoUrl : null, - lightImg: { - url: logoUrl, - }, - darkImg: { - url: logoDarkUrl, - }, - title, - }; + get mobileLogoUrl() { + return this.site.mobileView ? settings.mobile_logo_url : null; } - get hasIcons() { - return settings.icons && settings.icons.length > 0; + get lightLogo() { + return { url: settings.logo_url || "" }; } - get hasLinks() { - return settings.links && settings.links.length > 0; + get darkLogo() { + return { url: settings.logo_dark_url || "" }; }