Lint fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-10-12 19:30:34 +02:00
parent fb0238d1b7
commit 699465199e
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
3 changed files with 32 additions and 28 deletions

View file

@ -188,12 +188,7 @@ import {
EVENT_PERSON_PARTICIPATION, EVENT_PERSON_PARTICIPATION,
// EVENT_PERSON_PARTICIPATION_SUBSCRIPTION_CHANGED, // EVENT_PERSON_PARTICIPATION_SUBSCRIPTION_CHANGED,
} from "@/graphql/event"; } from "@/graphql/event";
import { import { displayName, IPerson, usernameWithDomain } from "@/types/actor";
displayName,
IActor,
IPerson,
usernameWithDomain,
} from "@/types/actor";
import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue"; import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue";
import MultiCard from "@/components/Event/MultiCard.vue"; import MultiCard from "@/components/Event/MultiCard.vue";
import RouteName from "@/router/name"; import RouteName from "@/router/name";

View file

@ -503,8 +503,8 @@
<o-notification v-if="features && !features.groups" variant="danger"> <o-notification v-if="features && !features.groups" variant="danger">
{{ t("Groups are not enabled on this instance.") }} {{ t("Groups are not enabled on this instance.") }}
</o-notification> </o-notification>
<div v-else-if="searchGroups && searchGroups?.total > 0">
<GroupCard <GroupCard
v-else-if="searchGroups && searchGroups?.total > 0"
v-for="group in searchGroups?.elements" v-for="group in searchGroups?.elements"
:group="group" :group="group"
:key="group.id" :key="group.id"
@ -512,11 +512,12 @@
:isLoggedIn="currentUser?.isLoggedIn" :isLoggedIn="currentUser?.isLoggedIn"
mode="row" mode="row"
/> />
</div>
<o-notification v-else-if="searchLoading === false" variant="danger"> <o-notification v-else-if="searchLoading === false" variant="danger">
{{ t("No groups found") }} {{ t("No groups found") }}
</o-notification> </o-notification>
<div v-if="searchEvents && searchEvents.total > 0">
<event-card <event-card
v-if="searchEvents && searchEvents.total > 0"
mode="row" mode="row"
v-for="event in searchEvents?.elements" v-for="event in searchEvents?.elements"
:event="event" :event="event"
@ -527,6 +528,7 @@
}" }"
class="my-4" class="my-4"
/> />
</div>
<o-pagination <o-pagination
v-if=" v-if="
(searchEvents && searchEvents?.total > EVENT_PAGE_LIMIT) || (searchEvents && searchEvents?.total > EVENT_PAGE_LIMIT) ||
@ -780,10 +782,13 @@ watch(contentType, (newContentType: ContentType) => {
switch (newContentType) { switch (newContentType) {
case ContentType.ALL: case ContentType.ALL:
page.value = 1; page.value = 1;
break;
case ContentType.EVENTS: case ContentType.EVENTS:
eventPage.value = 1; eventPage.value = 1;
break;
case ContentType.GROUPS: case ContentType.GROUPS:
groupPage.value = 1; groupPage.value = 1;
break;
} }
}); });

View file

@ -187,7 +187,11 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
ends_on: parse_date(data["endTime"]), ends_on: parse_date(data["endTime"]),
url: data["url"], url: data["url"],
picture: picture, picture: picture,
category: data["category"] |> Categories.get_category() |> String.downcase() |> String.to_existing_atom(), category:
data["category"]
|> Categories.get_category()
|> String.downcase()
|> String.to_existing_atom(),
organizer_actor: %Actor{ organizer_actor: %Actor{
id: data["creator"]["id"], id: data["creator"]["id"],
name: data["creator"]["displayName"], name: data["creator"]["displayName"],