blob: 9e46459dee3a91aa99951912913bc724d85a92dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<template>
<div class="mb-3">
<label class="form-label" for="threema-recipient">{{ $t("threemaRecipientType") }}</label>
<select
id="threema-recipient" v-model="$parent.notification.threemaRecipientType" required
class="form-select"
>
<option value="identity">{{ $t("threemaRecipientTypeIdentity") }}</option>
<option value="phone">{{ $t("threemaRecipientTypePhone") }}</option>
<option value="email">{{ $t("threemaRecipientTypeEmail") }}</option>
</select>
</div>
<div v-if="$parent.notification.threemaRecipientType === 'identity'" class="mb-3">
<label class="form-label" for="threema-recipient">{{ $t("threemaRecipient") }} {{ $t("threemaRecipientTypeIdentity") }}</label>
<input
id="threema-recipient"
v-model="$parent.notification.threemaRecipient"
class="form-control"
minlength="8"
maxlength="8"
pattern="[A-Z0-9]{8}"
required
type="text"
>
<div class="form-text">
<p>{{ $t("threemaRecipientTypeIdentityFormat") }}</p>
</div>
</div>
<div v-else-if="$parent.notification.threemaRecipientType === 'phone'" class="mb-3">
<label class="form-label" for="threema-recipient">{{ $t("threemaRecipient") }} {{ $t("threemaRecipientTypePhone") }}</label>
<input
id="threema-recipient"
v-model="$parent.notification.threemaRecipient"
class="form-control"
maxlength="15"
pattern="\d{1,15}"
required
type="text"
>
<div class="form-text">
<p>{{ $t("threemaRecipientTypePhoneFormat") }}</p>
</div>
</div>
<div v-else-if="$parent.notification.threemaRecipientType === 'email'" class="mb-3">
<label class="form-label" for="threema-recipient">{{ $t("threemaRecipient") }} {{ $t("threemaRecipientTypeEmail") }}</label>
<input
id="threema-recipient"
v-model="$parent.notification.threemaRecipient"
class="form-control"
maxlength="254"
required
type="email"
>
</div>
<div class="mb-3">
<label class="form-label" for="threema-sender">{{ $t("threemaSenderIdentity") }}</label>
<input
id="threema-sender"
v-model="$parent.notification.threemaSenderIdentity"
class="form-control"
minlength="8"
maxlength="8"
pattern="^\*[A-Z0-9]{7}$"
required
type="text"
>
<div class="form-text">
<p>{{ $t("threemaSenderIdentityFormat") }}</p>
</div>
</div>
<div class="mb-3">
<label class="form-label" for="threema-secret">{{ $t("threemaApiAuthenticationSecret") }}</label>
<HiddenInput
id="threema-secret" v-model="$parent.notification.threemaSecret" required
autocomplete="false"
></HiddenInput>
</div>
<i18n-t class="form-text" keypath="wayToGetThreemaGateway" tag="div">
<a href="https://threema.ch/en/gateway" target="_blank">{{ $t("here") }}</a>
</i18n-t>
<i18n-t class="form-text" keypath="threemaBasicModeInfo" tag="div">
<a href="https://gateway.threema.ch/en/developer/api" target="_blank">{{ $t("here") }}</a>
</i18n-t>
</template>
<script lang="ts" setup>
import HiddenInput from "../HiddenInput.vue";
</script>
|