calendar link and typed link

This commit is contained in:
Julian Krauser 2024-12-05 16:37:10 +01:00
parent e9a3e0c872
commit bf3e0cd245
10 changed files with 236 additions and 5 deletions

View file

@ -0,0 +1,36 @@
<template>
<div class="w-full md:max-w-md">
<div class="flex flex-col items-center">
<p class="text-xl font-medium">Kalenderlink</p>
</div>
<br />
<TextCopy :copyText="generatedLink" />
<div class="flex flex-row justify-end">
<div class="flex flex-row gap-4 py-2">
<button primary-outline @click="closeModal">schließen</button>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { defineComponent } from "vue";
import { mapState, mapActions } from "pinia";
import { useModalStore } from "@/stores/modal";
import TextCopy from "@/components/TextCopy.vue";
import { host } from "@/serverCom";
</script>
<script lang="ts">
export default defineComponent({
computed: {
generatedLink() {
return `webcal://${host || window.location.host}/api/public/calendar`;
},
},
methods: {
...mapActions(useModalStore, ["closeModal"]),
},
});
</script>