Refactor GraphQL queries and event cards

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-10-29 10:54:35 +02:00
parent 807b1084b0
commit ea4116c207
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
27 changed files with 376 additions and 686 deletions

View file

@ -40,6 +40,22 @@
</div> </div>
<div class="media-content"> <div class="media-content">
<p class="event-title" :title="event.title">{{ event.title }}</p> <p class="event-title" :title="event.title">{{ event.title }}</p>
<div class="event-organizer">
<figure
class="image is-24x24"
v-if="organizer(event) && organizer(event).avatar"
>
<img
class="is-rounded"
:src="organizer(event).avatar.url"
alt=""
/>
</figure>
<b-icon v-else icon="account-circle" />
<span class="organizer-name">
{{ organizerDisplayName(event) }}
</span>
</div>
<div <div
class="event-subtitle" class="event-subtitle"
v-if="event.physicalAddress" v-if="event.physicalAddress"
@ -49,7 +65,7 @@
: event.physicalAddress.description : event.physicalAddress.description
" "
> >
<!-- <p>{{ $t('By @{username}', { username: actor.preferredUsername }) }}</p>--> <b-icon icon="map-marker" />
<span v-if="isDescriptionDifferentFromLocality"> <span v-if="isDescriptionDifferentFromLocality">
{{ event.physicalAddress.description }}, {{ event.physicalAddress.description }},
{{ event.physicalAddress.locality }} {{ event.physicalAddress.locality }}
@ -58,6 +74,13 @@
{{ event.physicalAddress.description }} {{ event.physicalAddress.description }}
</span> </span>
</div> </div>
<div
class="event-subtitle"
v-else-if="event.options && event.options.isOnline"
>
<b-icon icon="video" />
<span>{{ $t("Online") }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -100,7 +123,12 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { IEvent, IEventCardOptions } from "@/types/event.model"; import {
IEvent,
IEventCardOptions,
organizerDisplayName,
organizer,
} from "@/types/event.model";
import { Component, Prop, Vue } from "vue-property-decorator"; import { Component, Prop, Vue } from "vue-property-decorator";
import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue"; import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue";
import LazyImageWrapper from "@/components/Image/LazyImageWrapper.vue"; import LazyImageWrapper from "@/components/Image/LazyImageWrapper.vue";
@ -125,6 +153,10 @@ export default class EventCard extends Vue {
RouteName = RouteName; RouteName = RouteName;
organizerDisplayName = organizerDisplayName;
organizer = organizer;
defaultOptions: IEventCardOptions = { defaultOptions: IEventCardOptions = {
hideDate: false, hideDate: false,
loggedPerson: false, loggedPerson: false,
@ -236,35 +268,58 @@ a.card {
margin-bottom: 15px; margin-bottom: 15px;
margin-left: 0rem; margin-left: 0rem;
} }
& > .media-content {
flex: 1;
width: 100%;
overflow-x: inherit;
}
} }
.event-title { .event-title {
font-size: 1.2rem; font-size: 18px;
line-height: 1.25rem; line-height: 24px;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 3;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
min-height: 2.4rem; // min-height: 2.4rem;
font-weight: bold; font-weight: bold;
} }
.event-organizer {
display: flex;
align-items: center;
padding-top: 8px;
.organizer-name {
font-size: 14px;
padding-left: 5px;
font-weight: 600;
}
}
.event-subtitle { .event-subtitle {
font-size: 0.85rem; font-size: 0.85rem;
display: inline-flex; display: flex;
flex-wrap: wrap; align-items: center;
// flex-wrap: wrap;
color: #3c376e; color: #3c376e;
span { span:not(.icon) {
width: 14rem; padding-left: 5px;
display: block;
overflow: hidden;
flex-grow: 1;
text-overflow: ellipsis;
white-space: nowrap;
} }
// span {
// width: 14rem;
// display: block;
// overflow: hidden;
// flex-grow: 1;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
} }
} }
} }

View file

@ -0,0 +1,46 @@
<template>
<div class="multi-card-event">
<event-card
class="event-card"
v-for="event in events"
:event="event"
:key="event.uuid"
/>
</div>
</template>
<script lang="ts">
import { IEvent } from "@/types/event.model";
import { PropType } from "vue";
import { Component, Prop, Vue } from "vue-property-decorator";
import EventCard from "./EventCard.vue";
@Component({
components: {
EventCard,
},
})
export default class MultiCard extends Vue {
@Prop({ type: Array as PropType<IEvent[]>, required: true })
events!: IEvent[];
}
</script>
<style lang="scss" scoped>
.multi-card-event {
display: grid;
grid-auto-rows: 1fr;
grid-column-gap: 30px;
grid-row-gap: 30px;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
// @media (min-width: 400px) {
// grid-template-columns: repeat(2, 1fr);
// }
// @media (min-width: 800px) {
// grid-template-columns: repeat(4, 1fr);
// }
.event-card {
height: 100%;
display: flex;
flex-direction: column;
}
}
</style>

View file

