mirror of
https://github.com/Xevion/the-office.git
synced 2026-01-31 08:26:13 -06:00
fix: use NuxtLink instead, lint fix :key position
This commit is contained in:
@@ -1,14 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<span>
|
<span>
|
||||||
<template v-for="(constituent, index) in texts">
|
<template v-for="(constituent, index) in texts">
|
||||||
<RouterLink
|
<NuxtLink class="speaker-link" v-if="constituent.route" :key="index" :to="constituent.route">
|
||||||
class="speaker-link"
|
|
||||||
v-if="constituent.route"
|
|
||||||
:key="index"
|
|
||||||
:to="constituent.route"
|
|
||||||
>
|
|
||||||
{{ constituent.text }}
|
{{ constituent.text }}
|
||||||
</RouterLink>
|
</NuxtLink>
|
||||||
<span class="speaker-bg" v-else :key="'plain-' + index">{{ constituent }}</span>
|
<span class="speaker-bg" v-else :key="'plain-' + index">{{ constituent }}</span>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
:characters="quote.characters"
|
:characters="quote.characters"
|
||||||
class="my-3"
|
class="my-3"
|
||||||
/>
|
/>
|
||||||
<RouterLink
|
<NuxtLink
|
||||||
v-else
|
v-else
|
||||||
:to="{ name: 'Character', params: { character: quote.character } }"
|
:to="{ name: 'Character', params: { character: quote.character } }"
|
||||||
class="speaker-link"
|
class="speaker-link"
|
||||||
>
|
>
|
||||||
{{ quote.speaker }}
|
{{ quote.speaker }}
|
||||||
</RouterLink>
|
</NuxtLink>
|
||||||
</td>
|
</td>
|
||||||
<td class="quote-text w-100 pr-3" v-html="transform(quote.text)" />
|
<td class="quote-text w-100 pr-3" v-html="transform(quote.text)" />
|
||||||
<td class="px-1 pl-2">
|
<td class="px-1 pl-2">
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<td class="quote-text w-100 pr-3" v-html="item._highlightResult.text.value" />
|
<td class="quote-text w-100 pr-3" v-html="item._highlightResult.text.value" />
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<RouterLink
|
<NuxtLink
|
||||||
v-if="expanded"
|
v-if="expanded"
|
||||||
class="no-link search-result-link text-muted mb-2 ml-2 w-100"
|
class="no-link search-result-link text-muted mb-2 ml-2 w-100"
|
||||||
:to="{
|
:to="{
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
>
|
>
|
||||||
Season {{ item.season }} Episode {{ item.episode_rel }} Scene
|
Season {{ item.season }} Episode {{ item.episode_rel }} Scene
|
||||||
{{ item.section_rel }}
|
{{ item.section_rel }}
|
||||||
</RouterLink>
|
</NuxtLink>
|
||||||
</BCardText>
|
</BCardText>
|
||||||
</BCard>
|
</BCard>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
import { ChevronDown } from 'lucide-vue-next';
|
import { ChevronDown } from 'lucide-vue-next';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
import useStore from '@/store';
|
import useStore from '@/store';
|
||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@@ -47,8 +46,8 @@ const seasons = computed(() => store.quoteData);
|
|||||||
<template v-for="(episode, index) in seasons[season.season_id - 1].episodes">
|
<template v-for="(episode, index) in seasons[season.season_id - 1].episodes">
|
||||||
<template v-if="'title' in episode">
|
<template v-if="'title' in episode">
|
||||||
<SeasonListItem
|
<SeasonListItem
|
||||||
class="bg-white/90 hover:bg-gray-100"
|
|
||||||
:key="`rl-${index}`"
|
:key="`rl-${index}`"
|
||||||
|
class="bg-white/90 hover:bg-gray-100"
|
||||||
:episode-number="episode.episodeNumber"
|
:episode-number="episode.episodeNumber"
|
||||||
:season-number="episode.seasonNumber"
|
:season-number="episode.seasonNumber"
|
||||||
:title="episode.title"
|
:title="episode.title"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { HTMLAttributes } from 'vue';
|
import type { HTMLAttributes } from 'vue';
|
||||||
import { RouterLink } from 'vue-router';
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
import useStore from '@/store';
|
import useStore from '@/store';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
@@ -15,7 +14,7 @@ const props = defineProps<
|
|||||||
} & { class?: HTMLAttributes['class'] }
|
} & { class?: HTMLAttributes['class'] }
|
||||||
>();
|
>();
|
||||||
|
|
||||||
const timeoutID = ref<number | null>(null);
|
const timeoutID = ref<ReturnType<typeof setTimeout> | null>(null);
|
||||||
|
|
||||||
const startHover = () => {
|
const startHover = () => {
|
||||||
timeoutID.value = setTimeout(() => {
|
timeoutID.value = setTimeout(() => {
|
||||||
@@ -32,10 +31,10 @@ const stopHover = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<RouterLink
|
<NuxtLink
|
||||||
|
:id="`s-${seasonNumber}-ep-${episodeNumber}`"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
:aria-label="`Episode ${episodeNumber}: ${title}`"
|
:aria-label="`Episode ${episodeNumber}: ${title}`"
|
||||||
:id="`s-${seasonNumber}-ep-${episodeNumber}`"
|
|
||||||
:to="{ name: 'Episode', params: { season: seasonNumber, episode: episodeNumber } }"
|
:to="{ name: 'Episode', params: { season: seasonNumber, episode: episodeNumber } }"
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
@@ -52,7 +51,7 @@ const stopHover = () => {
|
|||||||
<span class="text-foreground/80 group-hover/item:text-black">
|
<span class="text-foreground/80 group-hover/item:text-black">
|
||||||
“{{ title }}”
|
“{{ title }}”
|
||||||
</span>
|
</span>
|
||||||
</RouterLink>
|
</NuxtLink>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|||||||
@@ -21,12 +21,12 @@
|
|||||||
<BCol>
|
<BCol>
|
||||||
<h4>
|
<h4>
|
||||||
{{ characters[id].name || id }}
|
{{ characters[id].name || id }}
|
||||||
<RouterLink
|
<NuxtLink
|
||||||
class="no-link"
|
class="no-link"
|
||||||
:to="{ name: 'Character', params: { character: id } }"
|
:to="{ name: 'Character', params: { character: id } }"
|
||||||
>
|
>
|
||||||
<b-icon class="h6" icon="caret-right-fill" />
|
<b-icon class="h6" icon="caret-right-fill" />
|
||||||
</RouterLink>
|
</NuxtLink>
|
||||||
<span class="h6 font-italic" style="opacity: 50%">
|
<span class="h6 font-italic" style="opacity: 50%">
|
||||||
{{ characters[id].actor }}
|
{{ characters[id].actor }}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
However, as of the time of writing this, most everything else is setup.
|
However, as of the time of writing this, most everything else is setup.
|
||||||
<hr />
|
<hr />
|
||||||
<p style="text-align: center">
|
<p style="text-align: center">
|
||||||
Check out the <RouterLink :to="{ name: 'About' }"> about page </RouterLink> for more info
|
Check out the <NuxtLink :to="{ name: 'About' }"> about page </NuxtLink> for more info
|
||||||
on what this website is.
|
on what this website is.
|
||||||
</p>
|
</p>
|
||||||
</BCardText>
|
</BCardText>
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
<BCol>
|
<BCol>
|
||||||
<h4>
|
<h4>
|
||||||
{{ episode.title }}
|
{{ episode.title }}
|
||||||
<RouterLink
|
<NuxtLink
|
||||||
class="no-link"
|
class="no-link"
|
||||||
:to="getEpisodeRoute(episode.seasonNumber, episode.episodeNumber)"
|
:to="getEpisodeRoute(episode.seasonNumber, episode.episodeNumber)"
|
||||||
>
|
>
|
||||||
<b-icon class="h6" icon="caret-right-fill" />
|
<b-icon class="h6" icon="caret-right-fill" />
|
||||||
</RouterLink>
|
</NuxtLink>
|
||||||
</h4>
|
</h4>
|
||||||
<p class="pl-3">
|
<p class="pl-3">
|
||||||
{{ episode.description }}
|
{{ episode.description }}
|
||||||
|
|||||||
Generated
+1902
-5433
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user