File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments