mirror of
https://github.com/mmahdium/TBW.git
synced 2026-08-14 16:22:48 +03:30
Improve details page
This commit is contained in:
@@ -18,14 +18,14 @@ const alreadyAdded = computed(() =>
|
|||||||
<template>
|
<template>
|
||||||
<ErrorAlert class="" v-if="props.movie?.Error" :message="props.movie.ErrorMessage" />
|
<ErrorAlert class="" v-if="props.movie?.Error" :message="props.movie.ErrorMessage" />
|
||||||
|
|
||||||
<div v-else class="hero bg-base-200 min-h-screen">
|
<div v-else class="hero bg-base-200 min-h-screen rounded-md">
|
||||||
<!-- Loading state for hero content -->
|
<!-- Loading state for hero content -->
|
||||||
<div v-if="props.movie === undefined" class="hero-content">
|
<div v-if="props.movie === undefined" class="hero-content">
|
||||||
<span class="loading loading-ring loading-lg text-primary"></span>
|
<span class="loading loading-ring loading-lg text-primary"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Actual hero content -->
|
<!-- Actual hero content -->
|
||||||
<div v-else class="hero bg-base-200 min-h-screen">
|
<div v-else class="hero bg-base-200 min-h-screen rounded-md">
|
||||||
<div class="hero-content flex-col lg:flex-row gap-12">
|
<div class="hero-content flex-col lg:flex-row gap-12">
|
||||||
<!-- Poster -->
|
<!-- Poster -->
|
||||||
<figure class="flex-shrink-0">
|
<figure class="flex-shrink-0">
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ watch(searchQuery, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
timeoutId = window.setTimeout(() => {
|
timeoutId = window.setTimeout(() => {
|
||||||
if (searchQuery.value.length > 2) {
|
if (searchQuery.value.length > 2 && state.searchQuery !== searchQuery.value) {
|
||||||
searchMovie()
|
searchMovie()
|
||||||
}
|
}
|
||||||
timeoutId = null
|
timeoutId = null
|
||||||
|
|||||||
Reference in New Issue
Block a user