You've already forked obsidian-visualiser
Fix dynamic character sheet loading.
This commit is contained in:
@@ -92,8 +92,10 @@ onMounted(async () => {
|
||||
tree.value.appendChild(load);
|
||||
|
||||
const content = dom('div', { class: 'flex flex-row justify-start items-center gap-4 p-2' }, [
|
||||
tooltip(button(icon('ph:cloud-arrow-down', { height: 20, width: 20 }), pull, 'p-1'), 'Actualiser', 'top'),
|
||||
tooltip(button(icon('ph:cloud-arrow-up', { height: 20, width: 20 }), push, 'p-1'), 'Enregistrer', 'top'),
|
||||
tooltip(button(icon('ph:cloud-arrow-down', { height: 16, width: 16 }), pull, 'p-1'), 'Actualiser', 'top'),
|
||||
tooltip(button(icon('ph:cloud-arrow-up', { height: 16, width: 16 }), push, 'p-1'), 'Enregistrer', 'top'),
|
||||
tooltip(button(icon('radix-icons:reset', { height: 16, width: 16 }), () => editor?.undo(), 'p-1'), 'Annuler', 'top'),
|
||||
tooltip(button(icon('radix-icons:reset', { height: 16, width: 16, hFlip: true }), () => editor?.redo(), 'p-1'), 'Rétablir', 'top'),
|
||||
])
|
||||
|
||||
tree.value.insertBefore(content, load);
|
||||
@@ -105,6 +107,11 @@ onMounted(async () => {
|
||||
}
|
||||
});
|
||||
|
||||
useShortcuts({
|
||||
"Meta-Z": () => editor?.undo(),
|
||||
"Meta-Y": () => editor?.redo(),
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
editor?.unmount();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user