Add the note templates feature

This commit is contained in:
Bruno
2024-12-22 14:00:36 +00:00
parent b572d06f83
commit 421c5134fa
7 changed files with 138 additions and 5 deletions
+4 -1
View File
@@ -33,9 +33,12 @@ class AddNode extends Modal
public function add(): void
{
$this->form->create();
$node = $this->form->create();
$this->closeModal();
$this->dispatch('node-updated');
if ($node->parent_id == $this->form->vault->templates_node_id) {
$this->dispatch('templates-refresh');
}
$message = $this->form->is_file ? __('File created') : __('Folder created');
$this->dispatch('toast', message: $message, type: 'success');
}