From 829f4d720a14e5d15c87dab63d6ab1b708d9adcf Mon Sep 17 00:00:00 2001 From: Olivier Ribiere Date: Fri, 4 Oct 2024 11:41:36 +0200 Subject: [PATCH] feat(vue): Adapt actor page for mobile --- .../views-components/actors/ActorProfile.vue | 24 +++++++++++++------ .../actors/ActorRelatedContent.vue | 19 +++++++++++++++ vue/src/components/views/ActorsView.vue | 10 +++----- 3 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 vue/src/components/views-components/actors/ActorRelatedContent.vue diff --git a/vue/src/components/views-components/actors/ActorProfile.vue b/vue/src/components/views-components/actors/ActorProfile.vue index e1bd6d26..0ee6fc43 100644 --- a/vue/src/components/views-components/actors/ActorProfile.vue +++ b/vue/src/components/views-components/actors/ActorProfile.vue @@ -2,16 +2,12 @@ @@ -46,7 +43,7 @@ import { useRoute } from 'vue-router'; import ContentBanner from '@/components/generic-components/content/ContentBanner.vue'; import SectionTitle from '@/components/generic-components/text-elements/SectionTitle.vue'; import ContentDivider from '@/components/generic-components/content/ContentDivider.vue'; -import SectionBanner from '@/components/generic-components/banners/SectionBanner.vue'; +import ActorRelatedContent from './ActorRelatedContent.vue'; import ThematicChip from '@/components/generic-components/content/ThematicChip.vue'; import { useApplicationStore } from '@/stores/applicationStore'; import { useUserStore } from '@/stores/userStore'; @@ -91,13 +88,26 @@ function editActor(id: string) { flex-wrap: wrap; padding-right: 1em; } +@media (max-width: 600px) { + .ActorPage__leftBlock { + width: 100%; + } +} .ActorPage__rightBlock { display: flex; flex-direction: column; width: 30%; flex-wrap: wrap; } +@media (max-width: 600px) { + .ActorPage__rightBlock { + width: 100%; + } +} .ActorPage { + &__logo { + max-width: 100%; + } &__contentCard { display: flex; padding: 1.5em; diff --git a/vue/src/components/views-components/actors/ActorRelatedContent.vue b/vue/src/components/views-components/actors/ActorRelatedContent.vue new file mode 100644 index 00000000..f818bd94 --- /dev/null +++ b/vue/src/components/views-components/actors/ActorRelatedContent.vue @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/vue/src/components/views/ActorsView.vue b/vue/src/components/views/ActorsView.vue index 93b8689a..d819221c 100644 --- a/vue/src/components/views/ActorsView.vue +++ b/vue/src/components/views/ActorsView.vue @@ -19,7 +19,7 @@
-
+
{{ $t('actors.add') }}
@@ -48,17 +48,13 @@ import Wip from '@/components/generic-components/global/Wip.vue'; import ActorCard from '@/components/views-components/actors/ActorCard.vue'; import { useApplicationStore } from '@/stores/applicationStore'; import { useUserStore } from '@/stores/userStore'; -import { computed, ref } from 'vue'; -import { useRouter } from 'vue-router'; +import { computed, onMounted, ref } from 'vue'; import { UserRoles } from '@/models/enums/auth/UserRoles'; - -const router = useRouter(); +; const appStore = useApplicationStore(); const actorsStore = useActorsStore(); const userStore = useUserStore(); -// const validatedActors = computed(() => actorsStore.actors.filter(x => x.isValidated)); - const page = ref(1); const itemsPerPage = appStore.mobile ? 5 : 15 const paginatedActors = computed(() => {