Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Bruno Predot
/
tmdb_test
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Bruno Predot
2025-04-29 17:22:23 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
45135be46635e7f69917007d6f0da5816a32601b
45135be4
1 parent
4260d2fa
Init branche, formattage prettier.
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
40 deletions
components/MovieCommentList.vue
components/form/MovieCommentForm.vue
components/test/HelloWorld.spec.ts
components/test/HelloWorld.vue
components/ui-components/Loader.vue
components/ui-components/Poster.vue
components/ui-components/SearchBar.vue
components/ui-components/SkeletonMoviesLoader.vue
components/ui-components/skeletonMovieDetailLoader.vue
components/MovieCommentList.vue
View file @
45135be
...
...
@@ -26,7 +26,8 @@ watch(
});
}
});
}, { immediate: true }
},
{ immediate: true },
);
//#endregion
</script>
...
...
components/form/MovieCommentForm.vue
View file @
45135be
...
...
@@ -105,7 +105,7 @@ function handleMessageEvent(event: string) {
@blur="v$.rating.$touch"
@input="v$.rating.$touch"
/>
<!-- <pre>{{ errormessages }}</pre>-->
<!-- <pre>{{ errormessages }}</pre>-->
<ui-components-tiny-mce-field-editor
:error-message="v$?.message?.$errors[0]?.$message ? (v$.message.$errors[0].$message as string) : ''"
:model-value="formData.message"
...
...
components/test/HelloWorld.spec.ts
View file @
45135be
import
{
describe
,
it
,
expect
}
from
'vitest'
import
{
mount
}
from
'@vue/test-utils'
import
{
describe
,
expect
,
it
}
from
"vitest"
;
import
{
mount
}
from
"@vue/test-utils"
;
import
HelloWorld
from
'./HelloWorld.vue'
import
HelloWorld
from
"./HelloWorld.vue"
;
describe
(
'HelloWorld'
,
()
=>
{
it
(
'component renders Hello world properly'
,
()
=>
{
const
wrapper
=
mount
(
HelloWorld
)
expect
(
wrapper
.
text
()).
toContain
(
'Hello world'
)
})
})
describe
(
"HelloWorld"
,
()
=>
{
it
(
"component renders Hello world properly"
,
()
=>
{
const
wrapper
=
mount
(
HelloWorld
)
;
expect
(
wrapper
.
text
()).
toContain
(
"Hello world"
);
})
;
})
;
...
...
components/test/HelloWorld.vue
View file @
45135be
<script setup lang="ts">
</script>
<script setup lang="ts"></script>
<template>
<p>Hello world</p>
</template>
<style scoped lang="scss">
</style>
\ No newline at end of file
<style scoped lang="scss"></style>
...
...
components/ui-components/Loader.vue
View file @
45135be
...
...
@@ -22,4 +22,4 @@ defineProps({
</section>
</template>
<style scoped></style>
\ No newline at end of file
<style scoped></style>
...
...
components/ui-components/Poster.vue
View file @
45135be
...
...
@@ -20,12 +20,7 @@ defineProps({
<template>
<section class="w-full md:w-1/3 lg:w-1/4">
<div class="rounded-lg overflow-hidden shadow-lg bg-gray-800">
<v-img
v-if="src"
:alt="title"
:src="`https://image.tmdb.org/t/p/w500${src}`"
class="w-full h-auto"
/>
<v-img v-if="src" :alt="title" :src="`https://image.tmdb.org/t/p/w500${src}`" class="w-full h-auto" />
<div v-else class="aspect-[2/3] bg-gray-700 flex items-center justify-center">
<FilmIcon :size="64" class="text-gray-500" />
</div>
...
...
@@ -33,6 +28,4 @@ defineProps({
</section>
</template>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
...
...
components/ui-components/SearchBar.vue
View file @
45135be
...
...
@@ -6,7 +6,7 @@ import { useDebounceFn } from "@vueuse/core";
//#endregion
//#region --Emits--.
const emit = defineEmits([
'event:search', 'event:clear_search'
]);
const emit = defineEmits([
"event:search", "event:clear_search"
]);
//#endregion
//#region --Props--.
...
...
@@ -29,12 +29,12 @@ const searchQuery = ref("");
* Debounced function
*/
const handleSearchEvent = useDebounceFn(() => {
emit(
'event:search'
, searchQuery.value);
emit(
"event:search"
, searchQuery.value);
}, 500);
function handleClearSearchEvent() {
searchQuery.value =
''
;
emit(
'event:clear_search')
searchQuery.value =
""
;
emit(
"event:clear_search");
}
//#endregion
</script>
...
...
components/ui-components/SkeletonMoviesLoader.vue
View file @
45135be
...
...
@@ -29,4 +29,4 @@ defineProps({
</section>
</template>
<style scoped></style>
\ No newline at end of file
<style scoped></style>
...
...
components/ui-components/skeletonMovieDetailLoader.vue
View file @
45135be
<script setup lang="ts">
</script>
<script setup lang="ts"></script>
<template>
<v-container class="bg-gray-900">
<v-row class="bg-gray-900"
>
<v-row class="bg-gray-900">
<v-col cols="12" sm="4">
<v-skeleton-loader
class="mx-auto border bg-gray-800"
...
...
@@ -14,7 +12,7 @@
type="paragraph, image"
/>
</v-col>
<v-col cols="12"
sm="8">
<v-col cols="12" sm="8">
<v-skeleton-loader
class="mx-auto mt-10"
color="#1f2937"
...
...
@@ -27,6 +25,4 @@
</v-container>
</template>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
...
...
Please
register
or
login
to post a comment