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:
Clément Pons
2025-10-28 17:57:20 +01:00
parent 1c3211d28e
commit fde752b6ed
6 changed files with 77 additions and 61 deletions

View File

@@ -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>

View File

@@ -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);
}
});