diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade index 3c87104f4..054d51ca8 100644 --- a/client/components/main/layouts.jade +++ b/client/components/main/layouts.jade @@ -34,8 +34,9 @@ template(name="userFormsLayout") img(src="{{currentSetting.customLoginLogoImageUrl}}" width="300" height="auto") br unless currentSetting.customLoginLogoImageUrl - img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto") - br + if isSettingDatabaseFctCallDone + img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto") + br if currentSetting.textBelowCustomLoginLogo +viewer | {{currentSetting.textBelowCustomLoginLogo}} diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index cb06804e3..461747489 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -19,7 +19,7 @@ const validator = { return true; }, }; - +let isSettingDatabaseFctCallDone = false; Template.userFormsLayout.onCreated(function() { const templateInstance = this; templateInstance.currentSetting = new ReactiveVar(); @@ -28,6 +28,7 @@ Template.userFormsLayout.onCreated(function() { Meteor.subscribe('setting', { onReady() { templateInstance.currentSetting.set(Settings.findOne()); + isSettingDatabaseFctCallDone = true; return this.stop(); }, }); @@ -55,7 +56,9 @@ Template.userFormsLayout.helpers({ currentSetting() { return Template.instance().currentSetting.get(); }, - + isSettingDatabaseCallDone(){ + return isSettingDatabaseFctCallDone; + }, isLoading() { return Template.instance().isLoading.get(); },