2020-06-05 15:20:53 +02:00
|
|
|
<template>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="dark:text-white">
|
|
|
|
<ShareModal
|
|
|
|
:title="t('Share this event')"
|
|
|
|
:text="event.title"
|
|
|
|
:url="event.url"
|
|
|
|
:input-label="t('Event URL')"
|
|
|
|
>
|
|
|
|
<o-notification
|
|
|
|
variant="warning"
|
|
|
|
v-if="event.visibility !== EventVisibility.PUBLIC"
|
|
|
|
:closable="false"
|
|
|
|
>
|
|
|
|
{{
|
|
|
|
$t(
|
|
|
|
"This event is accessible only through it's link. Be careful where you post this link."
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
</o-notification>
|
|
|
|
<o-notification
|
|
|
|
variant="danger"
|
|
|
|
v-if="event.status === EventStatus.CANCELLED"
|
|
|
|
:closable="false"
|
|
|
|
>
|
|
|
|
{{ $t("This event has been cancelled.") }}
|
|
|
|
</o-notification>
|
|
|
|
<o-notification variant="warning" v-if="!eventCapacityOK">
|
|
|
|
{{ $t("All the places have already been taken") }}
|
|
|
|
</o-notification>
|
|
|
|
</ShareModal>
|
2020-06-05 15:20:53 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
2020-11-27 19:27:44 +01:00
|
|
|
import { EventStatus, EventVisibility } from "@/types/enums";
|
2022-07-12 10:55:28 +02:00
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
import { IEvent } from "@/types/event.model";
|
|
|
|
import ShareModal from "@/components/Share/ShareModal.vue";
|
|
|
|
|
2022-08-26 16:08:58 +02:00
|
|
|
withDefaults(
|
2022-07-12 10:55:28 +02:00
|
|
|
defineProps<{
|
|
|
|
event: IEvent;
|
|
|
|
eventCapacityOK?: boolean;
|
|
|
|
}>(),
|
|
|
|
{ eventCapacityOK: true }
|
|
|
|
);
|
|
|
|
|
|
|
|
const { t } = useI18n({ useScope: "global" });
|
2020-06-05 15:20:53 +02:00
|
|
|
</script>
|