2022-05-23 01:32:36 -07:00
|
|
|
<template>
|
|
|
|
<div class="mb-3">
|
2022-05-23 12:08:56 -07:00
|
|
|
<label for="ntfy-ntfytopic" class="form-label">{{ $t("ntfy Topic") }}</label>
|
2022-05-23 01:32:36 -07:00
|
|
|
<div class="input-group mb-3">
|
|
|
|
<input id="ntfy-ntfytopic" v-model="$parent.notification.ntfytopic" type="text" class="form-control" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="ntfy-server-url" class="form-label">{{ $t("Server URL") }}</label>
|
|
|
|
<div class="input-group mb-3">
|
|
|
|
<input id="ntfy-server-url" v-model="$parent.notification.ntfyserverurl" type="text" class="form-control" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="ntfy-priority" class="form-label">{{ $t("Priority") }}</label>
|
2022-05-23 12:08:11 -07:00
|
|
|
<input id="ntfy-priority" v-model="$parent.notification.ntfyPriority" type="number" class="form-control" required min="1" max="5" step="1">
|
2022-05-23 01:32:36 -07:00
|
|
|
</div>
|
2022-10-03 00:51:29 -07:00
|
|
|
<div class="mb-3">
|
|
|
|
<label for="ntfy-username" class="form-label">{{ $t("Username") }} ({{ $t("Optional") }})</label>
|
2022-07-19 01:57:52 -07:00
|
|
|
<div class="input-group mb-3">
|
2022-10-07 05:46:43 -07:00
|
|
|
<input id="ntfy-username" v-model="$parent.notification.ntfyusername" type="text" class="form-control">
|
2022-07-19 01:57:52 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mb-3">
|
2022-10-03 00:51:29 -07:00
|
|
|
<label for="ntfy-password" class="form-label">{{ $t("Password") }} ({{ $t("Optional") }})</label>
|
2022-07-19 01:57:52 -07:00
|
|
|
<div class="input-group mb-3">
|
2022-10-03 00:51:29 -07:00
|
|
|
<HiddenInput id="ntfy-password" v-model="$parent.notification.ntfypassword" autocomplete="new-password"></HiddenInput>
|
2022-07-19 01:57:52 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-09-28 01:13:18 -07:00
|
|
|
<div class="mb-3">
|
|
|
|
<label for="ntfy-icon" class="form-label">{{ $t("IconUrl") }}</label>
|
2022-10-11 02:15:33 -07:00
|
|
|
<input id="ntfy-icon" v-model="$parent.notification.ntfyIcon" type="text" class="form-control">
|
2022-09-28 01:13:18 -07:00
|
|
|
</div>
|
2022-05-23 01:32:36 -07:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-07-19 01:57:52 -07:00
|
|
|
import HiddenInput from "../HiddenInput.vue";
|
|
|
|
|
2022-05-23 01:32:36 -07:00
|
|
|
export default {
|
2022-07-19 01:57:52 -07:00
|
|
|
components: {
|
|
|
|
HiddenInput,
|
|
|
|
},
|
2022-05-23 01:32:36 -07:00
|
|
|
mounted() {
|
|
|
|
if (typeof this.$parent.notification.ntfyPriority === "undefined") {
|
2022-05-23 12:11:01 -07:00
|
|
|
this.$parent.notification.ntfyserverurl = "https://ntfy.sh";
|
2022-05-23 12:08:11 -07:00
|
|
|
this.$parent.notification.ntfyPriority = 5;
|
2022-05-23 01:32:36 -07:00
|
|
|
}
|
|
|
|
},
|
2022-05-23 12:13:57 -07:00
|
|
|
};
|
2022-05-23 01:32:36 -07:00
|
|
|
</script>
|