forked from potsda.mn/mobilizon
Event components enhancements
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
dd8096507b
commit
8e59e2f06b
|
@ -22,7 +22,7 @@ export default class EventBanner extends Vue {
|
||||||
.banner-container {
|
.banner-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 400px;
|
height: 30vh;
|
||||||
}
|
}
|
||||||
::v-deep img {
|
::v-deep img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<h3 class="title">{{ participation.event.title }}</h3>
|
<h3 class="title">{{ participation.event.title }}</h3>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="participation-actor has-text-grey">
|
<div class="participation-actor">
|
||||||
<span>
|
<span>
|
||||||
<b-icon
|
<b-icon
|
||||||
icon="earth"
|
icon="earth"
|
||||||
|
@ -50,8 +50,11 @@
|
||||||
"
|
"
|
||||||
>{{ participation.event.physicalAddress.locality }} -</span
|
>{{ participation.event.physicalAddress.locality }} -</span
|
||||||
>
|
>
|
||||||
<span>
|
<i18n
|
||||||
<i18n tag="span" path="Organized by {name}">
|
tag="span"
|
||||||
|
path="Organized by {name}"
|
||||||
|
v-if="organizerActor.id !== currentActor.id"
|
||||||
|
>
|
||||||
<popover-actor-card
|
<popover-actor-card
|
||||||
slot="name"
|
slot="name"
|
||||||
:actor="organizerActor"
|
:actor="organizerActor"
|
||||||
|
@ -60,7 +63,7 @@
|
||||||
{{ organizerActor.displayName() }}
|
{{ organizerActor.displayName() }}
|
||||||
</popover-actor-card>
|
</popover-actor-card>
|
||||||
</i18n>
|
</i18n>
|
||||||
</span>
|
<span v-else>{{ $t("Organized by you") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
|
@ -116,7 +119,9 @@
|
||||||
$tc(
|
$tc(
|
||||||
"{count} requests waiting",
|
"{count} requests waiting",
|
||||||
participation.event.participantStats.notApproved,
|
participation.event.participantStats.notApproved,
|
||||||
{ count: participation.event.participantStats.notApproved }
|
{
|
||||||
|
count: participation.event.participantStats.notApproved,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</b-button>
|
</b-button>
|
||||||
|
@ -347,6 +352,7 @@ article.box {
|
||||||
.list-card {
|
.list-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 0 6px;
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
padding-right: 7.5px;
|
padding-right: 7.5px;
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default class EventMetadataBlock extends Vue {
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #f7ba30;
|
color: $violet;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.eventMetadataBlock {
|
div.eventMetadataBlock {
|
||||||
|
|
|
@ -66,7 +66,9 @@ export default class OrganizerPicker extends Vue {
|
||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
if (this.currentActor) {
|
if (this.currentActor) {
|
||||||
return this.currentActor;
|
return this.identities.find(
|
||||||
|
(identity) => identity.id === this.currentActor.id
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,6 +110,7 @@ import { IActor, IGroup, IPerson, usernameWithDomain } from "../../types/actor";
|
||||||
import OrganizerPicker from "./OrganizerPicker.vue";
|
import OrganizerPicker from "./OrganizerPicker.vue";
|
||||||
import {
|
import {
|
||||||
CURRENT_ACTOR_CLIENT,
|
CURRENT_ACTOR_CLIENT,
|
||||||
|
IDENTITIES,
|
||||||
LOGGED_USER_MEMBERSHIPS,
|
LOGGED_USER_MEMBERSHIPS,
|
||||||
} from "../../graphql/actor";
|
} from "../../graphql/actor";
|
||||||
import { Paginate } from "../../types/paginate";
|
import { Paginate } from "../../types/paginate";
|
||||||
|
@ -152,6 +153,7 @@ const MEMBER_ROLES = [
|
||||||
},
|
},
|
||||||
update: (data) => data.loggedUser.memberships,
|
update: (data) => data.loggedUser.memberships,
|
||||||
},
|
},
|
||||||
|
identities: IDENTITIES,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export default class OrganizerPickerWrapper extends Vue {
|
export default class OrganizerPickerWrapper extends Vue {
|
||||||
|
@ -161,6 +163,8 @@ export default class OrganizerPickerWrapper extends Vue {
|
||||||
|
|
||||||
currentActor!: IPerson;
|
currentActor!: IPerson;
|
||||||
|
|
||||||
|
identities!: IPerson[];
|
||||||
|
|
||||||
isComponentModalActive = false;
|
isComponentModalActive = false;
|
||||||
|
|
||||||
@Prop({ type: Array, required: false, default: () => [] })
|
@Prop({ type: Array, required: false, default: () => [] })
|
||||||
|
@ -200,7 +204,9 @@ export default class OrganizerPickerWrapper extends Vue {
|
||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
if (this.currentActor) {
|
if (this.currentActor) {
|
||||||
return this.currentActor;
|
return this.identities.find(
|
||||||
|
(identity) => identity.id === this.currentActor.id
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<transition appear name="fade" mode="out-in">
|
<transition appear name="fade" mode="out-in">
|
||||||
<div>
|
<div class="wrapper">
|
||||||
<div
|
<event-banner :picture="event.picture" />
|
||||||
class="header-picture"
|
<div class="intro-wrapper">
|
||||||
v-if="event.picture"
|
<div class="date-calendar-icon-wrapper">
|
||||||
:style="`background-image: url('${event.picture.url}')`"
|
|
||||||
/>
|
|
||||||
<div class="header-picture-default" v-else />
|
|
||||||
<section class="section intro">
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column is-1-tablet">
|
|
||||||
<date-calendar-icon :date="event.beginsOn" />
|
<date-calendar-icon :date="event.beginsOn" />
|
||||||
</div>
|
</div>
|
||||||
|
<section class="intro">
|
||||||
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h1 class="title" style="margin: 0">{{ event.title }}</h1>
|
<h1 class="title" style="margin: 0">{{ event.title }}</h1>
|
||||||
<div class="organizer">
|
<div class="organizer">
|
||||||
|
@ -294,6 +290,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
</div>
|
||||||
<div class="event-description-wrapper">
|
<div class="event-description-wrapper">
|
||||||
<aside class="event-metadata">
|
<aside class="event-metadata">
|
||||||
<div class="sticky">
|
<div class="sticky">
|
||||||
|
@ -662,6 +659,7 @@ import { IConfig } from "../../types/config.model";
|
||||||
import Subtitle from "../../components/Utils/Subtitle.vue";
|
import Subtitle from "../../components/Utils/Subtitle.vue";
|
||||||
import Tag from "../../components/Tag.vue";
|
import Tag from "../../components/Tag.vue";
|
||||||
import EventMetadataBlock from "../../components/Event/EventMetadataBlock.vue";
|
import EventMetadataBlock from "../../components/Event/EventMetadataBlock.vue";
|
||||||
|
import EventBanner from "../../components/Event/EventBanner.vue";
|
||||||
import ActorCard from "../../components/Account/ActorCard.vue";
|
import ActorCard from "../../components/Account/ActorCard.vue";
|
||||||
import PopoverActorCard from "../../components/Account/PopoverActorCard.vue";
|
import PopoverActorCard from "../../components/Account/PopoverActorCard.vue";
|
||||||
import { IParticipant } from "../../types/participant.model";
|
import { IParticipant } from "../../types/participant.model";
|
||||||
|
@ -683,6 +681,7 @@ import { ApolloCache, FetchResult, InMemoryCache } from "@apollo/client/core";
|
||||||
Tag,
|
Tag,
|
||||||
ActorCard,
|
ActorCard,
|
||||||
PopoverActorCard,
|
PopoverActorCard,
|
||||||
|
EventBanner,
|
||||||
"map-leaflet": () =>
|
"map-leaflet": () =>
|
||||||
import(/* webpackChunkName: "map" */ "../../components/Map.vue"),
|
import(/* webpackChunkName: "map" */ "../../components/Map.vue"),
|
||||||
ShareEventModal: () =>
|
ShareEventModal: () =>
|
||||||
|
@ -1308,18 +1307,6 @@ export default class Event extends EventMixin {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-picture,
|
|
||||||
.header-picture-default {
|
|
||||||
height: 400px;
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-picture-default {
|
|
||||||
background-image: url("../../../public/img/mobilizon_default_card.png");
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sidebar {
|
div.sidebar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
@ -1353,7 +1340,7 @@ div.sidebar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.intro.section {
|
.intro {
|
||||||
background: white;
|
background: white;
|
||||||
|
|
||||||
.is-3-tablet {
|
.is-3-tablet {
|
||||||
|
|
Loading…
Reference in a new issue