Showing
9 changed files
with
23 additions
and
37 deletions
| @@ -105,7 +105,7 @@ function handleMessageEvent(event: string) { | @@ -105,7 +105,7 @@ function handleMessageEvent(event: string) { | ||
| 105 | @blur="v$.rating.$touch" | 105 | @blur="v$.rating.$touch" |
| 106 | @input="v$.rating.$touch" | 106 | @input="v$.rating.$touch" |
| 107 | /> | 107 | /> |
| 108 | -<!-- <pre>{{ errormessages }}</pre>--> | 108 | + <!-- <pre>{{ errormessages }}</pre>--> |
| 109 | <ui-components-tiny-mce-field-editor | 109 | <ui-components-tiny-mce-field-editor |
| 110 | :error-message="v$?.message?.$errors[0]?.$message ? (v$.message.$errors[0].$message as string) : ''" | 110 | :error-message="v$?.message?.$errors[0]?.$message ? (v$.message.$errors[0].$message as string) : ''" |
| 111 | :model-value="formData.message" | 111 | :model-value="formData.message" |
| 1 | -import { describe, it, expect } from 'vitest' | 1 | +import { describe, expect, it } from "vitest"; |
| 2 | -import { mount } from '@vue/test-utils' | 2 | +import { mount } from "@vue/test-utils"; |
| 3 | 3 | ||
| 4 | -import HelloWorld from './HelloWorld.vue' | 4 | +import HelloWorld from "./HelloWorld.vue"; |
| 5 | 5 | ||
| 6 | -describe('HelloWorld', () => { | 6 | +describe("HelloWorld", () => { |
| 7 | - it('component renders Hello world properly', () => { | 7 | + it("component renders Hello world properly", () => { |
| 8 | - const wrapper = mount(HelloWorld) | 8 | + const wrapper = mount(HelloWorld); |
| 9 | - expect(wrapper.text()).toContain('Hello world') | 9 | + expect(wrapper.text()).toContain("Hello world"); |
| 10 | - }) | 10 | + }); |
| 11 | -}) | 11 | +}); |
| @@ -20,12 +20,7 @@ defineProps({ | @@ -20,12 +20,7 @@ defineProps({ | ||
| 20 | <template> | 20 | <template> |
| 21 | <section class="w-full md:w-1/3 lg:w-1/4"> | 21 | <section class="w-full md:w-1/3 lg:w-1/4"> |
| 22 | <div class="rounded-lg overflow-hidden shadow-lg bg-gray-800"> | 22 | <div class="rounded-lg overflow-hidden shadow-lg bg-gray-800"> |
| 23 | - <v-img | 23 | + <v-img v-if="src" :alt="title" :src="`https://image.tmdb.org/t/p/w500${src}`" class="w-full h-auto" /> |
| 24 | - v-if="src" | ||
| 25 | - :alt="title" | ||
| 26 | - :src="`https://image.tmdb.org/t/p/w500${src}`" | ||
| 27 | - class="w-full h-auto" | ||
| 28 | - /> | ||
| 29 | <div v-else class="aspect-[2/3] bg-gray-700 flex items-center justify-center"> | 24 | <div v-else class="aspect-[2/3] bg-gray-700 flex items-center justify-center"> |
| 30 | <FilmIcon :size="64" class="text-gray-500" /> | 25 | <FilmIcon :size="64" class="text-gray-500" /> |
| 31 | </div> | 26 | </div> |
| @@ -33,6 +28,4 @@ defineProps({ | @@ -33,6 +28,4 @@ defineProps({ | ||
| 33 | </section> | 28 | </section> |
| 34 | </template> | 29 | </template> |
| 35 | 30 | ||
| 36 | -<style scoped> | 31 | +<style scoped></style> |
| 37 | - | ||
| 38 | -</style> |
| @@ -6,7 +6,7 @@ import { useDebounceFn } from "@vueuse/core"; | @@ -6,7 +6,7 @@ import { useDebounceFn } from "@vueuse/core"; | ||
| 6 | //#endregion | 6 | //#endregion |
| 7 | 7 | ||
| 8 | //#region --Emits--. | 8 | //#region --Emits--. |
| 9 | -const emit = defineEmits(['event:search', 'event:clear_search']); | 9 | +const emit = defineEmits(["event:search", "event:clear_search"]); |
| 10 | //#endregion | 10 | //#endregion |
| 11 | 11 | ||
| 12 | //#region --Props--. | 12 | //#region --Props--. |
| @@ -29,12 +29,12 @@ const searchQuery = ref(""); | @@ -29,12 +29,12 @@ const searchQuery = ref(""); | ||
| 29 | * Debounced function | 29 | * Debounced function |
| 30 | */ | 30 | */ |
| 31 | const handleSearchEvent = useDebounceFn(() => { | 31 | const handleSearchEvent = useDebounceFn(() => { |
| 32 | - emit('event:search', searchQuery.value); | 32 | + emit("event:search", searchQuery.value); |
| 33 | }, 500); | 33 | }, 500); |
| 34 | 34 | ||
| 35 | function handleClearSearchEvent() { | 35 | function handleClearSearchEvent() { |
| 36 | - searchQuery.value = ''; | 36 | + searchQuery.value = ""; |
| 37 | - emit('event:clear_search') | 37 | + emit("event:clear_search"); |
| 38 | } | 38 | } |
| 39 | //#endregion | 39 | //#endregion |
| 40 | </script> | 40 | </script> |
| 1 | -<script setup lang="ts"> | 1 | +<script setup lang="ts"></script> |
| 2 | - | ||
| 3 | -</script> | ||
| 4 | 2 | ||
| 5 | <template> | 3 | <template> |
| 6 | <v-container class="bg-gray-900"> | 4 | <v-container class="bg-gray-900"> |
| 7 | - <v-row class="bg-gray-900" > | 5 | + <v-row class="bg-gray-900"> |
| 8 | <v-col cols="12" sm="4"> | 6 | <v-col cols="12" sm="4"> |
| 9 | <v-skeleton-loader | 7 | <v-skeleton-loader |
| 10 | class="mx-auto border bg-gray-800" | 8 | class="mx-auto border bg-gray-800" |
| @@ -27,6 +25,4 @@ | @@ -27,6 +25,4 @@ | ||
| 27 | </v-container> | 25 | </v-container> |
| 28 | </template> | 26 | </template> |
| 29 | 27 | ||
| 30 | -<style scoped> | 28 | +<style scoped></style> |
| 31 | - | ||
| 32 | -</style> |
-
Please register or login to post a comment