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

View File

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

View File

@ -794,7 +794,7 @@
"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",
"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",
"You didn't create or join any event yet.": "You didn't create or join any event yet.",
"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 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 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'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.",

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@
<p>
{{
$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>
@ -434,24 +434,28 @@ export default class MyEvents extends Vue {
loadMoreFutureParticipations(): void {
this.futurePage += 1;
this.$apollo.queries.futureParticipations.fetchMore({
// New variables
variables: {
page: this.futurePage,
limit: this.limit,
},
});
if (this.$apollo.queries.futureParticipations) {
this.$apollo.queries.futureParticipations.fetchMore({
// New variables
variables: {
page: this.futurePage,
limit: this.limit,
},
});
}
}
loadMorePastParticipations(): void {
this.pastPage += 1;
this.$apollo.queries.pastParticipations.fetchMore({
// New variables
variables: {
page: this.pastPage,
limit: this.limit,
},
});
if (this.$apollo.queries.pastParticipations) {
this.$apollo.queries.pastParticipations.fetchMore({
// New variables
variables: {
page: this.pastPage,
limit: this.limit,
},
});
}
}
eventDeleted(eventid: string): void {

View File

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

View File

@ -14,7 +14,7 @@ defmodule Mobilizon.FollowedGroupActivity do
integer() | nil,
integer() | nil
) :: 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
|> distinct([e], e.id)
|> join(:left, [e], p in Participant, on: e.id == p.event_id)