Merge branch 'bugs' into 'main'

Fix various issues in 2.0.0-rc.1

Closes #929, #930, #931 et #932

See merge request framasoft/mobilizon!1118
This commit is contained in:
Thomas Citharel 2021-11-22 09:37:20 +00:00
commit f5a75c0af3
10 changed files with 35 additions and 28 deletions

View File

@ -16,6 +16,7 @@
> >
<b-autocomplete <b-autocomplete
expanded expanded
:clear-on-select="true"
v-model="search" v-model="search"
ref="autocomplete" ref="autocomplete"
:data="filteredDataArray" :data="filteredDataArray"
@ -140,7 +141,10 @@ export default class EventMetadataList extends Vue {
} }
set metadata(metadata: IEventMetadata[]) { set metadata(metadata: IEventMetadata[]) {
this.$emit("input", metadata); this.$emit(
"input",
metadata.filter((elem) => elem)
);
} }
localizedCategories: Record<EventMetadataCategories, string> = { localizedCategories: Record<EventMetadataCategories, string> = {

View File

@ -15,7 +15,7 @@
<div class="media" dir="auto"> <div class="media" dir="auto">
<figure class="image is-48x48" v-if="availableActor.avatar"> <figure class="image is-48x48" v-if="availableActor.avatar">
<img <img
class="media-left is-rounded" class="image is-rounded"
:src="availableActor.avatar.url" :src="availableActor.avatar.url"
alt="" alt=""
/> />

View File

@ -794,7 +794,7 @@
"Unable to save your participation in this browser.": "Unable to save your participation in this browser.", "Unable to save your participation in this browser.": "Unable to save your participation in this browser.",
"return to the event's page": "return to the event's page", "return to the event's page": "return to the event's page",
"View all events": "View all events", "View all events": "View all events",
"You will find here all the events you have created or of which you are a participant.": "You will find here all the events you have created or of which you are a participant.", "You will find here all the events you have created or of which you are a participant, as well as events organized by groups you follow or are a member of.": "You will find here all the events you have created or of which you are a participant, as well as events organized by groups you follow or are a member of.",
"Create event": "Create event", "Create event": "Create event",
"You didn't create or join any event yet.": "You didn't create or join any event yet.", "You didn't create or join any event yet.": "You didn't create or join any event yet.",
"create an event": "create an event", "create an event": "create an event",

View File

@ -1115,7 +1115,7 @@
"You were promoted to moderator by {profile}.": "Vous avez été promu⋅e modérateur⋅ice par {profile}.", "You were promoted to moderator by {profile}.": "Vous avez été promu⋅e modérateur⋅ice par {profile}.",
"You will be able to add an avatar and set other options in your account settings.": "Vous pourrez ajouter un avatar et définir d'autres options dans les paramètres de votre compte.", "You will be able to add an avatar and set other options in your account settings.": "Vous pourrez ajouter un avatar et définir d'autres options dans les paramètres de votre compte.",
"You will be redirected to the original instance": "Vous allez être redirigé⋅e vers l'instance d'origine", "You will be redirected to the original instance": "Vous allez être redirigé⋅e vers l'instance d'origine",
"You will find here all the events you have created or of which you are a participant.": "Vous trouverez ici tous les événements que vous avez créé ou dont vous êtes un·e participant·e.", "You will find here all the events you have created or of which you are a participant, as well as events organized by groups you follow or are a member of.": "Vous trouverez ici tous les événements que vous avez créé ou dont vous êtes un·e participant·e, ainsi que les événements organisés par les groupes que vous suivez ou dont vous êtes membre.",
"You wish to participate to the following event": "Vous souhaitez participer à l'événement suivant", "You wish to participate to the following event": "Vous souhaitez participer à l'événement suivant",
"You'll get a weekly recap every Monday for upcoming events, if you have any.": "Vous recevrez un récapitulatif hebdomadaire chaque lundi pour les événements de la semaine, si vous en avez.", "You'll get a weekly recap every Monday for upcoming events, if you have any.": "Vous recevrez un récapitulatif hebdomadaire chaque lundi pour les événements de la semaine, si vous en avez.",
"You'll need to change the URLs where there were previously entered.": "Vous devrez changer les URLs là où vous les avez entrées précédemment.", "You'll need to change the URLs where there were previously entered.": "Vous devrez changer les URLs là où vous les avez entrées précédemment.",

View File

@ -6,7 +6,6 @@ import { CONFIG } from "../graphql/config";
import { IConfig } from "../types/config.model"; import { IConfig } from "../types/config.model";
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import { DebouncedFunc } from "lodash"; import { DebouncedFunc } from "lodash";
import { PropType } from "vue";
@Component({ @Component({
components: { components: {
@ -18,7 +17,7 @@ import { PropType } from "vue";
}, },
}) })
export default class AddressAutoCompleteMixin extends Vue { export default class AddressAutoCompleteMixin extends Vue {
@Prop({ required: true, type: Object as PropType<IAddress> }) @Prop({ required: true })
value!: IAddress; value!: IAddress;
gettingLocationError: string | null = null; gettingLocationError: string | null = null;

View File

@ -14,7 +14,7 @@ export const eventMetaDataList: IEventMetadataDescription[] = [
description: i18n.t( description: i18n.t(
"Whether the event is accessible with a wheelchair" "Whether the event is accessible with a wheelchair"
) as string, ) as string,
value: "", value: "no",
type: EventMetadataType.STRING, type: EventMetadataType.STRING,
keyType: EventMetadataKeyType.CHOICE, keyType: EventMetadataKeyType.CHOICE,
choices: { choices: {
@ -29,7 +29,7 @@ export const eventMetaDataList: IEventMetadataDescription[] = [
key: "mz:accessibility:live:subtitle", key: "mz:accessibility:live:subtitle",
label: i18n.t("Subtitles") as string, label: i18n.t("Subtitles") as string,
description: i18n.t("Whether the event live video is subtitled") as string, description: i18n.t("Whether the event live video is subtitled") as string,
value: "", value: "false",
type: EventMetadataType.BOOLEAN, type: EventMetadataType.BOOLEAN,
keyType: EventMetadataKeyType.PLAIN, keyType: EventMetadataKeyType.PLAIN,
choices: { choices: {
@ -47,7 +47,7 @@ export const eventMetaDataList: IEventMetadataDescription[] = [
description: i18n.t( description: i18n.t(
"Whether the event is interpreted in sign language" "Whether the event is interpreted in sign language"
) as string, ) as string,
value: "", value: "false",
type: EventMetadataType.BOOLEAN, type: EventMetadataType.BOOLEAN,
keyType: EventMetadataKeyType.PLAIN, keyType: EventMetadataKeyType.PLAIN,
choices: { choices: {

View File

@ -101,7 +101,7 @@ import { IPerson } from "../../types/actor";
// @ts-ignore // @ts-ignore
const { user } = this; const { user } = this;
return { return {
title: user.email, title: user?.email,
}; };
}, },
}) })

View File

@ -6,7 +6,7 @@
<p> <p>
{{ {{
$t( $t(
"You will find here all the events you have created or of which you are a participant." "You will find here all the events you have created or of which you are a participant, as well as events organized by groups you follow or are a member of."
) )
}} }}
</p> </p>
@ -434,24 +434,28 @@ export default class MyEvents extends Vue {
loadMoreFutureParticipations(): void { loadMoreFutureParticipations(): void {
this.futurePage += 1; this.futurePage += 1;
this.$apollo.queries.futureParticipations.fetchMore({ if (this.$apollo.queries.futureParticipations) {
// New variables this.$apollo.queries.futureParticipations.fetchMore({
variables: { // New variables
page: this.futurePage, variables: {
limit: this.limit, page: this.futurePage,
}, limit: this.limit,
}); },
});
}
} }
loadMorePastParticipations(): void { loadMorePastParticipations(): void {
this.pastPage += 1; this.pastPage += 1;
this.$apollo.queries.pastParticipations.fetchMore({ if (this.$apollo.queries.pastParticipations) {
// New variables this.$apollo.queries.pastParticipations.fetchMore({
variables: { // New variables
page: this.pastPage, variables: {
limit: this.limit, page: this.pastPage,
}, limit: this.limit,
}); },
});
}
} }
eventDeleted(eventid: string): void { eventDeleted(eventid: string): void {

View File

@ -283,7 +283,7 @@
<b-icon class="clickable" icon="pencil" size="is-small" /> <b-icon class="clickable" icon="pencil" size="is-small" />
</router-link> </router-link>
</p> </p>
<multi-card :events="closeEvents.elements.slice(0, 3)" /> <multi-card :events="closeEvents.elements.slice(0, 4)" />
</section> </section>
<hr <hr
role="presentation" role="presentation"
@ -605,7 +605,7 @@ export default class Home extends Vue {
.map(({ event: { id: event_id } }) => event_id) .map(({ event: { id: event_id } }) => event_id)
.includes(id) .includes(id)
) )
.slice(0, 3); .slice(0, 4);
} }
} }
</script> </script>

View File

@ -14,7 +14,7 @@ defmodule Mobilizon.FollowedGroupActivity do
integer() | nil, integer() | nil,
integer() | nil integer() | nil
) :: Page.t(Event.t()) ) :: Page.t(Event.t())
def user_followed_group_events(user_id, after_datetime, page \\ nil, limit \\ nil) do def user_followed_group_events(user_id, after_datetime \\ nil, page \\ nil, limit \\ nil) do
Event Event
|> distinct([e], e.id) |> distinct([e], e.id)
|> join(:left, [e], p in Participant, on: e.id == p.event_id) |> join(:left, [e], p in Participant, on: e.id == p.event_id)