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

35 lines
1.9 KiB
Vue
Raw Normal View History

2021-10-05 18:03:56 +00:00
<template>
<div class="mb-3">
2021-10-05 19:59:58 +00:00
<label for="homeserver-url" class="form-label">Homeserver URL (with http(s):// and optionally port)</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">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">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>Required
<p style="margin-top: 8px;">
2021-10-06 11:44:36 +00:00
You can find the internal room ID by looking in the advanced section of the room settings in your Matrix client. It should look like !QMdRCpUIfLwsfjxye6:home.server.
2021-10-05 19:59:58 +00:00
</p>
<p style="margin-top: 8px;">
2021-10-06 11:44:36 +00:00
It is highly recommended you create a new user and do not use your own Matrix user's access token as it will allow full access to your account and all the rooms you joined. Instead, create a new user and only invite it to the room that you want to receive the notification in. You can get the access token by running <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>.
2021-10-05 19:59:58 +00:00
</p>
</div>
2021-10-05 18:03:56 +00:00
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
export default {
components: {
HiddenInput,
},
}
</script>