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_SUBSCRIPTION_CHANGED,
} from "@/graphql/event";
import {
displayName,
IActor,
IPerson,
usernameWithDomain,
} from "@/types/actor";
import { displayName, IPerson, usernameWithDomain } from "@/types/actor";
import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue";
import MultiCard from "@/components/Event/MultiCard.vue";
import RouteName from "@/router/name";

View File

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

View File

@ -187,7 +187,11 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
ends_on: parse_date(data["endTime"]),
url: data["url"],
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{
id: data["creator"]["id"],
name: data["creator"]["displayName"],