You've already forked obsidian-visualiser
Compress stored content for improved caching size and speed. Add loading component on every Content ready awaiting to reduce first render time.
This commit is contained in:
@@ -15,9 +15,9 @@ const route = useRouter().currentRoute;
|
||||
const path = computed(() => unifySlug(route.value.params.path ?? ''));
|
||||
|
||||
onMounted(async () => {
|
||||
if(element.value && path.value && await Content.ready)
|
||||
if(element.value && path.value)
|
||||
{
|
||||
overview.value = Content.render(element.value, path.value);
|
||||
overview.value = await Content.render(element.value, path.value);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -86,7 +86,7 @@ function push()
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
if(tree.value && container.value && await Content.ready)
|
||||
if(tree.value && container.value)
|
||||
{
|
||||
const load = loading('normal');
|
||||
tree.value.appendChild(load);
|
||||
@@ -100,7 +100,7 @@ onMounted(async () => {
|
||||
|
||||
editor = new Editor();
|
||||
|
||||
tree.value.replaceChild(editor.tree.container, load);
|
||||
Content.ready.then(() => tree.value!.replaceChild(editor.tree.container, load));
|
||||
container.value.appendChild(editor.container);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user