@@ -2,10 +2,7 @@ import { templatesScreen } from '../html';
22import type { EventsManager , Template } from '../models' ;
33import { debounce } from '../utils/utils' ;
44
5- export const createTemplatesContainer = (
6- eventsManager : EventsManager ,
7- loadUserTemplates : ( ) => void ,
8- ) => {
5+ export const createTemplatesContainer = ( eventsManager : EventsManager ) => {
96 const div = document . createElement ( 'div' ) ;
107 div . innerHTML = templatesScreen ;
118 const templatesContainer = div . firstChild as HTMLElement ;
@@ -23,9 +20,6 @@ export const createTemplatesContainer = (
2320 } ) ;
2421 const target = templatesContainer . querySelector ( '#' + link . dataset . target ) ;
2522 target ?. classList . add ( 'active' ) ;
26- if ( link . dataset . target === 'templates-user' ) {
27- loadUserTemplates ( ) ;
28- }
2923 } ) ;
3024 } ) ;
3125 setupTemplatesSearch ( templatesContainer ) ;
@@ -54,12 +48,12 @@ export const noUserTemplates = () => `
5448 <div class="description alert">${ window . deps . translateString ( 'templates.noUserTemplates.heading' , 'You have no saved templates.' ) } </div>
5549 <div class="description help">
5650 ${ window . deps . translateString (
57- 'templates.noUserTemplates.desc' ,
58- 'You can save a project as a template from <wbr />(App menu > Save as > Template).' ,
59- {
60- isHTML : true ,
61- } ,
62- ) }
51+ 'templates.noUserTemplates.desc' ,
52+ 'You can save a project as a template from <wbr />(App menu > Save as > Template).' ,
53+ {
54+ isHTML : true ,
55+ } ,
56+ ) }
6357 </div>
6458</div>
6559` ;
0 commit comments