From 338cd36166ea3e87dc61116d7c8af1461440f1ac Mon Sep 17 00:00:00 2001 From: "Edward Tirado Jr." Date: Thu, 16 Apr 2026 16:20:52 -0500 Subject: [PATCH] improved styling for movie search and added some css variables for colors --- app/app.vue | 2 +- app/assets/css/variables.css | 8 ++- app/components/common/button-action.vue | 22 ++++++++ app/components/common/card.vue | 2 +- app/components/common/input-action.vue | 8 +-- app/components/forms/auth/login-form.vue | 4 ++ .../forms/auth/new-password-form.vue | 2 +- .../forms/auth/registration-form.vue | 2 +- app/components/panels/movie-details.vue | 1 - app/components/panels/movie-search.vue | 53 +++++++++++++++---- app/components/slideout-panel.vue | 4 +- 11 files changed, 87 insertions(+), 21 deletions(-) create mode 100644 app/components/common/button-action.vue 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) => { \ 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 {