diff --git a/app/app.vue b/app/app.vue index 2533760..3203888 100644 --- a/app/app.vue +++ b/app/app.vue @@ -11,7 +11,7 @@ \ No newline at end of file diff --git a/app/components/common/card.vue b/app/components/common/card.vue index 5d8cf64..d860091 100644 --- a/app/components/common/card.vue +++ b/app/components/common/card.vue @@ -12,7 +12,7 @@ \ No newline at end of file diff --git a/app/components/forms/auth/registration-form.vue b/app/components/forms/auth/registration-form.vue index a4a98ac..6e95993 100644 --- a/app/components/forms/auth/registration-form.vue +++ b/app/components/forms/auth/registration-form.vue @@ -60,7 +60,7 @@ const handleRegistration = async () => { } .error-message { - color: red; + color: var(--color-error-text, red); text-align: center; } diff --git a/app/components/panels/movie-details.vue b/app/components/panels/movie-details.vue index 6396673..b22d038 100644 --- a/app/components/panels/movie-details.vue +++ b/app/components/panels/movie-details.vue @@ -79,7 +79,6 @@ dt { display: flex; flex-direction: column; padding: 2rem; - justify-content: center; max-width: 40rem; margin: 0 auto; } diff --git a/app/components/panels/movie-search.vue b/app/components/panels/movie-search.vue index a42561c..90c9210 100644 --- a/app/components/panels/movie-search.vue +++ b/app/components/panels/movie-search.vue @@ -2,6 +2,8 @@ import type {MovieSearchResult} from "~/types/movie-search-results"; import type {MovieList} from "~/types/movie-list"; import type {ResourceResponse} from "@/types/api"; +import InputAction from "~/components/common/input-action.vue"; +import ButtonAction from "~/components/common/button-action.vue"; const emit = defineEmits(['add-movie']); const props = defineProps<{ @@ -9,15 +11,18 @@ const props = defineProps<{ }>() const searchQuery = ref(""); +const errorMessage = ref(""); const movies = ref([]); const searchMovies = () => { $api>(`/api/movies/search/${searchQuery.value}`, { method: "GET" }).then((response) => { + errorMessage.value = ""; movies.value = response.data }).catch((error) => { - alert(error.message) + if (error.response.status === 404) + errorMessage.value = "No movies found" }); } @@ -37,23 +42,27 @@ const addMovieToList = (movie: MovieSearchResult) => { - + Movie Search Search Movies - - - - Search - + - + {{ errorMessage }} + {{ movie.title }} {{ movie.year }} - Add Movie + @@ -63,6 +72,22 @@ const addMovieToList = (movie: MovieSearchResult) => { \ No newline at end of file diff --git a/app/components/slideout-panel.vue b/app/components/slideout-panel.vue index 105f2e5..9ab40eb 100644 --- a/app/components/slideout-panel.vue +++ b/app/components/slideout-panel.vue @@ -37,11 +37,11 @@ const emit = defineEmits<{ right: 0; bottom: 0; width: 40%; - background: var(--color-surface, #fff); + background: var(--panel-background, #fff); z-index: 101; overflow-y: auto; - padding: 1rem; box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2); + padding: 3rem; } .close-button {
{{ errorMessage }}