mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	feat(text-snippets): add default icon for templates
This commit is contained in:
		
							parent
							
								
									4f9bd970af
								
							
						
					
					
						commit
						59e0857bb5
					
				
							
								
								
									
										5
									
								
								apps/client/src/types-assets.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								apps/client/src/types-assets.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -8,4 +8,9 @@ declare module "*?url" { | |||||||
|     export default path; |     export default path; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | declare module "*?raw" { | ||||||
|  |     var content: string; | ||||||
|  |     export default content; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| declare module "boxicons/css/boxicons.min.css" { } | declare module "boxicons/css/boxicons.min.css" { } | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ import type LoadResults from "../../../services/load_results.js"; | |||||||
| import search from "../../../services/search.js"; | import search from "../../../services/search.js"; | ||||||
| import type { TemplateDefinition } from "@triliumnext/ckeditor5"; | import type { TemplateDefinition } from "@triliumnext/ckeditor5"; | ||||||
| import appContext from "../../../components/app_context.js"; | import appContext from "../../../components/app_context.js"; | ||||||
|  | import TemplateIcon from "@ckeditor/ckeditor5-icons/theme/icons/template.svg?raw"; | ||||||
| 
 | 
 | ||||||
| interface TemplateData { | interface TemplateData { | ||||||
|     title: string; |     title: string; | ||||||
| @ -30,7 +31,8 @@ export default async function getTemplates() { | |||||||
| 
 | 
 | ||||||
|         definitions.push({ |         definitions.push({ | ||||||
|             title: snippet.title, |             title: snippet.title, | ||||||
|             data: () => templateCache.get(snippet.noteId)?.content ?? "" |             data: () => templateCache.get(snippet.noteId)?.content ?? "", | ||||||
|  |             icon: TemplateIcon | ||||||
|         }) |         }) | ||||||
|     } |     } | ||||||
|     return definitions; |     return definitions; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran