Refactoring search, navigation, canvas and others to fit the new data model

This commit is contained in:
2024-08-06 00:15:09 +02:00
parent e28d72fd1b
commit a3d0b3b5bd
26 changed files with 409 additions and 253 deletions

View File

@@ -1,15 +1,17 @@
<script setup lang="ts">
const route = useRoute();
const path = unifySlug(route.params.slug);
const { data: content } = await useFetch(`/api/project/${route.params.projectId}/file`, {
query: {
path: path
path: unifySlug(route.params.slug)
}
});
</script>
<template>
<Head>
<Title v-if="content && content[0]">{{ content[0].title }}</Title>
</Head>
<div class="site-body-center-column">
<div class="render-container">
<template v-if="!!content && content[0] && content[0].type == 'Markdown' && !!content[0].content">
@@ -23,7 +25,7 @@ const { data: content } = await useFetch(`/api/project/${route.params.projectId}
</div>
</div>
</div>
<RightComponent :id="content[0].id" />
<RightComponent/>
</template>
<CanvasRenderer v-else-if="!!content && content[0] && content[0].type == 'Canvas' && !!content[0].content" :canvas="JSON.parse(content[0].content)" />
<div v-else-if="!!content && content[0]">

View File

@@ -18,7 +18,7 @@ Le logo a été créé grâce aux icones de [Game Icons](https://game-icons.net)
<div class="publish-renderer">
<div class="markdown-preview-view markdown-rendered node-insert-event hide-title">
<div class="markdown-preview-sizer markdown-preview-section" style="padding-bottom: 0px;">
<MDC :value="data" />
<Markdown :content="data" />
</div>
</div>
</div>