Format project

This commit is contained in:
2025-10-31 11:10:44 +03:30
parent a65ef0f2cf
commit d20e838ae4
6 changed files with 16 additions and 22 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ interface Props {
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
size: 'w300' size: 'w300',
}) })
const imageLoadFailed = ref(false) const imageLoadFailed = ref(false)
+3 -5
View File
@@ -6,12 +6,10 @@ interface Props {
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
size: 'md', size: 'md',
color: 'primary' color: 'primary',
}) })
</script> </script>
<template> <template>
<span <span :class="`loading loading-ring loading-${props.size} text-${props.color}`"></span>
:class="`loading loading-ring loading-${props.size} text-${props.color}`" </template>
></span>
</template>
+1 -5
View File
@@ -39,11 +39,7 @@ const alreadyAdded = computed(() =>
> >
<!-- Poster --> <!-- Poster -->
<ImageWithFallback <ImageWithFallback
:src=" :src="type === 'movie' ? props.movie!.PosterPath : props.tvSeries!.PosterPath"
type === 'movie'
? props.movie!.PosterPath
: props.tvSeries!.PosterPath
"
alt="Poster" alt="Poster"
size="w500" size="w500"
class="shrink-0 w-full max-w-sm rounded-lg shadow-lg transform transition-transform duration-500 hover:scale-105" class="shrink-0 w-full max-w-sm rounded-lg shadow-lg transform transition-transform duration-500 hover:scale-105"
+7 -7
View File
@@ -9,11 +9,11 @@ const props = defineProps<{
isSearch: boolean isSearch: boolean
}>() }>()
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'loaded', id: string): void; (e: 'loaded', id: string): void
(e: 'loadMore'): void; (e: 'loadMore'): void
(e: 'add-media', media: MediaType): void; (e: 'add-media', media: MediaType): void
(e: 'remove-media', mediaId: number): void; (e: 'remove-media', mediaId: number): void
}>() }>()
</script> </script>
@@ -35,8 +35,8 @@ const emit = defineEmits<{
class="grid gap-4 grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5" class="grid gap-4 grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5"
> >
<li v-for="media in props.medias" :key="media.Id" v-auto-animate> <li v-for="media in props.medias" :key="media.Id" v-auto-animate>
<MediaCard <MediaCard
:media="media" :media="media"
@add-media="$emit('add-media', $event)" @add-media="$emit('add-media', $event)"
@remove-media="$emit('remove-media', $event)" @remove-media="$emit('remove-media', $event)"
/> />
+3 -3
View File
@@ -5,14 +5,14 @@ interface Props {
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
type: 'primary' type: 'primary',
}) })
</script> </script>
<template> <template>
<span <span
:class="`px-3 py-1 rounded-md text-sm bg-linear-to-r from-gray-100 to-gray-200 ${type ? 'badge-' + type : ''} text-gray-700 border border-gray-300`" :class="`px-3 py-1 rounded-md text-sm bg-linear-to-r from-gray-100 to-gray-200 ${type ? 'badge-' + type : ''} text-gray-700 border border-gray-300`"
> >
{{ props.text }} {{ props.text }}
</span> </span>
</template> </template>
+1 -1
View File
@@ -7,7 +7,7 @@ import { mapTvSeriesDetails } from '@/types/TvSeriesMap'
import axios from 'axios' import axios from 'axios'
const TMDB_READ_API_KEY = const TMDB_READ_API_KEY =
'eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIzZjY3MDNmM2UyYTBiMmI0MGZlNGZiYjNlMTU0NjI0NCIsIm5iZiI6MTc2MDU3NDcwNi45MjQsInN1YiI6IjY4ZjAzY2YyNGZmNGM0NjI1NmM3N2EyNyIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.HHReb_7Oue_o1wkgH2mmbCgdMJ8buFfRdCtwQqj_1Us' // I know this should not be here and I dont care 'eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIzZjY3MDNmM2UyYTBiMmI0MGZlNGZiYjNlMTU0NjI0NCIsIm5iZiI6MTc2MDU3NDcwNi45MjQsInN1YiI6IjY4ZjAzY2YyNGZmNGM0NjI1NmM3N2EyNyIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.HHReb_7Oue_o1wkgH2mmbCgdMJ8buFfRdCtwQqj_1Us' // This is a read only key and I dont see the need for hiding it, ONLY IN THIS PARTICULAR CASE
const instance = axios.create({ const instance = axios.create({
baseURL: 'https://api.themoviedb.org/3', baseURL: 'https://api.themoviedb.org/3',