merge-upstream-5.0.1 #66

Merged
778a69cd merged 80 commits from merge-upstream-5.0.1 into main 2024-12-26 12:55:41 +01:00
6 changed files with 52 additions and 9 deletions
Showing only changes of commit 04fe44f72b - Show all commits

View file

@ -1,6 +1,6 @@
<template> <template>
<group-section <group-section
:title="t('Events')" :title="longEvent ? t('Activities') : t('Events')"
icon="calendar" icon="calendar"
:route="{ :route="{
name: RouteName.GROUP_EVENTS, name: RouteName.GROUP_EVENTS,
@ -13,13 +13,19 @@
v-if="group && group.organizedEvents.total > 0" v-if="group && group.organizedEvents.total > 0"
> >
<event-minimalist-card <event-minimalist-card
v-for="event in group.organizedEvents.elements.slice(0, 3)" v-for="event in group.organizedEvents.elements
.filter((event) => (longEvent ? event.longEvent : !event.longEvent))
.slice(0, 3)"
:event="event" :event="event"
:key="event.uuid" :key="event.uuid"
/> />
</div> </div>
<empty-content v-else-if="group" icon="calendar" :inline="true"> <empty-content v-else-if="group" icon="calendar" :inline="true"
{{ t("No public upcoming events") }} >{{
longEvent
? t("No public upcoming activities")
: t("No public upcoming events")
}}
</empty-content> </empty-content>
<!-- <o-skeleton animated v-else></o-skeleton> --> <!-- <o-skeleton animated v-else></o-skeleton> -->
</template> </template>
@ -33,7 +39,9 @@
params: { preferredUsername: usernameWithDomain(group) }, params: { preferredUsername: usernameWithDomain(group) },
query: { showPassedEvents: true }, query: { showPassedEvents: true },
}" }"
>{{ t("View past events") }}</o-button >{{
longEvent ? t("+ View past activities") : t("+ View past events")
}}</o-button
> >
<o-button <o-button
tag="router-link" tag="router-link"
@ -43,7 +51,9 @@
query: { actorId: group?.id }, query: { actorId: group?.id },
}" }"
class="button is-primary" class="button is-primary"
>{{ t("+ Create an event") }}</o-button >{{
longEvent ? t("+ Create an activity") : t("+ Create an event")
}}</o-button
> >
</template> </template>
</group-section> </group-section>
@ -60,5 +70,9 @@ import GroupSection from "@/components/Group/GroupSection.vue";
const { t } = useI18n({ useScope: "global" }); const { t } = useI18n({ useScope: "global" });
defineProps<{ group: IGroup; isModerator: boolean }>(); defineProps<{
group: IGroup;
isModerator: boolean;
longEvent: boolean;
}>();
</script> </script>

View file

