Show event onlineAddress

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-10-14 14:38:21 +02:00
parent cad508a9bb
commit e0826b4e87
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 11 additions and 0 deletions

View File

@ -118,6 +118,10 @@ import {ParticipantRole} from "@/types/event.model";
</div> </div>
</b-modal> </b-modal>
</div> </div>
<span class="online-address" v-if="event.onlineAddress">
<b-icon icon="link"></b-icon>
<a :href="event.onlineAddress">{{ urlToHostname(event.onlineAddress) }}</a>
</span>
<div class="organizer"> <div class="organizer">
<span> <span>
<span v-if="event.organizerActor"> <span v-if="event.organizerActor">
@ -544,6 +548,9 @@ export default class Event extends EventMixin {
return this.event.options.maximumAttendeeCapacity - this.event.participantStats.participants; return this.event.options.maximumAttendeeCapacity - this.event.participantStats.participants;
} }
urlToHostname(url: string): string {
return (new URL(url)).hostname;
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -627,6 +634,10 @@ export default class Event extends EventMixin {
} }
} }
span.online-address {
display: flex;
}
div.organizer { div.organizer {
display: inline-flex; display: inline-flex;
padding-top: 10px; padding-top: 10px;