diff --git a/client/components/main/header.jade b/client/components/main/header.jade index 08afdb6c1..b75f8fcd5 100644 --- a/client/components/main/header.jade +++ b/client/components/main/header.jade @@ -38,7 +38,8 @@ template(name="header") unless currentSetting.customTopLeftCornerLogoLinkUrl img(src="{{currentSetting.customTopLeftCornerLogoImageUrl}}" height="{{#if currentSetting.customTopLeftCornerLogoHeight}}#{currentSetting.customTopLeftCornerLogoHeight}{{else}}27{{/if}}" width="auto" margin="0" padding="0" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}") unless currentSetting.customTopLeftCornerLogoImageUrl - img(src="{{pathFor '/logo-header.png'}}" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}") + div#headerIsSettingDatabaseCallDone + img(src="{{pathFor '/logo-header.png'}}" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}") span.allBoards a(href="{{pathFor 'home'}}") span.fa.fa-home diff --git a/client/components/main/header.js b/client/components/main/header.js index 848f9f2cc..7e3f0166d 100644 --- a/client/components/main/header.js +++ b/client/components/main/header.js @@ -1,7 +1,23 @@ Meteor.subscribe('user-admin'); Meteor.subscribe('boards'); Meteor.subscribe('setting'); +Template.header.onCreated(function(){ + const templateInstance = this; + templateInstance.currentSetting = new ReactiveVar(); + templateInstance.isLoading = new ReactiveVar(false); + Meteor.subscribe('setting', { + onReady() { + templateInstance.currentSetting.set(Settings.findOne()); + let currSetting = templateInstance.currentSetting.curValue; + if(currSetting && currSetting !== undefined && currSetting.customLoginLogoImageUrl !== undefined && document.getElementById("headerIsSettingDatabaseCallDone") != null) + document.getElementById("headerIsSettingDatabaseCallDone").style.display = 'none'; + else if(document.getElementById("headerIsSettingDatabaseCallDone") != null) + document.getElementById("headerIsSettingDatabaseCallDone").style.display = 'block'; + return this.stop(); + }, + }); +}); Template.header.helpers({ wrappedHeader() { return !Session.get('currentBoard'); diff --git a/client/components/main/header.styl b/client/components/main/header.styl index daf9a7ba6..eaca2d765 100644 --- a/client/components/main/header.styl +++ b/client/components/main/header.styl @@ -250,3 +250,6 @@ p margin: 7px padding: 0 + +#headerIsSettingDatabaseCallDone + display: none;