extend calendar link

This commit is contained in:
Julian Krauser 2024-12-24 14:06:42 +01:00
parent d6743f0d16
commit 368169f80f

View file

@ -72,6 +72,14 @@
</p> </p>
<br /> <br />
<TextCopy :copyText="generatedLink" /> <TextCopy :copyText="generatedLink" />
<div v-if="selectedTypes.length != 0" class="flex flex-row gap-2 items-center">
<input
type="checkbox"
id="nscdr"
v-model="provideNSCDR"
/>
<label for="nscdr">Standard-Typen trotz Auswahl ausliefern</label>
</div>
<br /> <br />
</div> </div>
@ -111,6 +119,7 @@ export default defineComponent({
data() { data() {
return { return {
selectedTypes: [] as Array<CalendarTypeViewModel>, selectedTypes: [] as Array<CalendarTypeViewModel>,
provideNSCDR: false as boolean
}; };
}, },
computed: { computed: {
@ -124,7 +133,7 @@ export default defineComponent({
}, },
generatedLink() { generatedLink() {
let extend = this.selectedTypes.map((t) => [t.type, t.passphrase].filter((at) => at).join(":")); let extend = this.selectedTypes.map((t) => [t.type, t.passphrase].filter((at) => at).join(":"));
return `webcal://${host || window.location.host}/api/public/calendar${extend.length == 0 ? "" : "?types=" + extend.join("&types=")}`; return `webcal://${host || window.location.host}/api/public/calendar${extend.length == 0 ? "" : "?types=" + extend.join("&types=")}${this.provideNSCDR && extend.length != 0 ? '&nscdr=true':''}`;
}, },
}, },
mounted() { mounted() {