mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-26 01:38:36 +00:00
Lint fixes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
fb0238d1b7
commit
699465199e
3 changed files with 32 additions and 28 deletions
|
@ -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";
|
||||||
|
|
|
@ -503,30 +503,32 @@
|
||||||
<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>
|
||||||
<GroupCard
|
<div v-else-if="searchGroups && searchGroups?.total > 0">
|
||||||
v-else-if="searchGroups && searchGroups?.total > 0"
|
<GroupCard
|
||||||
v-for="group in searchGroups?.elements"
|
v-for="group in searchGroups?.elements"
|
||||||
:group="group"
|
:group="group"
|
||||||
:key="group.id"
|
:key="group.id"
|
||||||
:isRemoteGroup="group.__typename === 'GroupResult'"
|
:isRemoteGroup="group.__typename === 'GroupResult'"
|
||||||
: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>
|
||||||
<event-card
|
<div v-if="searchEvents && searchEvents.total > 0">
|
||||||
v-if="searchEvents && searchEvents.total > 0"
|
<event-card
|
||||||
mode="row"
|
mode="row"
|
||||||
v-for="event in searchEvents?.elements"
|
v-for="event in searchEvents?.elements"
|
||||||
:event="event"
|
:event="event"
|
||||||
:key="event.uuid"
|
:key="event.uuid"
|
||||||
:options="{
|
:options="{
|
||||||
isRemoteEvent: event.__typename === 'EventResult',
|
isRemoteEvent: event.__typename === 'EventResult',
|
||||||
isLoggedIn: currentUser?.isLoggedIn,
|
isLoggedIn: currentUser?.isLoggedIn,
|
||||||
}"
|
}"
|
||||||
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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -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"],
|
||||||
|
|
Loading…
Reference in a new issue