(templatePath: string)
| 35 | * and to the one-page input form (which would omit the name field). |
| 36 | */ |
| 37 | export function createFolderTemplateChoice(templatePath: string): ITemplateChoice { |
| 38 | const choice = new TemplateChoice(templateDisplayName(templatePath)); |
| 39 | choice.templatePath = templatePath; |
| 40 | // Creating a brand-new note from a template — land in it, like the user expects. |
| 41 | choice.openFile = true; |
| 42 | choice.fileNameFormat = { enabled: true, format: VALUE_SYNTAX }; |
| 43 | choice.discoverExistingNotesBeforeCreate = true; |
| 44 | return choice; |
| 45 | } |
| 46 | |
| 47 | /** Whether at least one template folder is configured (empty = whole vault, which we refuse). */ |
| 48 | export function hasConfiguredTemplateFolders(plugin: QuickAdd): boolean { |
no test coverage detected