2019-01-21 15:08:22 +01:00
|
|
|
<template>
|
2019-10-05 19:07:50 +02:00
|
|
|
<div>
|
2019-12-20 13:04:34 +01:00
|
|
|
<section class="hero is-light is-bold" v-if="config && (!currentUser.id || !currentActor.id)">
|
2020-02-18 08:57:00 +01:00
|
|
|
<div class="hero-body">
|
|
|
|
<div class="container">
|
|
|
|
<h1 class="title">{{ $t("Gather ⋅ Organize ⋅ Mobilize") }}</h1>
|
|
|
|
<p>{{ $t("Join {instance}, a Mobilizon instance", { instance: config.name }) }}</p>
|
|
|
|
<p class="instance-description">{{ config.description }}</p>
|
|
|
|
<!-- We don't invite to find other instances yet -->
|
|
|
|
<!-- <p v-if="!config.registrationsOpen">
|
2019-10-07 16:48:13 +02:00
|
|
|
{{ $t("This instance isn't opened to registrations, but you can register on other instances.") }}
|
2020-02-18 08:57:00 +01:00
|
|
|
</p>-->
|
|
|
|
<b-message type="is-danger" v-if="!config.registrationsOpen">{{
|
|
|
|
$t("Unfortunately, this instance isn't opened to registrations")
|
|
|
|
}}</b-message>
|
|
|
|
<div class="buttons">
|
|
|
|
<b-button
|
|
|
|
type="is-primary"
|
|
|
|
tag="router-link"
|
|
|
|
:to="{ name: RouteName.REGISTER }"
|
|
|
|
v-if="config.registrationsOpen"
|
|
|
|
>{{ $t("Sign up") }}</b-button
|
|
|
|
>
|
|
|
|
<!-- We don't invite to find other instances yet -->
|
|
|
|
<!-- <b-button v-else type="is-link" tag="a" href="https://joinmastodon.org">{{ $t('Find an instance') }}</b-button> -->
|
|
|
|
<b-button type="is-text" tag="router-link" :to="{ name: RouteName.ABOUT }">
|
|
|
|
{{ $t("Learn more about Mobilizon") }}
|
|
|
|
</b-button>
|
2019-10-05 19:07:50 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
|
|
|
</section>
|
2020-06-11 11:45:52 +02:00
|
|
|
<div class="container section" v-if="config && (!currentUser.id || !currentActor.id)">
|
|
|
|
<section class="events-featured">
|
|
|
|
<h3 class="title">{{ $t("Featured events") }}</h3>
|
|
|
|
<b-loading :active.sync="$apollo.loading" />
|
|
|
|
<div v-if="filteredFeaturedEvents.length > 0" class="columns is-multiline">
|
|
|
|
<div
|
|
|
|
class="column is-one-third-desktop"
|
|
|
|
v-for="event in filteredFeaturedEvents.slice(0, 6)"
|
|
|
|
:key="event.uuid"
|
|
|
|
>
|
|
|
|
<EventCard :event="event" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<b-message v-else type="is-danger">{{ $t("No events found") }}</b-message>
|
|
|
|
</section>
|
|
|
|
</div>
|
2020-06-11 10:58:23 +02:00
|
|
|
<div class="container section" v-if="config && loggedUser && loggedUser.settings">
|
2019-10-15 17:33:02 +02:00
|
|
|
<section v-if="currentActor.id">
|
2020-02-18 08:57:00 +01:00
|
|
|
<b-message type="is-info" v-if="welcomeBack">{{
|
|
|
|
$t("Welcome back {username}!", { username: currentActor.displayName() })
|
|
|
|
}}</b-message>
|
|
|
|
<b-message type="is-info" v-if="newRegisteredUser">{{
|
|
|
|
$t("Welcome to Mobilizon, {username}!", { username: currentActor.displayName() })
|
|
|
|
}}</b-message>
|
2019-10-05 19:07:50 +02:00
|
|
|
</section>
|
2019-10-08 19:41:14 +02:00
|
|
|
<section v-if="currentActor.id && goingToEvents.size > 0" class="container">
|
2020-02-18 08:57:00 +01:00
|
|
|
<h3 class="title">{{ $t("Upcoming") }}</h3>
|
2020-02-07 16:13:29 +01:00
|
|
|
<b-loading :active.sync="$apollo.loading" />
|
2019-10-07 16:48:13 +02:00
|
|
|
<div v-for="row of goingToEvents" class="upcoming-events" :key="row[0]">
|
2019-10-05 19:07:50 +02:00
|
|
|
<span class="date-component-container" v-if="isInLessThanSevenDays(row[0])">
|
2020-02-07 16:13:29 +01:00
|
|
|
<date-component :date="row[0]" />
|
2020-02-18 08:57:00 +01:00
|
|
|
<subtitle v-if="isToday(row[0])">{{
|
|
|
|
$tc("You have one event today.", row[1].length, { count: row[1].length })
|
|
|
|
}}</subtitle>
|
|
|
|
<subtitle v-else-if="isTomorrow(row[0])">{{
|
|
|
|
$tc("You have one event tomorrow.", row[1].length, { count: row[1].length })
|
|
|
|
}}</subtitle>
|
|
|
|
<subtitle v-else-if="isInLessThanSevenDays(row[0])">
|
|
|
|
{{
|
|
|
|
$tc("You have one event in {days} days.", row[1].length, {
|
|
|
|
count: row[1].length,
|
|
|
|
days: calculateDiffDays(row[0]),
|
|
|
|
})
|
|
|
|
}}
|
2020-02-18 08:47:41 +01:00
|
|
|
</subtitle>
|
2019-10-05 19:07:50 +02:00
|
|
|
</span>
|
|
|
|
<div>
|
|
|
|
<EventListCard
|
2020-02-18 08:57:00 +01:00
|
|
|
v-for="participation in row[1]"
|
|
|
|
v-if="isInLessThanSevenDays(row[0])"
|
2020-06-25 14:09:01 +02:00
|
|
|
@eventDeleted="eventDeleted"
|
2020-02-18 08:57:00 +01:00
|
|
|
:key="participation[1].id"
|
|
|
|
:participation="participation[1]"
|
2019-10-05 19:07:50 +02:00
|
|
|
/>
|
|
|
|
</div>
|
2019-01-21 15:08:22 +01:00
|
|
|
</div>
|
2019-10-05 19:07:50 +02:00
|
|
|
<span class="view-all">
|
2020-02-18 08:57:00 +01:00
|
|
|
<router-link :to="{ name: RouteName.MY_EVENTS }"
|
|
|
|
>{{ $t("View everything") }} >></router-link
|
|
|
|
>
|
2019-09-18 17:32:37 +02:00
|
|
|
</span>
|
2019-10-05 19:07:50 +02:00
|
|
|
</section>
|
|
|
|
<section v-if="currentActor && lastWeekEvents.length > 0">
|
2020-02-18 08:57:00 +01:00
|
|
|
<h3 class="title">{{ $t("Last week") }}</h3>
|
2020-02-07 16:13:29 +01:00
|
|
|
<b-loading :active.sync="$apollo.loading" />
|
2019-09-26 16:38:58 +02:00
|
|
|
<div>
|
2020-02-18 08:57:00 +01:00
|
|
|
<EventListCard
|
|
|
|
v-for="participation in lastWeekEvents"
|
|
|
|
:key="participation.id"
|
|
|
|
:participation="participation"
|
2020-06-25 14:09:01 +02:00
|
|
|
@eventDeleted="eventDeleted"
|
2020-02-18 08:57:00 +01:00
|
|
|
:options="{ hideDate: false }"
|
|
|
|
/>
|
2019-03-21 20:23:42 +01:00
|
|
|
</div>
|
2019-10-05 19:07:50 +02:00
|
|
|
</section>
|
2019-10-07 16:48:13 +02:00
|
|
|
<section class="events-featured">
|
2020-02-18 08:57:00 +01:00
|
|
|
<h3 class="title">{{ $t("Featured events") }}</h3>
|
2020-02-07 16:13:29 +01:00
|
|
|
<b-loading :active.sync="$apollo.loading" />
|
2019-10-08 19:41:14 +02:00
|
|
|
<div v-if="filteredFeaturedEvents.length > 0" class="columns is-multiline">
|
2020-02-18 08:57:00 +01:00
|
|
|
<div
|
|
|
|
class="column is-one-third-desktop"
|
|
|
|
v-for="event in filteredFeaturedEvents.slice(0, 6)"
|
|
|
|
:key="event.uuid"
|
|
|
|
>
|
|
|
|
<EventCard :event="event" />
|
2019-10-05 19:07:50 +02:00
|
|
|
</div>
|
2019-04-03 17:29:03 +02:00
|
|
|
</div>
|
2020-02-18 08:57:00 +01:00
|
|
|
<b-message v-else type="is-danger">{{ $t("No events found") }}</b-message>
|
2019-10-05 19:07:50 +02:00
|
|
|
</section>
|
|
|
|
</div>
|
2020-06-11 10:58:23 +02:00
|
|
|
<settings-onboard v-else-if="config && loggedUser && loggedUser.settings == undefined" />
|
2019-01-21 15:08:22 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-02-18 08:57:00 +01:00
|
|
|
import ngeohash from "ngeohash";
|
|
|
|
import { Component, Vue } from "vue-property-decorator";
|
|
|
|
import { FETCH_EVENTS } from "../graphql/event";
|
|
|
|
import EventListCard from "../components/Event/EventListCard.vue";
|
|
|
|
import EventCard from "../components/Event/EventCard.vue";
|
|
|
|
import { CURRENT_ACTOR_CLIENT, LOGGED_USER_PARTICIPATIONS } from "../graphql/actor";
|
|
|
|
import { IPerson, Person } from "../types/actor";
|
|
|
|
import { ICurrentUser } from "../types/current-user.model";
|
2020-06-11 10:58:23 +02:00
|
|
|
import { CURRENT_USER_CLIENT, USER_SETTINGS } from "../graphql/user";
|
2020-02-18 08:57:00 +01:00
|
|
|
import RouteName from "../router/name";
|
|
|
|
import {
|
|
|
|
EventModel,
|
|
|
|
IEvent,
|
|
|
|
IParticipant,
|
|
|
|
Participant,
|
|
|
|
ParticipantRole,
|
|
|
|
} from "../types/event.model";
|
|
|
|
import DateComponent from "../components/Event/DateCalendarIcon.vue";
|
|
|
|
import { CONFIG } from "../graphql/config";
|
|
|
|
import { IConfig } from "../types/config.model";
|
|
|
|
import Subtitle from "../components/Utils/Subtitle.vue";
|
2019-01-21 15:08:22 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
apollo: {
|
|
|
|
events: {
|
|
|
|
query: FETCH_EVENTS,
|
2020-02-18 08:57:00 +01:00
|
|
|
fetchPolicy: "no-cache", // Debug me: https://github.com/apollographql/apollo-client/issues/3030
|
2019-01-21 15:08:22 +01:00
|
|
|
},
|
2019-09-18 17:32:37 +02:00
|
|
|
currentActor: {
|
|
|
|
query: CURRENT_ACTOR_CLIENT,
|
2020-02-18 08:57:00 +01:00
|
|
|
update: (data) => new Person(data.currentActor),
|
2019-01-21 15:08:22 +01:00
|
|
|
},
|
2020-06-11 10:58:23 +02:00
|
|
|
currentUser: CURRENT_USER_CLIENT,
|
|
|
|
loggedUser: {
|
|
|
|
query: USER_SETTINGS,
|
|
|
|
fetchPolicy: "no-cache",
|
2019-04-03 17:29:03 +02:00
|
|
|
},
|
2020-06-11 10:58:23 +02:00
|
|
|
config: CONFIG,
|
2019-10-07 16:48:13 +02:00
|
|
|
currentUserParticipations: {
|
|
|
|
query: LOGGED_USER_PARTICIPATIONS,
|
2020-06-25 14:09:01 +02:00
|
|
|
fetchPolicy: "network-only",
|
2019-10-07 16:48:13 +02:00
|
|
|
variables() {
|
|
|
|
const lastWeek = new Date();
|
|
|
|
lastWeek.setDate(new Date().getDate() - 7);
|
|
|
|
return {
|
|
|
|
afterDateTime: lastWeek.toISOString(),
|
|
|
|
};
|
|
|
|
},
|
2020-02-18 08:57:00 +01:00
|
|
|
update: (data) =>
|
2020-06-09 14:07:49 +02:00
|
|
|
data.loggedUser.participations.elements.map(
|
2020-02-18 08:57:00 +01:00
|
|
|
(participation: IParticipant) => new Participant(participation)
|
|
|
|
),
|
2019-10-07 16:48:13 +02:00
|
|
|
skip() {
|
|
|
|
return this.currentUser.isLoggedIn === false;
|
|
|
|
},
|
|
|
|
},
|
2019-01-21 15:08:22 +01:00
|
|
|
},
|
|
|
|
components: {
|
2020-02-18 08:47:41 +01:00
|
|
|
Subtitle,
|
2019-03-21 20:23:42 +01:00
|
|
|
DateComponent,
|
2019-09-18 17:32:37 +02:00
|
|
|
EventListCard,
|
2019-03-22 10:57:14 +01:00
|
|
|
EventCard,
|
2020-06-11 10:58:23 +02:00
|
|
|
"settings-onboard": () => import("./User/SettingsOnboard.vue"),
|
2019-03-22 10:57:14 +01:00
|
|
|
},
|
2019-10-10 16:47:38 +02:00
|
|
|
metaInfo() {
|
|
|
|
return {
|
|
|
|
// if no subcomponents specify a metaInfo.title, this title will be used
|
|
|
|
// @ts-ignore
|
|
|
|
title: this.instanceName,
|
|
|
|
// all titles will be injected into this template
|
2020-02-18 08:57:00 +01:00
|
|
|
titleTemplate: "%s | Mobilizon",
|
2019-10-10 16:47:38 +02:00
|
|
|
};
|
|
|
|
},
|
2019-01-21 15:08:22 +01:00
|
|
|
})
|
|
|
|
export default class Home extends Vue {
|
2019-10-08 20:00:26 +02:00
|
|
|
events: IEvent[] = [];
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2019-01-21 15:08:22 +01:00
|
|
|
locations = [];
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2019-01-21 15:08:22 +01:00
|
|
|
city = { name: null };
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2019-01-21 15:08:22 +01:00
|
|
|
country = { name: null };
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2019-01-21 15:08:22 +01:00
|
|
|
currentUser!: ICurrentUser;
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2020-06-11 10:58:23 +02:00
|
|
|
loggedUser!: ICurrentUser;
|
|
|
|
|
2019-09-18 17:32:37 +02:00
|
|
|
currentActor!: IPerson;
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2019-10-07 16:48:13 +02:00
|
|
|
config!: IConfig;
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2019-07-23 18:36:17 +02:00
|
|
|
RouteName = RouteName;
|
2019-01-21 15:08:22 +01:00
|
|
|
|
2019-10-07 16:48:13 +02:00
|
|
|
currentUserParticipations: IParticipant[] = [];
|
|
|
|
|
2019-04-03 17:29:03 +02:00
|
|
|
// get displayed_name() {
|
|
|
|
// return this.loggedPerson && this.loggedPerson.name === null
|
|
|
|
// ? this.loggedPerson.preferredUsername
|
|
|
|
// : this.loggedPerson.name;
|
|
|
|
// }
|
2019-01-21 15:08:22 +01:00
|
|
|
|
2019-10-10 16:47:38 +02:00
|
|
|
get instanceName() {
|
|
|
|
if (!this.config) return undefined;
|
|
|
|
return this.config.name;
|
|
|
|
}
|
|
|
|
|
2019-10-14 14:25:08 +02:00
|
|
|
get welcomeBack() {
|
2020-02-18 08:57:00 +01:00
|
|
|
return window.localStorage.getItem("welcome-back") === "yes";
|
2019-10-14 14:25:08 +02:00
|
|
|
}
|
|
|
|
|
2019-10-15 17:33:02 +02:00
|
|
|
get newRegisteredUser() {
|
2020-02-18 08:57:00 +01:00
|
|
|
return window.localStorage.getItem("new-registered-user") === "yes";
|
2019-10-15 17:33:02 +02:00
|
|
|
}
|
|
|
|
|
2019-10-14 14:25:08 +02:00
|
|
|
mounted() {
|
2020-02-18 08:57:00 +01:00
|
|
|
if (window.localStorage.getItem("welcome-back")) {
|
|
|
|
window.localStorage.removeItem("welcome-back");
|
2019-10-15 17:33:02 +02:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
if (window.localStorage.getItem("new-registered-user")) {
|
|
|
|
window.localStorage.removeItem("new-registered-user");
|
2019-10-15 17:33:02 +02:00
|
|
|
}
|
2019-10-14 14:25:08 +02:00
|
|
|
}
|
|
|
|
|
2019-09-18 17:32:37 +02:00
|
|
|
isToday(date: Date) {
|
2020-02-18 08:57:00 +01:00
|
|
|
return new Date(date).toDateString() === new Date().toDateString();
|
2019-03-21 20:23:42 +01:00
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
isTomorrow(date: string): boolean {
|
2019-03-21 20:23:42 +01:00
|
|
|
return this.isInDays(date, 1);
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
isInDays(date: string, nbDays: number): boolean {
|
2019-03-21 20:23:42 +01:00
|
|
|
return this.calculateDiffDays(date) === nbDays;
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
isBefore(date: string, nbDays: number): boolean {
|
2019-09-18 17:32:37 +02:00
|
|
|
return this.calculateDiffDays(date) < nbDays;
|
2019-03-21 20:23:42 +01:00
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
isAfter(date: string, nbDays: number): boolean {
|
2019-09-20 18:22:03 +02:00
|
|
|
return this.calculateDiffDays(date) >= nbDays;
|
|
|
|
}
|
|
|
|
|
2019-03-21 20:23:42 +01:00
|
|
|
isInLessThanSevenDays(date: string): boolean {
|
2019-09-18 17:32:37 +02:00
|
|
|
return this.isBefore(date, 7);
|
2019-03-21 20:23:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
calculateDiffDays(date: string): number {
|
2020-02-18 08:57:00 +01:00
|
|
|
return Math.ceil((new Date(date).getTime() - new Date().getTime()) / 1000 / 60 / 60 / 24);
|
2019-03-21 20:23:42 +01:00
|
|
|
}
|
|
|
|
|
2019-09-18 17:32:37 +02:00
|
|
|
get goingToEvents(): Map<string, Map<string, IParticipant>> {
|
2020-02-18 08:57:00 +01:00
|
|
|
const res = this.currentUserParticipations.filter(
|
|
|
|
({ event, role }) =>
|
|
|
|
event.beginsOn != null &&
|
|
|
|
this.isAfter(event.beginsOn.toDateString(), 0) &&
|
|
|
|
this.isBefore(event.beginsOn.toDateString(), 7) &&
|
|
|
|
role !== ParticipantRole.REJECTED
|
|
|
|
);
|
2019-03-21 20:23:42 +01:00
|
|
|
res.sort(
|
2020-02-18 08:57:00 +01:00
|
|
|
(a: IParticipant, b: IParticipant) => a.event.beginsOn.getTime() - b.event.beginsOn.getTime()
|
2019-03-21 20:23:42 +01:00
|
|
|
);
|
2019-10-07 16:48:13 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
return res.reduce(
|
|
|
|
(acc: Map<string, Map<string, IParticipant>>, participation: IParticipant) => {
|
|
|
|
const day = new Date(participation.event.beginsOn).toDateString();
|
|
|
|
const participations: Map<string, IParticipant> = acc.get(day) || new Map();
|
|
|
|
participations.set(`${participation.event.uuid}${participation.actor.id}`, participation);
|
|
|
|
acc.set(day, participations);
|
|
|
|
return acc;
|
|
|
|
},
|
|
|
|
new Map()
|
|
|
|
);
|
2019-01-21 15:08:22 +01:00
|
|
|
}
|
|
|
|
|
2019-09-18 17:32:37 +02:00
|
|
|
get lastWeekEvents() {
|
2020-02-18 08:57:00 +01:00
|
|
|
const res = this.currentUserParticipations.filter(
|
|
|
|
({ event, role }) =>
|
|
|
|
event.beginsOn != null &&
|
|
|
|
this.isBefore(event.beginsOn.toDateString(), 0) &&
|
|
|
|
role !== ParticipantRole.REJECTED
|
|
|
|
);
|
2019-09-18 17:32:37 +02:00
|
|
|
res.sort(
|
2020-02-18 08:57:00 +01:00
|
|
|
(a: IParticipant, b: IParticipant) => a.event.beginsOn.getTime() - b.event.beginsOn.getTime()
|
|
|
|
);
|
2019-09-18 17:32:37 +02:00
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2020-02-07 16:13:29 +01:00
|
|
|
/**
|
|
|
|
* Return all events from server excluding the ones shown as participating
|
|
|
|
*/
|
2019-10-08 19:41:14 +02:00
|
|
|
get filteredFeaturedEvents() {
|
2020-02-18 08:57:00 +01:00
|
|
|
return this.events.filter(
|
2020-06-11 11:45:52 +02:00
|
|
|
({ id }) =>
|
|
|
|
!this.currentUserParticipations
|
|
|
|
.filter((participation) => participation.role === ParticipantRole.CREATOR)
|
|
|
|
.map(({ event: { id } }) => id)
|
|
|
|
.includes(id)
|
2020-02-18 08:57:00 +01:00
|
|
|
);
|
2019-10-08 19:41:14 +02:00
|
|
|
}
|
|
|
|
|
2019-01-21 15:08:22 +01:00
|
|
|
geoLocalize() {
|
|
|
|
const router = this.$router;
|
2020-02-18 08:57:00 +01:00
|
|
|
const sessionCity = sessionStorage.getItem("City");
|
2019-02-22 14:55:47 +01:00
|
|
|
|
2019-01-21 15:08:22 +01:00
|
|
|
if (sessionCity) {
|
2020-02-18 08:57:00 +01:00
|
|
|
return router.push({
|
|
|
|
name: "EventList",
|
|
|
|
params: { location: sessionCity },
|
|
|
|
});
|
2019-01-21 15:08:22 +01:00
|
|
|
}
|
2019-02-22 14:55:47 +01:00
|
|
|
|
|
|
|
navigator.geolocation.getCurrentPosition(
|
2020-02-18 08:57:00 +01:00
|
|
|
(pos) => {
|
2019-02-22 14:55:47 +01:00
|
|
|
const crd = pos.coords;
|
|
|
|
|
|
|
|
const geoHash = ngeohash.encode(crd.latitude, crd.longitude, 11);
|
2020-02-18 08:57:00 +01:00
|
|
|
sessionStorage.setItem("City", geoHash);
|
|
|
|
router.push({
|
|
|
|
name: RouteName.EVENT_LIST,
|
|
|
|
params: { location: geoHash },
|
|
|
|
});
|
2019-02-22 14:55:47 +01:00
|
|
|
},
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
(err) => console.warn(`ERROR(${err.code}): ${err.message}`),
|
2019-02-22 14:55:47 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
enableHighAccuracy: true,
|
|
|
|
timeout: 5000,
|
|
|
|
maximumAge: 0,
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-02-22 14:55:47 +01:00
|
|
|
);
|
2019-01-21 15:08:22 +01:00
|
|
|
}
|
|
|
|
|
2020-06-25 14:09:01 +02:00
|
|
|
eventDeleted(eventid: string) {
|
|
|
|
this.currentUserParticipations = this.currentUserParticipations.filter(
|
|
|
|
(participation) => participation.event.id !== eventid
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
// getAddressData(addressData) {
|
|
|
|
// const geoHash = ngeohash.encode(
|
|
|
|
// addressData.latitude,
|
|
|
|
// addressData.longitude,
|
|
|
|
// 11,
|
|
|
|
// );
|
|
|
|
// sessionStorage.setItem('City', geoHash);
|
2019-02-22 14:55:47 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
// this.$router.push({ name: RouteName.EVENT_LIST, params: { location: geoHash } });
|
|
|
|
// }
|
2019-01-21 15:08:22 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
viewEvent(event: IEvent) {
|
2019-02-22 14:55:47 +01:00
|
|
|
this.$router.push({ name: RouteName.EVENT, params: { uuid: event.uuid } });
|
2019-01-21 15:08:22 +01:00
|
|
|
}
|
|
|
|
|
2019-04-03 17:29:03 +02:00
|
|
|
// ipLocation() {
|
|
|
|
// return this.city.name ? this.city.name : this.country.name;
|
|
|
|
// }
|
2019-01-21 15:08:22 +01:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2019-09-20 18:22:03 +02:00
|
|
|
<style lang="scss" scoped>
|
2020-02-18 08:57:00 +01:00
|
|
|
@import "@/variables.scss";
|
2019-12-20 13:04:34 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
main > div > .container {
|
|
|
|
background: $white;
|
|
|
|
}
|
2019-12-20 13:04:34 +01:00
|
|
|
|
2019-01-21 15:08:22 +01:00
|
|
|
.search-autocomplete {
|
|
|
|
border: 1px solid #dbdbdb;
|
|
|
|
color: rgba(0, 0, 0, 0.87);
|
|
|
|
}
|
|
|
|
|
2019-10-07 16:48:13 +02:00
|
|
|
.events-featured {
|
|
|
|
.columns {
|
|
|
|
margin: 1rem auto 3rem;
|
|
|
|
}
|
2019-01-21 15:08:22 +01:00
|
|
|
}
|
2019-09-18 17:32:37 +02:00
|
|
|
|
|
|
|
.date-component-container {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin: 1.5rem auto;
|
|
|
|
|
|
|
|
h3.subtitle {
|
|
|
|
margin-left: 7px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
section.container {
|
|
|
|
margin: auto auto 3rem;
|
|
|
|
}
|
2019-09-18 17:32:37 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
span.view-all {
|
|
|
|
display: block;
|
|
|
|
margin-top: 2rem;
|
|
|
|
text-align: right;
|
2019-09-18 17:32:37 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
a {
|
|
|
|
text-decoration: underline;
|
2019-09-18 17:32:37 +02:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-10-05 19:07:50 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
section.hero {
|
|
|
|
margin-top: -3px;
|
|
|
|
background: lighten($secondary, 20%);
|
2019-10-05 19:07:50 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.title {
|
2020-06-17 15:54:24 +02:00
|
|
|
color: $background-color;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2020-02-18 08:47:41 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.column figure.image img {
|
|
|
|
max-width: 400px;
|
|
|
|
}
|
2019-10-10 13:39:24 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.instance-description {
|
|
|
|
margin-bottom: 1rem;
|
2019-10-05 19:07:50 +02:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
2019-01-21 15:08:22 +01:00
|
|
|
</style>
|