Fix content read pages and proses getting content. Start working on CanvasEditor.

This commit is contained in:
Clément Pons
2025-04-01 17:23:26 +02:00
parent 1d41514b26
commit 6100fd9411
7 changed files with 222 additions and 88 deletions

View File

@@ -7,16 +7,16 @@
</template>
<script setup lang="ts">
import { Content } from '~/shared/content.util';
import { Content } from '#shared/content.util';
import { unifySlug } from '#shared/general.util';
const element = useTemplateRef('element'), overview = ref();
const route = useRouter().currentRoute;
const path = computed(() => Array.isArray(route.value.params.path) ? route.value.params.path[0] : route.value.params.path);
const path = computed(() => unifySlug(route.value.params.path));
onMounted(async () => {
if(element.value && path.value)
if(element.value && path.value && await Content.ready)
{
await Content.init()
overview.value = Content.render(element.value, path.value);
}
});