Skip to content

Commit d8dd218

Browse files
committed
Don't show No templates found for now.
1 parent a9801fc commit d8dd218

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/gui/src/helpers.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,15 +855,13 @@ window.available_templates = async () => {
855855
console.log(hasTemplateFolder)
856856

857857
if(!hasTemplateFolder){
858-
console.log("No template folder")
859858
return []
860859
}
861860

862861
const hasTemplateFiles = await puter.fs.readdir(baseRoute + "/" + hasTemplateFolder.name)
863862
console.log(hasTemplateFiles)
864863

865864
if(hasTemplateFiles.length == 0) {
866-
console.log("There are no templates")
867865
return []
868866
}
869867

src/gui/src/helpers/new_context_menu_item.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@ const new_context_menu_item = function(dirname, append_to_element){
7070
});
7171
}
7272
},
73-
// divider
74-
'-'
7573
];
7674

7775
//Show file_templates on the lower part of "New"
7876
if (window.file_templates.length > 0) {
77+
// divider
78+
baseItems.push('-');
79+
80+
// User templates
7981
baseItems.push({
8082
html: "User templates",
8183
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){
8890
}))
8991
});
9092
} else {
91-
baseItems.push({
92-
html: "No templates found",
93-
icon: `<img src="${html_encode(window.icons['file-template.svg'])}" class="ctx-item-icon">`,
94-
});
93+
// baseItems.push({
94+
// html: "No templates found",
95+
// icon: `<img src="${html_encode(window.icons['file-template.svg'])}" class="ctx-item-icon">`,
96+
// });
9597
}
9698

9799
//Conditional rendering for the templates

0 commit comments

Comments
 (0)