Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/LoganTann/kagescan-nuxt int…
Browse files Browse the repository at this point in the history
…o prod
  • Loading branch information
LoganTann committed May 19, 2023
2 parents 58b060a + 74ecc7a commit ed41452
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 49 deletions.
26 changes: 5 additions & 21 deletions pages/anime/[serieId]/index.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
<template>
<ContentDoc v-if="false" v-slot="{ doc }">
<h1>{{ doc.title }}</h1>
<ContentRenderer :value="doc" />
<div>
{{ serieData.serieData.value?.videos }}
<template>
<div class="px-4 mt-2">
<div class="prose mx-auto mt-8">
<ContentDoc></ContentDoc>
</div>
</ContentDoc>
</div>
</template>

<script setup lang="ts">
const route = useRoute();
const { serieId } = route.params;
const serieData = useAnimeData(serieId as string);
/**
* Redirection car page inachevée et on focus seulement sur l'essentiel
*/
watch(serieData.serieData, (newVal) => {
if (newVal?.videos) {
navigateTo(newVal.videos[0].path);
}
});
</script>
12 changes: 7 additions & 5 deletions pages/anime/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template></template>
<script setup lang="ts">
// not implemented
navigateTo("/anime/mekakucity-actors/otsukimi-recital");
</script>
<template>
<div class="px-4 mt-2">
<div class="prose mx-auto mt-8">
<ContentDoc></ContentDoc>
</div>
</div>
</template>
19 changes: 7 additions & 12 deletions pages/novel/[serieId]/[volumeId]/index.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<script setup lang="ts">
const route = useRoute();
const { data } = await useFetch("/api/novel/getVolumeData", {
params: {
serieId: route.params.serieId,
volumeId: route.params.volumeId,
},
});
if (data.value && data.value.chapters.length > 0) {
navigateTo(data.value.chapters[0].path);
}
</script>
<template>
<div class="px-4 mt-2">
<div class="prose mx-auto mt-8">
<ContentDoc></ContentDoc>
</div>
</div>
</template>
7 changes: 7 additions & 0 deletions pages/novel/[serieId]/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<div class="px-4 mt-2">
<div class="prose mx-auto mt-8">
<ContentDoc></ContentDoc>
</div>
</div>
</template>
12 changes: 7 additions & 5 deletions pages/novel/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template></template>
<script setup lang="ts">
// not implemented
navigateTo("/novel/kagerou-daze/vol01/kagerou-daze-i");
</script>
<template>
<div class="px-4 mt-2">
<div class="prose mx-auto mt-8">
<ContentDoc></ContentDoc>
</div>
</div>
</template>
8 changes: 7 additions & 1 deletion pages/scan/[serieId]/index.vue
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
<template>Série {{ $route.params.serieId }}</template>
<template>
<div class="px-4 mt-2">
<div class="prose mx-auto mt-8">
<ContentDoc></ContentDoc>
</div>
</div>
</template>
12 changes: 7 additions & 5 deletions pages/scan/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template></template>
<script setup lang="ts">
// not implemented
navigateTo("/scan/kagerou-daze/10#mangaReader");
</script>
<template>
<div class="px-4 mt-2">
<div class="prose mx-auto mt-8">
<ContentDoc></ContentDoc>
</div>
</div>
</template>

0 comments on commit ed41452

Please sign in to comment.