Merge pull request #3831 from Emile840/master

Fix bug #3830 '[Login page] The default wekan logo appears briefly before d…
This commit is contained in:
Lauri Ojansivu 2021-06-01 16:16:04 +03:00 committed by GitHub
commit 753d247cf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -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}}

View file

@ -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();
},