forked from potsda.mn/mobilizon
simplified base structure:
startpage shows up to 161 events sorted by date, "explore" and "view everything" renamed to "filter" --- finally working !!!
This commit is contained in:
parent
828a8b66f7
commit
7f3e47c9dc
|
@ -16,7 +16,7 @@
|
|||
</template>
|
||||
<template slot="start">
|
||||
<b-navbar-item tag="router-link" :to="{ name: RouteName.SEARCH }">{{
|
||||
$t("Explore")
|
||||
$t("Filter")
|
||||
}}</b-navbar-item>
|
||||
<b-navbar-item
|
||||
v-if="currentActor.id && currentUser.isLoggedIn"
|
||||
|
|
|
@ -43,18 +43,26 @@
|
|||
>
|
||||
<section class="events-recent">
|
||||
<h2 class="title">
|
||||
{{ $t("Last published events") }}
|
||||
{{ $t("Upcoming events") }}
|
||||
</h2>
|
||||
<p>
|
||||
<i18n tag="span" path="On {instance} and other federated instances">
|
||||
<b slot="instance">{{ config.name }}</b>
|
||||
</i18n>
|
||||
</p>
|
||||
<div v-if="this.events.total > 0">
|
||||
<multi-card :events="events.elements.slice(0, 6)" />
|
||||
<div v-if="events.elements.length > 0">
|
||||
<multi-card class="my-4" :events="events.elements" />
|
||||
<div class="pagination" v-if="events.total > EVENT_PAGE_LIMIT">
|
||||
<b-pagination
|
||||
:total="events.total"
|
||||
v-model="featuredEventPage"
|
||||
:per-page="EVENT_PAGE_LIMIT"
|
||||
>
|
||||
</b-pagination>
|
||||
</div>
|
||||
<span class="view-all">
|
||||
<router-link :to="{ name: RouteName.SEARCH }"
|
||||
>{{ $t("View everything") }} >></router-link
|
||||
>{{ $t("Filter") }} >></router-link
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -226,7 +234,7 @@
|
|||
/>
|
||||
<section class="events-recent">
|
||||
<h2 class="title">
|
||||
{{ $t("Last published events") }}
|
||||
{{ $t("Upcoming events") }}
|
||||
</h2>
|
||||
<p>
|
||||
<i18n tag="span" path="On {instance} and other federated instances">
|
||||
|
@ -235,10 +243,10 @@
|
|||
</p>
|
||||
|
||||
<div v-if="events.total > 0">
|
||||
<multi-card :events="events.elements.slice(0, 8)" />
|
||||
<multi-card :events="events.elements" />
|
||||
<span class="view-all">
|
||||
<router-link :to="{ name: RouteName.SEARCH }"
|
||||
>{{ $t("View everything") }} >></router-link
|
||||
>{{ $t("Filter") }} >></router-link
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -282,13 +290,16 @@ import { IConfig } from "../types/config.model";
|
|||
import { IFollowedGroupEvent } from "../types/followedGroupEvent.model";
|
||||
import Subtitle from "../components/Utils/Subtitle.vue";
|
||||
|
||||
const EVENT_PAGE_LIMIT = 161;
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
events: {
|
||||
query: FETCH_EVENTS,
|
||||
variables: {
|
||||
orderBy: EventSortField.INSERTED_AT,
|
||||
direction: SortDirection.DESC,
|
||||
orderBy: EventSortField.BEGINS_ON,
|
||||
direction: SortDirection.ASC,
|
||||
limit: EVENT_PAGE_LIMIT,
|
||||
},
|
||||
},
|
||||
currentActor: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="section container">
|
||||
<h1 class="title">{{ $t("Explore") }}</h1>
|
||||
<!-- <h1 class="title">{{ $t("Explore") }}</h1> -->
|
||||
<section v-if="tag">
|
||||
<i18n path="Events tagged with {tag}">
|
||||
<b-tag slot="tag" type="is-light">{{ $t("#{tag}", { tag }) }}</b-tag>
|
||||
|
@ -125,7 +125,7 @@
|
|||
v-if="!canSearchEvents && !canSearchGroups"
|
||||
>
|
||||
<b-loading :active.sync="$apollo.loading"></b-loading>
|
||||
<h2 class="title">{{ $t("Featured events") }}</h2>
|
||||
<!-- <h2 class="title">{{ $t("Featured events") }}</h2> -->
|
||||
<div v-if="events.elements.length > 0">
|
||||
<multi-card class="my-4" :events="events.elements" />
|
||||
<div class="pagination" v-if="events.total > EVENT_PAGE_LIMIT">
|
||||
|
@ -255,9 +255,9 @@ interface ISearchTimeOption {
|
|||
end?: Date | null;
|
||||
}
|
||||
|
||||
const EVENT_PAGE_LIMIT = 12;
|
||||
const EVENT_PAGE_LIMIT = 161;
|
||||
|
||||
const GROUP_PAGE_LIMIT = 12;
|
||||
const GROUP_PAGE_LIMIT = 161;
|
||||
|
||||
const DEFAULT_RADIUS = 25; // value to set if radius is null but location set
|
||||
|
||||
|
|
Loading…
Reference in a new issue