瀏覽代碼

Speed up board loading, skip loading the full sidebar

- only load the sidebar when viewing
Martin Filser 2 年之前
父節點
當前提交
f483b162ce

+ 2 - 0
client/components/boards/boardBody.js

@@ -218,6 +218,8 @@ BlazeComponent.extendComponent({
     if (Utils.canModifyBoard() && currentBoard.lists().length === 0) {
       boardComponent.openNewListForm();
     }
+
+    Utils.setBackgroundImage();
   },
 
   notDisplayThisBoard() {

+ 2 - 1
client/components/sidebar/sidebar.jade

@@ -13,7 +13,8 @@ template(name="sidebar")
           h2
             a.fa.fa-chevron-left.js-back-home
             = getViewTitle
-        +Template.dynamic(template=getViewTemplate)
+        if isOpen
+          +Template.dynamic(template=getViewTemplate)
 
 template(name='homeSidebar')
   hr

+ 0 - 1
client/components/sidebar/sidebar.js

@@ -333,7 +333,6 @@ BlazeComponent.extendComponent({
 
   onRendered() {
     this.setLoading(false);
-    Utils.setBackgroundImage();
   },
 
   setError(error) {