Merge branch 'dashboard' into 'master'

Add link to event and group creation on dashboard

See merge request framasoft/mobilizon!161
This commit is contained in:
Thomas Citharel 2019-07-23 18:53:03 +02:00
commit d2a44f2df4

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div class="container">
<section class="hero is-link" v-if="!currentUser.id || !loggedPerson"> <section class="hero is-link" v-if="!currentUser.id || !loggedPerson">
<div class="hero-body"> <div class="hero-body">
<div class="container"> <div class="container">
@ -21,6 +21,20 @@
>Welcome back %{username}</translate> >Welcome back %{username}</translate>
</h1> </h1>
</section> </section>
<b-dropdown aria-role="list">
<button class="button is-primary" slot="trigger">
<span>Create</span>
<b-icon icon="menu-down"></b-icon>
</button>
<b-dropdown-item aria-role="listitem">
<router-link :to="{ name: RouteName.CREATE_EVENT }">Event</router-link>
</b-dropdown-item>
<b-dropdown-item aria-role="listitem">
<router-link :to="{ name: RouteName.CREATE_GROUP }">Group</router-link>
</b-dropdown-item>
<b-dropdown-item aria-role="listitem">Something else</b-dropdown-item>
</b-dropdown>
<section v-if="loggedPerson" class="container"> <section v-if="loggedPerson" class="container">
<span class="events-nearby title"><translate>Events you're going at</translate></span> <span class="events-nearby title"><translate>Events you're going at</translate></span>
<b-loading :active.sync="$apollo.loading"></b-loading> <b-loading :active.sync="$apollo.loading"></b-loading>
@ -126,6 +140,7 @@ export default class Home extends Vue {
loggedPerson: IPerson = new Person(); loggedPerson: IPerson = new Person();
currentUser!: ICurrentUser; currentUser!: ICurrentUser;
config: IConfig = { description: '', name: '', registrationsOpen: false }; config: IConfig = { description: '', name: '', registrationsOpen: false };
RouteName = RouteName;
// get displayed_name() { // get displayed_name() {
// return this.loggedPerson && this.loggedPerson.name === null // return this.loggedPerson && this.loggedPerson.name === null