uptime-kuma/src/components/notifications/Matrix.vue

35 lines
1.6 KiB
Vue
Raw Normal View History

2021-10-05 18:03:56 +00:00
<template>
<div class="mb-3">
<label for="homeserver-url" class="form-label">{{ $t("matrixHomeserverURL") }}</label><span style="color: red;"><sup>*</sup></span>
2021-10-05 18:03:56 +00:00
<input id="homeserver-url" v-model="$parent.notification.homeserverUrl" type="text" class="form-control" :required="true">
2021-10-05 19:59:58 +00:00
</div>
<div class="mb-3">
<label for="internal-room-id" class="form-label">{{ $t("Internal Room Id") }}</label><span style="color: red;"><sup>*</sup></span>
2021-10-05 18:03:56 +00:00
<input id="internal-room-id" v-model="$parent.notification.internalRoomId" type="text" class="form-control" required="true">
2021-10-05 19:59:58 +00:00
</div>
<div class="mb-3">
<label for="access-token" class="form-label">{{ $t("Access Token") }}</label><span style="color: red;"><sup>*</sup></span>
2021-10-05 18:03:56 +00:00
<HiddenInput id="access-token" v-model="$parent.notification.accessToken" :required="true" autocomplete="one-time-code" :maxlength="500"></HiddenInput>
</div>
2021-10-05 19:59:58 +00:00
<div class="form-text">
<span style="color: red;"><sup>*</sup></span>{{ $t("Required") }}
2021-10-05 19:59:58 +00:00
<p style="margin-top: 8px;">
{{ $t("matrixDesc1") }}
2021-10-05 19:59:58 +00:00
</p>
<i18n-t tag="p" keypath="matrixDesc2" style="margin-top: 8px;">
<code>curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "botusername", "type": "m.id.user"}, "password": "passwordforuser"}' "https://home.server/_matrix/client/r0/login"</code>.
</i18n-t>
2021-10-05 19:59:58 +00:00
</div>
2021-10-05 18:03:56 +00:00
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
export default {
components: {
HiddenInput,
},
};
2021-10-05 18:03:56 +00:00
</script>