浏览代码

Don't show `No templates found` for now.

Nariman Jelveh 10 月之前
父节点
当前提交
d8dd218089
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 0 2
      src/gui/src/helpers.js
  2. 8 6
      src/gui/src/helpers/new_context_menu_item.js

+ 0 - 2
src/gui/src/helpers.js

@@ -855,7 +855,6 @@ window.available_templates = async () => {
         console.log(hasTemplateFolder)
 
         if(!hasTemplateFolder){
-            console.log("No template folder")
             return []
         }
 
@@ -863,7 +862,6 @@ window.available_templates = async () => {
         console.log(hasTemplateFiles)
 
         if(hasTemplateFiles.length == 0) {
-            console.log("There are no templates")
             return []
         }
 

+ 8 - 6
src/gui/src/helpers/new_context_menu_item.js

@@ -70,12 +70,14 @@ const new_context_menu_item = function(dirname, append_to_element){
                 });
             }
         },
-        // divider
-        '-'
     ];
 
     //Show file_templates on the lower part of "New"
     if (window.file_templates.length > 0) {
+        // divider
+        baseItems.push('-');
+
+        // User templates
         baseItems.push({
             html: "User templates",
             icon: `<img src="${html_encode(window.icons['file-template.svg'])}" class="ctx-item-icon">`,
@@ -88,10 +90,10 @@ const new_context_menu_item = function(dirname, append_to_element){
             }))
         });
     } else {
-        baseItems.push({
-            html: "No templates found",
-            icon: `<img src="${html_encode(window.icons['file-template.svg'])}" class="ctx-item-icon">`,
-        });
+        // baseItems.push({
+        //     html: "No templates found",
+        //     icon: `<img src="${html_encode(window.icons['file-template.svg'])}" class="ctx-item-icon">`,
+        // });
     }
 
     //Conditional rendering for the templates