@ -150,6 +150,7 @@ export const GROUP_BASIC_FIELDS_FRAGMENTS = gql`
beginsOn beginsOn
status status
draft draft
longEvent
language language
options { options {
maximumAttendeeCapacity maximumAttendeeCapacity

View file

@ -70,6 +70,7 @@ export const SEARCH_EVENTS_AND_GROUPS = gql`
uuid uuid
beginsOn beginsOn
endsOn endsOn
longEvent
picture { picture {
id id
url url

View file

@ -6,7 +6,10 @@
"+ Add a resource": "+ Ajouter une ressource", "+ Add a resource": "+ Ajouter une ressource",
"+ Create a post": "+ Créer un billet", "+ Create a post": "+ Créer un billet",
"+ Create an event": "+ Créer un événement", "+ Create an event": "+ Créer un événement",
"+ Create an activity": "+ Créer une activité",
"+ Start a discussion": "+ Lancer une discussion", "+ Start a discussion": "+ Lancer une discussion",
"+ View past activities": "+ Voir les activités passées",
"+ View past events": "+ Voir les événements passés",
"0 Bytes": "0 octets", "0 Bytes": "0 octets",
"<b>{contact}</b> will be displayed as contact.": "<b>{contact}</b> sera affiché·e comme contact.|<b>{contact}</b> seront affiché·e·s comme contacts.", "<b>{contact}</b> will be displayed as contact.": "<b>{contact}</b> sera affiché·e comme contact.|<b>{contact}</b> seront affiché·e·s comme contacts.",
"@{group}": "@{group}", "@{group}": "@{group}",
@ -778,6 +781,7 @@
"No posts found": "Aucun billet trouvé", "No posts found": "Aucun billet trouvé",
"No posts yet": "Pas encore de billets", "No posts yet": "Pas encore de billets",
"No profile matches the filters": "Aucun profil ne correspond aux filtres", "No profile matches the filters": "Aucun profil ne correspond aux filtres",
"No public upcoming activities": "Aucune activité publique à venir",
"No public upcoming events": "Aucun événement public à venir", "No public upcoming events": "Aucun événement public à venir",
"No resolved reports yet": "Aucun signalement résolu pour le moment", "No resolved reports yet": "Aucun signalement résolu pour le moment",
"No resources in this folder": "Aucune ressource dans ce dossier", "No resources in this folder": "Aucune ressource dans ce dossier",
@ -1356,6 +1360,7 @@
"View more groups around {position}": "Voir plus de groupes près de {position}", "View more groups around {position}": "Voir plus de groupes près de {position}",
"View more online events": "Voir plus d'événements en ligne", "View more online events": "Voir plus d'événements en ligne",
"View page on {hostname} (in a new window)": "Voir la page sur {hostname} (dans une nouvelle fenêtre)", "View page on {hostname} (in a new window)": "Voir la page sur {hostname} (dans une nouvelle fenêtre)",
"View past activities": "Voir les activités passées",
"View past events": "Voir les événements passés", "View past events": "Voir les événements passés",
"View the group profile on the original instance": "Afficher le profil du groupe sur l'instance d'origine", "View the group profile on the original instance": "Afficher le profil du groupe sur l'instance d'origine",
"Visibility was set to an unknown value.": "La visibilité a été définie à une valeur inconnue.", "Visibility was set to an unknown value.": "La visibilité a été définie à une valeur inconnue.",
@ -1548,6 +1553,7 @@
"as {identity}": "en tant que {identity}", "as {identity}": "en tant que {identity}",
"contact uninformed": "contact non renseigné", "contact uninformed": "contact non renseigné",
"create a group": "créer un groupe", "create a group": "créer un groupe",
"create an activity": "créer une activité",
"create an event": "créer un événement", "create an event": "créer un événement",
"default Mobilizon privacy policy": "politique de confidentialité par défaut de Mobilizon", "default Mobilizon privacy policy": "politique de confidentialité par défaut de Mobilizon",
"default Mobilizon terms": "conditions d'utilisation par défaut de Mobilizon", "default Mobilizon terms": "conditions d'utilisation par défaut de Mobilizon",

View file

@ -71,6 +71,7 @@ export interface IEvent {
beginsOn: string; beginsOn: string;
endsOn: string | null; endsOn: string | null;
publishAt: string; publishAt: string;
longEvent: boolean;
status: EventStatus; status: EventStatus;
visibility: EventVisibility; visibility: EventVisibility;
joinOptions: EventJoinOptions; joinOptions: EventJoinOptions;
@ -144,6 +145,8 @@ export class EventModel implements IEvent {
publishAt = new Date().toISOString(); publishAt = new Date().toISOString();
longEvent = false;
language = "und"; language = "und";
participantStats = { participantStats = {

View file

@ -373,7 +373,7 @@
</div> </div>
</header> </header>
</div> </div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-2 mb-2"> <div v-if="group" class="grid grid-cols-1 md:grid-cols-3 gap-2 mb-2">
<!-- Public thing: Members --> <!-- Public thing: Members -->
<group-section :title="t('Members')" icon="account-group"> <group-section :title="t('Members')" icon="account-group">
<template #default> <template #default>
@ -526,11 +526,24 @@
</group-section> </group-section>
</div> </div>
<div v-if="group"> <div v-if="group">
<div class="grid grid-cols-1 md:grid-cols-2 gap-2 mb-2"> <div
:class="[
'grid grid-cols-1 gap-2 mb-2',
{ 'xl:grid-cols-3': isLongEvents, 'md:grid-cols-2': !isLongEvents },
]"
>
<!-- Public thing: Long Events -->
<Events
v-if="isLongEvents"
:group="group"
:isModerator="isCurrentActorAGroupModerator && !previewPublic"
:longEvent="true"
/>
<!-- Public thing: Events --> <!-- Public thing: Events -->
<Events <Events
:group="group" :group="group"
:isModerator="isCurrentActorAGroupModerator && !previewPublic" :isModerator="isCurrentActorAGroupModerator && !previewPublic"
:longEvent="false"
/> />
<!-- Public thing: Posts --> <!-- Public thing: Posts -->
<Posts <Posts
@ -538,6 +551,8 @@
:isModerator="isCurrentActorAGroupModerator && !previewPublic" :isModerator="isCurrentActorAGroupModerator && !previewPublic"
:isMember="isCurrentActorAGroupMember && !previewPublic" :isMember="isCurrentActorAGroupMember && !previewPublic"
/> />
</div>
<div class="grid grid-cols-1 gap-2 mb-2 md:grid-cols-2">
<!-- Private thing: Group discussions --> <!-- Private thing: Group discussions -->
<Discussions <Discussions
v-if="isCurrentActorAGroupMember && !previewPublic" v-if="isCurrentActorAGroupMember && !previewPublic"
@ -656,6 +671,7 @@ import { Notifier } from "@/plugins/notifier";
import { useGroupResourcesList } from "@/composition/apollo/resources"; import { useGroupResourcesList } from "@/composition/apollo/resources";
import { useGroupMembers } from "@/composition/apollo/members"; import { useGroupMembers } from "@/composition/apollo/members";
import GroupSection from "@/components/Group/GroupSection.vue"; import GroupSection from "@/components/Group/GroupSection.vue";
import { useIsLongEvents } from "@/composition/apollo/config";
const props = defineProps<{ const props = defineProps<{
preferredUsername: string; preferredUsername: string;
@ -680,6 +696,8 @@ const { group: resourcesGroup } = useGroupResourcesList(preferredUsername, {
const { t } = useI18n({ useScope: "global" }); const { t } = useI18n({ useScope: "global" });
const { isLongEvents } = useIsLongEvents();
// const { person } = usePersonStatusGroup(group); // const { person } = usePersonStatusGroup(group);
const { result, subscribeToMore } = useQuery<{ const { result, subscribeToMore } = useQuery<{