@ -63,12 +63,14 @@ export default class LazyImage extends Vue {
onEnter(): void { onEnter(): void {
// Image is visible (means: has entered the viewport), // Image is visible (means: has entered the viewport),
// so start loading by setting the src attribute // so start loading by setting the src attribute
this.image.src = this.src; if (this.image) {
this.image.src = this.src;
this.image.onload = () => { this.image.onload = () => {
// Image is loaded, so start fading in // Image is loaded, so start fading in
this.isLoaded = true; this.isLoaded = true;
}; };
}
} }
@Watch("src") @Watch("src")

View file

@ -208,12 +208,8 @@ import RouteName from "../router/name";
@Component({ @Component({
apollo: { apollo: {
currentUser: { currentUser: CURRENT_USER_CLIENT,
query: CURRENT_USER_CLIENT, currentActor: CURRENT_ACTOR_CLIENT,
},
currentActor: {
query: CURRENT_ACTOR_CLIENT,
},
identities: { identities: {
query: IDENTITIES, query: IDENTITIES,
update: ({ identities }) => update: ({ identities }) =>

View file

@ -1,14 +1,25 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
export const ACTOR_FRAGMENT = gql`
fragment ActorFragment on Actor {
id
avatar {
id
url
}
type
preferredUsername
name
domain
summary
url
}
`;
export const FETCH_PERSON = gql` export const FETCH_PERSON = gql`
query ($username: String!) { query ($username: String!) {
fetchPerson(preferredUsername: $username) { fetchPerson(preferredUsername: $username) {
id ...ActorFragment
url
name
domain
summary
preferredUsername
suspended suspended
mediaSize mediaSize
avatar { avatar {
@ -34,6 +45,7 @@ export const FETCH_PERSON = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const GET_PERSON = gql` export const GET_PERSON = gql`
@ -47,12 +59,7 @@ export const GET_PERSON = gql`
$membershipsLimit: Int $membershipsLimit: Int
) { ) {
person(id: $actorId) { person(id: $actorId) {
id ...ActorFragment
url
name
domain
summary
preferredUsername
suspended suspended
mediaSize mediaSize
avatar { avatar {
@ -98,14 +105,7 @@ export const GET_PERSON = gql`
role role
insertedAt insertedAt
parent { parent {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
} }
} }
@ -115,6 +115,7 @@ export const GET_PERSON = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const PERSON_FRAGMENT = gql` export const PERSON_FRAGMENT = gql`
@ -126,6 +127,7 @@ export const PERSON_FRAGMENT = gql`
} }
type type
preferredUsername preferredUsername
domain
name name
} }
`; `;
@ -151,17 +153,11 @@ export const LIST_PROFILES = gql`
) { ) {
total total
elements { elements {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const UPDATE_DEFAULT_ACTOR = gql` export const UPDATE_DEFAULT_ACTOR = gql`
@ -179,12 +175,9 @@ export const CURRENT_ACTOR_CLIENT = gql`
query currentActor { query currentActor {
currentActor @client { currentActor @client {
id id
avatar {
id
url
}
preferredUsername preferredUsername
name name
avatar
} }
} }
`; `;
@ -234,27 +227,10 @@ export const LOGGED_USER_PARTICIPATIONS = gql`
beginsOn beginsOn
visibility visibility
organizerActor { organizerActor {
id ...ActorFragment
preferredUsername
name
domain
summary
avatar {
id
url
}
} }
attributedTo { attributedTo {
avatar { ...ActorFragment
id
url
}
preferredUsername
name
summary
domain
url
id
} }
participantStats { participantStats {
going going
@ -274,20 +250,13 @@ export const LOGGED_USER_PARTICIPATIONS = gql`
id id
role role
actor { actor {
id ...ActorFragment
preferredUsername
name
domain
summary
avatar {
id
url
}
} }
} }
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const LOGGED_USER_DRAFTS = gql` export const LOGGED_USER_DRAFTS = gql`
@ -306,14 +275,7 @@ export const LOGGED_USER_DRAFTS = gql`
beginsOn beginsOn
visibility visibility
organizerActor { organizerActor {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
participantStats { participantStats {
going going
@ -326,6 +288,7 @@ export const LOGGED_USER_DRAFTS = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const LOGGED_USER_MEMBERSHIPS = gql` export const LOGGED_USER_MEMBERSHIPS = gql`
@ -338,25 +301,10 @@ export const LOGGED_USER_MEMBERSHIPS = gql`
id id
role role
actor { actor {
id ...ActorFragment
avatar {
id
url
}
preferredUsername
name
domain
} }
parent { parent {
id ...ActorFragment
preferredUsername
domain
name
type
avatar {
id
url
}
organizedEvents { organizedEvents {
elements { elements {
id id
@ -370,34 +318,22 @@ export const LOGGED_USER_MEMBERSHIPS = gql`
} }
} }
invitedBy { invitedBy {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
} }
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const IDENTITIES = gql` export const IDENTITIES = gql`
query Identities { query Identities {
identities { identities {
id ...ActorFragment
avatar {
id
url
}
type
preferredUsername
name
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const PERSON_MEMBERSHIPS = gql` export const PERSON_MEMBERSHIPS = gql`
@ -410,20 +346,10 @@ export const PERSON_MEMBERSHIPS = gql`
id id
role role
parent { parent {
id ...ActorFragment
preferredUsername
name
domain
type
avatar {
id
url
}
} }
invitedBy { invitedBy {
id ...ActorFragment
preferredUsername
name
} }
insertedAt insertedAt
updatedAt updatedAt
@ -431,6 +357,7 @@ export const PERSON_MEMBERSHIPS = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const PERSON_STATUS_GROUP = gql` export const PERSON_STATUS_GROUP = gql`
@ -443,19 +370,10 @@ export const PERSON_STATUS_GROUP = gql`
id id
role role
parent { parent {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
invitedBy { invitedBy {
id ...ActorFragment
preferredUsername
name
} }
insertedAt insertedAt
updatedAt updatedAt
@ -468,24 +386,10 @@ export const PERSON_STATUS_GROUP = gql`
notify notify
approved approved
target_actor { target_actor {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
actor { actor {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
insertedAt insertedAt
updatedAt updatedAt
@ -493,6 +397,7 @@ export const PERSON_STATUS_GROUP = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const GROUP_MEMBERSHIP_SUBSCRIPTION_CHANGED = gql` export const GROUP_MEMBERSHIP_SUBSCRIPTION_CHANGED = gql`
@ -508,19 +413,10 @@ export const GROUP_MEMBERSHIP_SUBSCRIPTION_CHANGED = gql`
id id
role role
parent { parent {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
invitedBy { invitedBy {
id ...ActorFragment
preferredUsername
name
} }
insertedAt insertedAt
updatedAt updatedAt
@ -528,6 +424,7 @@ export const GROUP_MEMBERSHIP_SUBSCRIPTION_CHANGED = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const CREATE_PERSON = gql` export const CREATE_PERSON = gql`
@ -543,16 +440,10 @@ export const CREATE_PERSON = gql`
summary: $summary summary: $summary
avatar: $avatar avatar: $avatar
) { ) {
id ...ActorFragment
preferredUsername
name
summary
avatar {
id
url
}
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const UPDATE_PERSON = gql` export const UPDATE_PERSON = gql`
@ -563,16 +454,10 @@ export const UPDATE_PERSON = gql`
$avatar: MediaInput $avatar: MediaInput
) { ) {
updatePerson(id: $id, name: $name, summary: $summary, avatar: $avatar) { updatePerson(id: $id, name: $name, summary: $summary, avatar: $avatar) {
id ...ActorFragment
preferredUsername
name
summary
avatar {
id
url
}
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const DELETE_PERSON = gql` export const DELETE_PERSON = gql`
@ -600,16 +485,10 @@ export const REGISTER_PERSON = gql`
summary: $summary summary: $summary
email: $email email: $email
) { ) {
id ...ActorFragment
preferredUsername
name
summary
avatar {
id
url
}
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const SUSPEND_PROFILE = gql` export const SUSPEND_PROFILE = gql`

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const DASHBOARD = gql` export const DASHBOARD = gql`
query { query {
@ -14,14 +15,7 @@ export const DASHBOARD = gql`
} }
} }
lastGroupCreated { lastGroupCreated {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
numberOfUsers numberOfUsers
numberOfEvents numberOfEvents
@ -33,31 +27,23 @@ export const DASHBOARD = gql`
numberOfConfirmedParticipationsToLocalEvents numberOfConfirmedParticipationsToLocalEvents
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const RELAY_FRAGMENT = gql` export const RELAY_FRAGMENT = gql`
fragment relayFragment on Follower { fragment relayFragment on Follower {
id id
actor { actor {
id ...ActorFragment
preferredUsername
name
domain
type
summary
} }
targetActor { targetActor {
id ...ActorFragment
preferredUsername
name
domain
type
summary
} }
approved approved
insertedAt insertedAt
updatedAt updatedAt
} }
${ACTOR_FRAGMENT}
`; `;
export const RELAY_FOLLOWERS = gql` export const RELAY_FOLLOWERS = gql`

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const COMMENT_FIELDS_FRAGMENT_NAME = "CommentFields"; export const COMMENT_FIELDS_FRAGMENT_NAME = "CommentFields";
export const COMMENT_FIELDS_FRAGMENT = gql` export const COMMENT_FIELDS_FRAGMENT = gql`
@ -10,15 +11,7 @@ export const COMMENT_FIELDS_FRAGMENT = gql`
visibility visibility
local local
actor { actor {
avatar { ...ActorFragment
id
url
}
id
domain
preferredUsername
name
summary
} }
totalReplies totalReplies
insertedAt insertedAt
@ -26,6 +19,7 @@ export const COMMENT_FIELDS_FRAGMENT = gql`
deletedAt deletedAt
isAnnouncement isAnnouncement
} }
${ACTOR_FRAGMENT}
`; `;
export const COMMENT_RECURSIVE_FRAGMENT = gql` export const COMMENT_RECURSIVE_FRAGMENT = gql`

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const DISCUSSION_BASIC_FIELDS_FRAGMENT = gql` export const DISCUSSION_BASIC_FIELDS_FRAGMENT = gql`
fragment DiscussionBasicFields on Discussion { fragment DiscussionBasicFields on Discussion {
@ -11,18 +12,13 @@ export const DISCUSSION_BASIC_FIELDS_FRAGMENT = gql`
id id
text text
actor { actor {
id ...ActorFragment
preferredUsername
domain
avatar {
id
url
}
} }
publishedAt publishedAt
deletedAt deletedAt
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const DISCUSSION_FIELDS_FOR_REPLY_FRAGMENT = gql` export const DISCUSSION_FIELDS_FOR_REPLY_FRAGMENT = gql`
@ -35,26 +31,17 @@ export const DISCUSSION_FIELDS_FOR_REPLY_FRAGMENT = gql`
text text
updatedAt updatedAt
actor { actor {
id ...ActorFragment
preferredUsername
domain
avatar {
id
url
}
} }
} }
actor { actor {
id ...ActorFragment
preferredUsername
domain
} }
creator { creator {
id ...ActorFragment
preferredUsername
domain
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const DISCUSSION_FIELDS_FRAGMENT = gql` export const DISCUSSION_FIELDS_FRAGMENT = gql`
@ -70,28 +57,17 @@ export const DISCUSSION_FIELDS_FRAGMENT = gql`
deletedAt deletedAt
publishedAt publishedAt
actor { actor {
id ...ActorFragment
domain
name
preferredUsername
avatar {
url
}
} }
} }
actor { actor {
id ...ActorFragment
domain
name
preferredUsername
} }
creator { creator {
id ...ActorFragment
domain
name
preferredUsername
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const CREATE_DISCUSSION = gql` export const CREATE_DISCUSSION = gql`
@ -121,14 +97,7 @@ export const GET_DISCUSSION = gql`
id id
text text
actor { actor {
id ...ActorFragment
avatar {
id
url
}
name
domain
preferredUsername
} }
insertedAt insertedAt
updatedAt updatedAt
@ -140,6 +109,7 @@ export const GET_DISCUSSION = gql`
} }
} }
${DISCUSSION_FIELDS_FRAGMENT} ${DISCUSSION_FIELDS_FRAGMENT}
${ACTOR_FRAGMENT}
`; `;
export const UPDATE_DISCUSSION = gql` export const UPDATE_DISCUSSION = gql`
@ -171,16 +141,10 @@ export const DISCUSSION_COMMENT_CHANGED = gql`
deletedAt deletedAt
publishedAt publishedAt
actor { actor {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
import { ADDRESS_FRAGMENT } from "./address"; import { ADDRESS_FRAGMENT } from "./address";
import { TAG_FRAGMENT } from "./tags"; import { TAG_FRAGMENT } from "./tags";
@ -7,14 +8,7 @@ const PARTICIPANT_QUERY_FRAGMENT = gql`
role role
id id
actor { actor {
preferredUsername ...ActorFragment
avatar {
id
url
}
name
id
domain
} }
event { event {
id id
@ -26,6 +20,7 @@ const PARTICIPANT_QUERY_FRAGMENT = gql`
} }
insertedAt insertedAt
} }
${ACTOR_FRAGMENT}
`; `;
const PARTICIPANTS_QUERY_FRAGMENT = gql` const PARTICIPANTS_QUERY_FRAGMENT = gql`
@ -38,7 +33,7 @@ const PARTICIPANTS_QUERY_FRAGMENT = gql`
${PARTICIPANT_QUERY_FRAGMENT} ${PARTICIPANT_QUERY_FRAGMENT}
`; `;
const EVENT_OPTIONS_FRAGMENT = gql` export const EVENT_OPTIONS_FRAGMENT = gql`
fragment EventOptions on EventOptions { fragment EventOptions on EventOptions {
maximumAttendeeCapacity maximumAttendeeCapacity
remainingAttendeeCapacity remainingAttendeeCapacity
@ -97,40 +92,13 @@ const FULL_EVENT_FRAGMENT = gql`
...AdressFragment ...AdressFragment
} }
organizerActor { organizerActor {
avatar { ...ActorFragment
id
url
}
preferredUsername
domain
name
url
id
summary
} }
contacts { contacts {
avatar { ...ActorFragment
id
url
}
preferredUsername
name
summary
domain
url
id
} }
attributedTo { attributedTo {
avatar { ...ActorFragment
id
url
}
preferredUsername
name
summary
domain
url
id
} }
participantStats { participantStats {
going going
@ -156,18 +124,19 @@ const FULL_EVENT_FRAGMENT = gql`
} }
} }
physicalAddress { physicalAddress {
id ...AdressFragment
description
} }
organizerActor { organizerActor {
id ...ActorFragment
avatar { }
id attributedTo {
url ...ActorFragment
} }
preferredUsername options {
domain ...EventOptions
name }
tags {
...TagFragment
} }
} }
options { options {
@ -183,6 +152,7 @@ const FULL_EVENT_FRAGMENT = gql`
${ADDRESS_FRAGMENT} ${ADDRESS_FRAGMENT}
${TAG_FRAGMENT} ${TAG_FRAGMENT}
${EVENT_OPTIONS_FRAGMENT} ${EVENT_OPTIONS_FRAGMENT}
${ACTOR_FRAGMENT}
`; `;
export const FETCH_EVENT = gql` export const FETCH_EVENT = gql`
@ -244,36 +214,28 @@ export const FETCH_EVENTS = gql`
# online_address, # online_address,
# phone_address, # phone_address,
physicalAddress { physicalAddress {
id ...AdressFragment
description
locality
} }
organizerActor { organizerActor {
id ...ActorFragment
avatar {
id
url
}
preferredUsername
domain
name
} }
attributedTo { attributedTo {
avatar { ...ActorFragment
id
url
}
preferredUsername
name
} }
category category
tags { tags {
...TagFragment ...TagFragment
} }
options {
...EventOptions
}
} }
} }
} }
${ADDRESS_FRAGMENT}
${TAG_FRAGMENT} ${TAG_FRAGMENT}
${EVENT_OPTIONS_FRAGMENT}
${ACTOR_FRAGMENT}
`; `;
export const CREATE_EVENT = gql` export const CREATE_EVENT = gql`
@ -514,10 +476,7 @@ export const FETCH_GROUP_EVENTS = gql`
$organisedEventslimit: Int $organisedEventslimit: Int
) { ) {
group(preferredUsername: $name) { group(preferredUsername: $name) {
id ...ActorFragment
preferredUsername
domain
name
organizedEvents( organizedEvents(
afterDatetime: $afterDateTime afterDatetime: $afterDateTime
beforeDatetime: $beforeDateTime beforeDatetime: $beforeDateTime
@ -538,22 +497,17 @@ export const FETCH_GROUP_EVENTS = gql`
notApproved notApproved
} }
attributedTo { attributedTo {
id ...ActorFragment
preferredUsername
name
domain
} }
organizerActor { organizerActor {
id ...ActorFragment
preferredUsername
name
domain
} }
} }
total total
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const CLOSE_EVENTS = gql` export const CLOSE_EVENTS = gql`
@ -570,13 +524,28 @@ export const CLOSE_EVENTS = gql`
url url
} }
tags { tags {
slug ...TagFragment
title }
options {
...EventOptions
}
physicalAddress {
...AdressFragment
}
attributedTo {
...ActorFragment
}
organizerActor {
...ActorFragment
} }
__typename __typename
} }
} }
} }
${ADDRESS_FRAGMENT}
${TAG_FRAGMENT}
${EVENT_OPTIONS_FRAGMENT}
${ACTOR_FRAGMENT}
`; `;
export const EXPORT_EVENT_PARTICIPATIONS = gql` export const EXPORT_EVENT_PARTICIPATIONS = gql`

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const GROUP_FOLLOWERS = gql` export const GROUP_FOLLOWERS = gql`
query ( query (
@ -8,10 +9,7 @@ export const GROUP_FOLLOWERS = gql`
$approved: Boolean $approved: Boolean
) { ) {
group(preferredUsername: $name) { group(preferredUsername: $name) {
id ...ActorFragment
preferredUsername
name
domain
followers( followers(
page: $followersPage page: $followersPage
limit: $followersLimit limit: $followersLimit
@ -21,14 +19,7 @@ export const GROUP_FOLLOWERS = gql`
elements { elements {
id id
actor { actor {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
approved approved
insertedAt insertedAt
@ -37,6 +28,7 @@ export const GROUP_FOLLOWERS = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const UPDATE_FOLLOWER = gql` export const UPDATE_FOLLOWER = gql`

View file

@ -2,6 +2,7 @@ import gql from "graphql-tag";
import { DISCUSSION_BASIC_FIELDS_FRAGMENT } from "./discussion"; import { DISCUSSION_BASIC_FIELDS_FRAGMENT } from "./discussion";
import { RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT } from "./resources"; import { RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT } from "./resources";
import { POST_BASIC_FIELDS } from "./post"; import { POST_BASIC_FIELDS } from "./post";
import { ACTOR_FRAGMENT } from "./actor";
export const LIST_GROUPS = gql` export const LIST_GROUPS = gql`
query ListGroups( query ListGroups(
@ -23,12 +24,7 @@ export const LIST_GROUPS = gql`
limit: $limit limit: $limit
) { ) {
elements { elements {
id ...ActorFragment
url
name
domain
summary
preferredUsername
suspended suspended
avatar { avatar {
id id
@ -51,16 +47,12 @@ export const LIST_GROUPS = gql`
total total
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const GROUP_FIELDS_FRAGMENTS = gql` export const GROUP_FIELDS_FRAGMENTS = gql`
fragment GroupFullFields on Group { fragment GroupFullFields on Group {
id ...ActorFragment
url
name
domain
summary
preferredUsername
suspended suspended
visibility visibility
openness openness
@ -117,16 +109,10 @@ export const GROUP_FIELDS_FRAGMENTS = gql`
notApproved notApproved
} }
attributedTo { attributedTo {
id ...ActorFragment
preferredUsername
name
domain
} }
organizerActor { organizerActor {
id ...ActorFragment
preferredUsername
name
domain
} }
} }
total total
@ -148,14 +134,7 @@ export const GROUP_FIELDS_FRAGMENTS = gql`
id id
role role
actor { actor {
id ...ActorFragment
name
domain
preferredUsername
avatar {
id
url
}
} }
insertedAt insertedAt
} }
@ -197,6 +176,7 @@ export const GROUP_FIELDS_FRAGMENTS = gql`
total total
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const FETCH_GROUP = gql` export const FETCH_GROUP = gql`
@ -263,21 +243,14 @@ export const CREATE_GROUP = gql`
banner: $banner banner: $banner
avatar: $avatar avatar: $avatar
) { ) {
id ...ActorFragment
preferredUsername
name
domain
summary
avatar {
id
url
}
banner { banner {
id id
url url
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const UPDATE_GROUP = gql` export const UPDATE_GROUP = gql`
@ -303,23 +276,17 @@ export const UPDATE_GROUP = gql`
physicalAddress: $physicalAddress physicalAddress: $physicalAddress
manuallyApprovesFollowers: $manuallyApprovesFollowers manuallyApprovesFollowers: $manuallyApprovesFollowers
) { ) {
id ...ActorFragment
preferredUsername
name
summary
visibility visibility
openness openness
manuallyApprovesFollowers manuallyApprovesFollowers
avatar {
id
url
}
banner { banner {
id id
url url
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const DELETE_GROUP = gql` export const DELETE_GROUP = gql`
@ -355,10 +322,7 @@ export const GROUP_TIMELINE = gql`
$limit: Int $limit: Int
) { ) {
group(preferredUsername: $preferredUsername) { group(preferredUsername: $preferredUsername) {
id ...ActorFragment
preferredUsername
domain
name
activity(type: $type, author: $author, page: $page, limit: $limit) { activity(type: $type, author: $author, page: $page, limit: $limit) {
total total
elements { elements {
@ -371,18 +335,10 @@ export const GROUP_TIMELINE = gql`
} }
type type
author { author {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
group { group {
id ...ActorFragment
preferredUsername
} }
object { object {
... on Event { ... on Event {
@ -396,14 +352,7 @@ export const GROUP_TIMELINE = gql`
... on Member { ... on Member {
id id
actor { actor {
id ...ActorFragment
name
preferredUsername
domain
avatar {
id
url
}
} }
} }
... on Resource { ... on Resource {
@ -421,11 +370,7 @@ export const GROUP_TIMELINE = gql`
id id
} }
... on Group { ... on Group {
id ...ActorFragment
preferredUsername
domain
name
summary
visibility visibility
openness openness
physicalAddress { physicalAddress {
@ -433,9 +378,7 @@ export const GROUP_TIMELINE = gql`
} }
banner { banner {
id id
} url
avatar {
id
} }
} }
} }
@ -443,4 +386,5 @@ export const GROUP_TIMELINE = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;

View file

@ -62,7 +62,7 @@ export const HOME_USER_QUERIES = gql`
} }
} }
} }
followGroupEvents { followedGroupEvents {
total total
elements { elements {
profile { profile {

View file

@ -1,31 +1,19 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const MEMBER_FRAGMENT = gql` export const MEMBER_FRAGMENT = gql`
fragment MemberFragment on Member { fragment MemberFragment on Member {
id id
role role
parent { parent {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
actor { actor {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
insertedAt insertedAt
} }
${ACTOR_FRAGMENT}
`; `;
export const INVITE_MEMBER = gql` export const INVITE_MEMBER = gql`
@ -57,24 +45,13 @@ export const REJECT_INVITATION = gql`
export const GROUP_MEMBERS = gql` export const GROUP_MEMBERS = gql`
query ($name: String!, $roles: String, $page: Int, $limit: Int) { query ($name: String!, $roles: String, $page: Int, $limit: Int) {
group(preferredUsername: $name) { group(preferredUsername: $name) {
id ...ActorFragment
url
name
domain
preferredUsername
members(page: $page, limit: $limit, roles: $roles) { members(page: $page, limit: $limit, roles: $roles) {
elements { elements {
id id
role role
actor { actor {
id ...ActorFragment
name
domain
preferredUsername
avatar {
id
url
}
} }
insertedAt insertedAt
} }
@ -82,6 +59,7 @@ export const GROUP_MEMBERS = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const UPDATE_MEMBER = gql` export const UPDATE_MEMBER = gql`

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
import { TAG_FRAGMENT } from "./tags"; import { TAG_FRAGMENT } from "./tags";
export const POST_FRAGMENT = gql` export const POST_FRAGMENT = gql`
@ -10,24 +11,10 @@ export const POST_FRAGMENT = gql`
body body
draft draft
author { author {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
attributedTo { attributedTo {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
insertedAt insertedAt
updatedAt updatedAt
@ -49,6 +36,7 @@ export const POST_FRAGMENT = gql`
} }
} }
${TAG_FRAGMENT} ${TAG_FRAGMENT}
${ACTOR_FRAGMENT}
`; `;
export const POST_BASIC_FIELDS = gql` export const POST_BASIC_FIELDS = gql`
@ -58,24 +46,10 @@ export const POST_BASIC_FIELDS = gql`
slug slug
url url
author { author {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
attributedTo { attributedTo {
id ...ActorFragment
preferredUsername
name
domain
avatar {
id
url
}
} }
insertedAt insertedAt
updatedAt updatedAt
@ -88,15 +62,13 @@ export const POST_BASIC_FIELDS = gql`
name name
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const FETCH_GROUP_POSTS = gql` export const FETCH_GROUP_POSTS = gql`
query GroupPosts($preferredUsername: String!, $page: Int, $limit: Int) { query GroupPosts($preferredUsername: String!, $page: Int, $limit: Int) {
group(preferredUsername: $preferredUsername) { group(preferredUsername: $preferredUsername) {
id ...ActorFragment
preferredUsername
domain
name
posts(page: $page, limit: $limit) { posts(page: $page, limit: $limit) {
total total
elements { elements {

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const REPORTS = gql` export const REPORTS = gql`
query Reports($status: ReportStatus, $page: Int, $limit: Int) { query Reports($status: ReportStatus, $page: Int, $limit: Int) {
@ -7,25 +8,10 @@ export const REPORTS = gql`
elements { elements {
id id
reported { reported {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
reporter { reporter {
id ...ActorFragment
preferredUsername
name
avatar {
id
url
}
domain
type
} }
event { event {
id id
@ -41,31 +27,17 @@ export const REPORTS = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
const REPORT_FRAGMENT = gql` const REPORT_FRAGMENT = gql`
fragment ReportFragment on Report { fragment ReportFragment on Report {
id id
reported { reported {
id ...ActorFragment
preferredUsername
name
avatar {
id
url
}
domain
} }
reporter { reporter {
id ...ActorFragment
preferredUsername
name
avatar {
id
url
}
domain
type
} }
event { event {
id id
@ -81,27 +53,14 @@ const REPORT_FRAGMENT = gql`
id id
text text
actor { actor {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
} }
notes { notes {
id id
content content
moderator { moderator {
id ...ActorFragment
preferredUsername
name
avatar {
id
url
}
} }
insertedAt insertedAt
} }
@ -110,6 +69,7 @@ const REPORT_FRAGMENT = gql`
status status
content content
} }
${ACTOR_FRAGMENT}
`; `;
export const REPORT = gql` export const REPORT = gql`
@ -167,13 +127,7 @@ export const LOGS = gql`
id id
action action
actor { actor {
id ...ActorFragment
preferredUsername
domain
avatar {
id
url
}
} }
object { object {
... on Report { ... on Report {
@ -197,23 +151,14 @@ export const LOGS = gql`
uuid uuid
} }
actor { actor {
id ...ActorFragment
preferredUsername
domain
name
} }
} }
... on Person { ... on Person {
id ...ActorFragment
preferredUsername
domain
name
} }
... on Group { ... on Group {
id ...ActorFragment
preferredUsername
domain
name
} }
... on User { ... on User {
id id
@ -226,4 +171,5 @@ export const LOGS = gql`
total total
} }
} }
${ACTOR_FRAGMENT}
`; `;

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT = gql` export const RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT = gql`
fragment ResourceMetadataBasicFields on ResourceMetadata { fragment ResourceMetadataBasicFields on ResourceMetadata {
@ -38,10 +39,7 @@ export const GET_RESOURCE = gql`
type type
} }
actor { actor {
id ...ActorFragment
preferredUsername
name
domain
} }
children(page: $page, limit: $limit) { children(page: $page, limit: $limit) {
total total
@ -68,6 +66,7 @@ export const GET_RESOURCE = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
${RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT} ${RESOURCE_METADATA_BASIC_FIELDS_FRAGMENT}
`; `;

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const SEARCH_EVENTS = gql` export const SEARCH_EVENTS = gql`
query SearchEvents( query SearchEvents(
@ -58,18 +59,11 @@ export const SEARCH_GROUPS = gql`
) { ) {
total total
elements { elements {
id ...ActorFragment
avatar {
id
url
}
domain
preferredUsername
name
__typename
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const SEARCH_PERSONS = gql` export const SEARCH_PERSONS = gql`
@ -77,18 +71,11 @@ export const SEARCH_PERSONS = gql`
searchPersons(term: $searchText, page: $page, limit: $limit) { searchPersons(term: $searchText, page: $page, limit: $limit) {
total total
elements { elements {
id ...ActorFragment
avatar {
id
url
}
domain
preferredUsername
name
__typename
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const INTERACT = gql` export const INTERACT = gql`
@ -110,16 +97,9 @@ export const INTERACT = gql`
__typename __typename
} }
... on Group { ... on Group {
id ...ActorFragment
avatar {
id
url
}
domain
preferredUsername
name
__typename
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const GET_TODO = gql` export const GET_TODO = gql`
query GetTodo($id: ID!) { query GetTodo($id: ID!) {
@ -9,26 +10,17 @@ export const GET_TODO = gql`
dueDate dueDate
todoList { todoList {
actor { actor {
id ...ActorFragment
preferredUsername
domain
name
} }
title title
id id
} }
assignedTo { assignedTo {
id ...ActorFragment
preferredUsername
domain
name
avatar {
id
url
}
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const FETCH_TODO_LIST = gql` export const FETCH_TODO_LIST = gql`
@ -43,21 +35,17 @@ export const FETCH_TODO_LIST = gql`
title title
status status
assignedTo { assignedTo {
id ...ActorFragment
preferredUsername
domain
} }
dueDate dueDate
} }
} }
actor { actor {
id ...ActorFragment
preferredUsername
domain
name
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const CREATE_TODO_LIST = gql` export const CREATE_TODO_LIST = gql`

View file

@ -1,4 +1,5 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
export const CREATE_USER = gql` export const CREATE_USER = gql`
mutation CreateUser($email: String!, $password: String!, $locale: String) { mutation CreateUser($email: String!, $password: String!, $locale: String) {
@ -18,17 +19,12 @@ export const VALIDATE_USER = gql`
id id
email email
defaultActor { defaultActor {
id ...ActorFragment
preferredUsername
name
avatar {
id
url
}
} }
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const LOGGED_USER = gql` export const LOGGED_USER = gql`
@ -37,17 +33,12 @@ export const LOGGED_USER = gql`
id id
email email
defaultActor { defaultActor {
id ...ActorFragment
preferredUsername
name
avatar {
id
url
}
} }
provider provider
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const CHANGE_PASSWORD = gql` export const CHANGE_PASSWORD = gql`
@ -228,14 +219,7 @@ export const LIST_USERS = gql`
confirmedAt confirmedAt
disabled disabled
actors { actors {
id ...ActorFragment
preferredUsername
avatar {
id
url
}
name
summary
} }
settings { settings {
timezone timezone
@ -243,6 +227,7 @@ export const LIST_USERS = gql`
} }
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const GET_USER = gql` export const GET_USER = gql`
@ -263,13 +248,7 @@ export const GET_USER = gql`
id id
} }
actors { actors {
id ...ActorFragment
preferredUsername
name
avatar {
id
url
}
} }
participations { participations {
total total
@ -277,6 +256,7 @@ export const GET_USER = gql`
role role
} }
} }
${ACTOR_FRAGMENT}
`; `;
export const UPDATE_USER_LOCALE = gql` export const UPDATE_USER_LOCALE = gql`

View file

@ -1202,6 +1202,13 @@
"{timezoneLongName} ({timezoneShortName})": "{timezoneLongName} ({timezoneShortName})", "{timezoneLongName} ({timezoneShortName})": "{timezoneLongName} ({timezoneShortName})",
"Back to top": "Back to top", "Back to top": "Back to top",
"Powered by Mobilizon": "Powered by Mobilizon", "Powered by Mobilizon": "Powered by Mobilizon",
"Instance follows": "Instance follows", "The event is fully online": "The event is fully online",
"The event is fully online": "The event is fully online" "Follow": "Follow",
"Cancel follow request": "Cancel follow request",
"Unfollow": "Unfollow",
"your notification settings": "your notification settings",
"You will receive notifications about this group's public activity depending on %{notification_settings}.": "You will receive notifications about this group's public activity depending on %{notification_settings}.",
"Recent events from your groups": "Recent events from your groups",
"Online": "Online",
"That you follow or of which you are a member": "That you follow or of which you are a member"
} }

View file

@ -488,7 +488,6 @@
"Instance administrator": "Administrador de instancia", "Instance administrator": "Administrador de instancia",
"Instance configuration": "Configuración de instancia", "Instance configuration": "Configuración de instancia",
"Instance feeds": "Flujos de instancias", "Instance feeds": "Flujos de instancias",
"Instance follows": "La instancia sigue",
"Instance languages": "Idiomas de instancia", "Instance languages": "Idiomas de instancia",
"Instance rules": "Reglas de instancia", "Instance rules": "Reglas de instancia",
"Instance settings": "Configuraciones de instancia", "Instance settings": "Configuraciones de instancia",

View file

@ -1308,6 +1308,13 @@
"{timezoneLongName} ({timezoneShortName})": "{timezoneLongName} ({timezoneShortName})", "{timezoneLongName} ({timezoneShortName})": "{timezoneLongName} ({timezoneShortName})",
"Back to top": "Retour en haut", "Back to top": "Retour en haut",
"Powered by Mobilizon": "Propulsé par Mobilizon", "Powered by Mobilizon": "Propulsé par Mobilizon",
"Instance follows": "Abonnements de l'instance", "The event is fully online": "L'événement est entièrement en ligne",
"The event is fully online": "L'événement est entièrement en ligne" "Follow": "Suivre",
"Cancel follow request": "Annuler la demande de suivi",
"Unfollow": "Ne plus suivre",
"your notification settings": "vos paramètres de notification",
"You will receive notifications about this group's public activity depending on %{notification_settings}.": "Vous recevrez des notifications à propos de l'activité publique de ce groupe en fonction de %{notification_settings}.",
"Recent events from your groups": "Événements récents de vos groupes",
"Online": "En ligne",
"That you follow or of which you are a member": "Que vous suivez ou dont vous êtes membre"
} }

View file

@ -4,7 +4,7 @@ import type { ITag } from "@/types/tag.model";
import type { IMedia } from "@/types/media.model"; import type { IMedia } from "@/types/media.model";
import type { IComment } from "@/types/comment.model"; import type { IComment } from "@/types/comment.model";
import type { Paginate } from "@/types/paginate"; import type { Paginate } from "@/types/paginate";
import { Actor, Group } from "./actor"; import { Actor, displayName, Group } from "./actor";
import type { IActor, IGroup, IPerson } from "./actor"; import type { IActor, IGroup, IPerson } from "./actor";
import type { IParticipant } from "./participant.model"; import type { IParticipant } from "./participant.model";
import { EventOptions } from "./event-options.model"; import { EventOptions } from "./event-options.model";
@ -257,3 +257,21 @@ export function toEditJSON(event: IEditableEvent): IEventEditJSON {
})), })),
}; };
} }
export function organizer(event: IEvent): IActor | null {
if (event.attributedTo) {
return event.attributedTo;
}
if (event.organizerActor) {
return event.organizerActor;
}
return null;
}
export function organizerDisplayName(event: IEvent): string | null {
const organizerActor = organizer(event);
if (organizerActor) {
return displayName(organizerActor);
}
return null;
}

View file

@ -89,7 +89,7 @@ import RouteName from "../../router/name";
}, },
metaInfo() { metaInfo() {
return { return {
title: this.$t("Instance follows") as string, title: this.$t("Federation") as string,
}; };
}, },
}) })

View file

@ -345,15 +345,7 @@
<h3 class="title has-text-centered"> <h3 class="title has-text-centered">
{{ $t("These events may interest you") }} {{ $t("These events may interest you") }}
</h3> </h3>
<div class="columns"> <multi-card :events="event.relatedEvents" />
<div
class="column is-one-third-desktop"
v-for="relatedEvent in event.relatedEvents"
:key="relatedEvent.uuid"
>
<EventCard :event="relatedEvent" />
</div>
</div>
</section> </section>
<b-modal <b-modal
:active.sync="isReportModalActive" :active.sync="isReportModalActive"
@ -501,7 +493,7 @@ import { EventModel, IEvent } from "../../types/event.model";
import { IActor, IPerson, Person, usernameWithDomain } from "../../types/actor"; import { IActor, IPerson, Person, usernameWithDomain } from "../../types/actor";
import { GRAPHQL_API_ENDPOINT } from "../../api/_entrypoint"; import { GRAPHQL_API_ENDPOINT } from "../../api/_entrypoint";
import DateCalendarIcon from "../../components/Event/DateCalendarIcon.vue"; import DateCalendarIcon from "../../components/Event/DateCalendarIcon.vue";
import EventCard from "../../components/Event/EventCard.vue"; import MultiCard from "../../components/Event/MultiCard.vue";
import ReportModal from "../../components/Report/ReportModal.vue"; import ReportModal from "../../components/Report/ReportModal.vue";
import { IReport } from "../../types/report.model"; import { IReport } from "../../types/report.model";
import { CREATE_REPORT } from "../../graphql/report"; import { CREATE_REPORT } from "../../graphql/report";
@ -536,7 +528,7 @@ import { IUser } from "@/types/current-user.model";
@Component({ @Component({
components: { components: {
Subtitle, Subtitle,
EventCard, MultiCard,
BIcon, BIcon,
DateCalendarIcon, DateCalendarIcon,
ReportModal, ReportModal,
@ -576,7 +568,6 @@ import { IUser } from "@/types/current-user.model";
apollo: { apollo: {
event: { event: {
query: FETCH_EVENT, query: FETCH_EVENT,
fetchPolicy: "cache-and-network",
variables() { variables() {
return { return {
uuid: this.uuid, uuid: this.uuid,
@ -590,7 +581,6 @@ import { IUser } from "@/types/current-user.model";
loggedUser: USER_SETTINGS, loggedUser: USER_SETTINGS,
participations: { participations: {
query: EVENT_PERSON_PARTICIPATION, query: EVENT_PERSON_PARTICIPATION,
fetchPolicy: "cache-and-network",
variables() { variables() {
return { return {
eventId: this.event.id, eventId: this.event.id,
@ -621,7 +611,6 @@ import { IUser } from "@/types/current-user.model";
}, },
person: { person: {
query: PERSON_STATUS_GROUP, query: PERSON_STATUS_GROUP,
fetchPolicy: "cache-and-network",
variables() { variables() {
return { return {
id: this.currentActor.id, id: this.currentActor.id,

View file

@ -475,7 +475,7 @@
}} }}
</event-metadata-block> </event-metadata-block>
<event-metadata-block <event-metadata-block
v-if="physicalAddress.url" v-if="physicalAddress && physicalAddress.url"
:title="$t('Location')" :title="$t('Location')"
:icon=" :icon="
physicalAddress ? physicalAddress.poiInfos.poiIcon.icon : 'earth' physicalAddress ? physicalAddress.poiInfos.poiIcon.icon : 'earth'

View file

@ -266,7 +266,7 @@ export default class EditPost extends mixins(GroupMixin) {
RouteName = RouteName; RouteName = RouteName;
editablePost!: IPost; editablePost: IPost = this.post;
usernameWithDomain = usernameWithDomain; usernameWithDomain = usernameWithDomain;