فهرست منبع

Remove unneccary and dead code to handle case where custom logo is not set

Johannes Zellner 1 سال پیش
والد
کامیت
a5f918c670
3فایلهای تغییر یافته به همراه3 افزوده شده و 18 حذف شده
  1. 0 3
      client/components/main/layouts.css
  2. 3 4
      client/components/main/layouts.jade
  3. 0 11
      client/components/main/layouts.js

+ 0 - 3
client/components/main/layouts.css

@@ -559,9 +559,6 @@ a:not(.disabled).is-active i.fa {
   top: 45px;
   left: 10px;
 }
-#isSettingDatabaseCallDone {
-  display: none;
-}
 .at-link {
   color: #17683a;
   text-decoration: underline;

+ 3 - 4
client/components/main/layouts.jade

@@ -34,10 +34,9 @@ template(name="userFormsLayout")
         unless currentSetting.customLoginLogoLinkUrl
           img(src="{{currentSetting.customLoginLogoImageUrl}}" width="300" height="auto")
           br
-      unless currentSetting.customLoginLogoImageUrl
-        div#isSettingDatabaseCallDone
-          img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto")
-          br
+      else
+        img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto")
+        br
       if currentSetting.textBelowCustomLoginLogo
         +viewer
           | {{currentSetting.textBelowCustomLoginLogo}}

+ 0 - 11
client/components/main/layouts.js

@@ -20,8 +20,6 @@ const validator = {
   },
 };
 
-// let isSettingDatabaseFctCallDone = false;
-
 Template.userFormsLayout.onCreated(function () {
   const templateInstance = this;
   templateInstance.currentSetting = new ReactiveVar();
@@ -37,11 +35,6 @@ Template.userFormsLayout.onCreated(function () {
         oidcBtnElt.html(htmlvalue);
       }
 
-      // isSettingDatabaseFctCallDone = true;
-      if (currSetting && currSetting !== undefined && currSetting.customLoginLogoImageUrl !== undefined)
-        document.getElementById("isSettingDatabaseCallDone").style.display = 'none';
-      else
-        document.getElementById("isSettingDatabaseCallDone").style.display = 'block';
       return this.stop();
     },
   });
@@ -86,10 +79,6 @@ Template.userFormsLayout.onRendered(() => {
 });
 
 Template.userFormsLayout.helpers({
-  // isSettingDatabaseCallDone(){
-  //   return isSettingDatabaseFctCallDone;
-  // },
-
   isLegalNoticeLinkExist() {
     const currSet = Template.instance().currentSetting.get();
     if (currSet && currSet !== undefined && currSet != null) {