forked from louislam/uptime-kuma
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request louislam#2744 from bobby-ore/add-lunasea-user-id
Add ability to use User ID for LunaSea notifications
- Loading branch information
Showing
2 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
<template> | ||
<div class="mb-3"> | ||
<label for="lunasea-device" class="form-label">{{ $t("LunaSea Device ID") }}<span style="color: red;"><sup>*</sup></span></label> | ||
<input id="lunasea-device" v-model="$parent.notification.lunaseaDevice" type="text" class="form-control" required> | ||
<label for="lunasea-notification-target" class="form-label">{{ $t("Target") }}<span style="color: red;"><sup>*</sup></span></label> | ||
<div class="form-text"> | ||
<p><span style="color: red;"><sup>*</sup></span>{{ $t("Required") }}</p> | ||
<p> | ||
<select id="lunasea-notification-target" v-model="$parent.notification.lunaseaTarget" class="form-select" required> | ||
<option value="device">Device</option> | ||
<option value="user">User</option> | ||
</select> | ||
</p> | ||
</div> | ||
<div v-if="$parent.notification.lunaseaTarget === 'device'"> | ||
<label for="lunasea-device" class="form-label">{{ $t("Device ID") }}<span style="color: red;"><sup>*</sup></span></label> | ||
<input id="lunasea-device" v-model="$parent.notification.lunaseaDevice" type="text" class="form-control"> | ||
</div> | ||
<div v-if="$parent.notification.lunaseaTarget === 'user'"> | ||
<label for="lunasea-device" class="form-label">{{ $t("User ID") }}<span style="color: red;"><sup>*</sup></span></label> | ||
<input id="lunasea-device" v-model="$parent.notification.lunaseaUserID" type="text" class="form-control"> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
export default { | ||
mounted() { | ||
if (typeof this.$parent.notification.lunaseaTarget === "undefined") { | ||
this.$parent.notification.lunaseaTarget = "device"; | ||
} | ||
} | ||
}; | ||
</script> |