Add Bark Notification Parameters

pull/1751/head
Super Manito 2 years ago
parent 11243a6ca1
commit 817c941489

@ -12,9 +12,7 @@ const { default: axios } = require("axios");
// bark is an APN bridge that sends notifications to Apple devices.
const barkNotificationGroup = "UptimeKuma";
const barkNotificationAvatar = "https://github.com/louislam/uptime-kuma/raw/master/public/icon.png";
const barkNotificationSound = "telegraph";
const successMessage = "Successes!";
class Bark extends NotificationProvider {
@ -53,10 +51,21 @@ class Bark extends NotificationProvider {
appendAdditionalParameters(postUrl) {
// grouping all our notifications
postUrl += "?group=" + barkNotificationGroup;
if (notification.barkGroup != null) {
postUrl += "&group=" + notification.barkGroup;
} else {
postUrl += "&group=" + "UptimeKuma";
// default group
}
// set icon to uptime kuma icon, 11kb should be fine
postUrl += "&icon=" + barkNotificationAvatar;
// picked a sound, this should follow system's mute status when arrival
postUrl += "&sound=" + barkNotificationSound;
if (notification.barkSound != null) {
postUrl += "&sound=" + notification.barkSound;
} else {
postUrl += "&sound=" + "telegraph";
// default sound
}
return postUrl;
}

@ -12,4 +12,110 @@
>{{ $t("here") }}</a>
</i18n-t>
</div>
<div class="mb-3">
<label for="Bark Group" class="form-label">{{ $t("Bark Group") }}</label>
<input id="Bark Group" v-model="$parent.notification.barkGroup" type="text" class="form-control" required>
</div>
<div class="mb-3">
<label for="Bark Sound" class="form-label">{{ $t("Bark Sound") }}</label>
<select id="Bark Sound" v-model="$parent.notification.barkSound" class="form-select" required>
<option value="alarm">
alarm
</option>
<option value="anticipate">
anticipate
</option>
<option value="bell">
bell
</option>
<option value="birdsong">
birdsong
</option>
<option value="bloom">
bloom
</option>
<option value="calypso">
calypso
</option>
<option value="chime">
chime
</option>
<option value="choo">
choo
</option>
<option value="descent">
descent
</option>
<option value="electronic">
electronic
</option>
<option value="fanfare">
fanfare
</option>
<option value="glass">
glass
</option>
<option value="gotosleep">
gotosleep
</option>
<option value="healthnotification">
healthnotification
</option>
<option value="horn">
horn
</option>
<option value="ladder">
ladder
</option>
<option value="mailsent">
mailsent
</option>
<option value="minuet">
minuet
</option>
<option value="multiwayinvitation">
multiwayinvitation
</option>
<option value="newmail">
newmail
</option>
<option value="newsflash">
newsflash
</option>
<option value="noir">
noir
</option>
<option value="paymentsuccess">
paymentsuccess
</option>
<option value="shake">
shake
</option>
<option value="sherwoodforest">
sherwoodforest
</option>
<option value="silence">
silence
</option>
<option value="spell">
spell
</option>
<option value="suspense">
suspense
</option>
<option value="telegraph">
telegraph
</option>
<option value="tiptoes">
tiptoes
</option>
<option value="typewriters">
typewriters
</option>
<option value="update">
update
</option>
</select>
</div>
</template>

@ -389,6 +389,8 @@ export default {
SignName: "Знак име",
"Sms template must contain parameters: ": "SMS шаблонът трябва да съдържа следните параметри: ",
"Bark Endpoint": "Bark крайна точка",
"Bark Group": "Bark група",
"Bark Sound": "Bark Звънене",
WebHookUrl: "URL адрес на уеб кука",
SecretKey: "Таен ключ",
"For safety, must use secret key": "За сигурност, трябва да се използва таен ключ",

@ -389,6 +389,8 @@ export default {
SignName: "Signaturname",
"Sms template must contain parameters: ": "SMS Vorlage muss folgende Parameter enthalten: ",
"Bark Endpoint": "Bark Endpunkt",
"Bark Group": "Bark Gruppe",
"Bark Sound": "Bark Klingelton",
WebHookUrl: "Webhook URL",
SecretKey: "Geheimer Schlüssel",
"For safety, must use secret key": "Zur Sicherheit muss ein geheimer Schlüssel verwendet werden",

@ -406,6 +406,8 @@ export default {
SignName: "SignName",
"Sms template must contain parameters: ": "Sms template must contain parameters: ",
"Bark Endpoint": "Bark Endpoint",
"Bark Group": "Bark Group",
"Bark Sound": "Bark Sound",
WebHookUrl: "WebHookUrl",
SecretKey: "SecretKey",
"For safety, must use secret key": "For safety, must use secret key",

@ -406,6 +406,8 @@ export default {
SignName: "SignName",
"Sms template must contain parameters: ": "Sms 템플릿은 다음과 같은 파라미터가 포함되어야 해요:",
"Bark Endpoint": "Bark Endpoint",
"Bark Group": "Bark Group",
"Bark Sound": "Bark Sound",
WebHookUrl: "웹훅 URL",
SecretKey: "Secret Key",
"For safety, must use secret key": "안전을 위해 꼭 Secret Key를 사용하세요.",

@ -397,6 +397,8 @@ export default {
SignName: "SignName",
"Sms template must contain parameters: ": "Sms sjabloon moet de volgende parameters bevatten: ",
"Bark Endpoint": "Bark Endpoint",
"Bark Group": "Bark Group",
"Bark Sound": "Bark Sound",
WebHookUrl: "WebHookUrl",
SecretKey: "SecretKey",
"For safety, must use secret key": "Voor de veiligheid moet je de secret key gebruiken",

@ -396,6 +396,8 @@ export default {
SignName: "Podpis",
"Sms template must contain parameters: ": "Szablon sms musi posiadać parametry: ",
"Bark Endpoint": "Punkt końcowy Bark",
"Bark Group": "grupa Bark",
"Bark Sound": "Dzwonek Bark",
WebHookUrl: "WebHookUrl",
SecretKey: "Tajny klucz",
"For safety, must use secret key": "Ze względów bezpieczeństwa musisz użyć tajnego klucza",

@ -396,6 +396,8 @@ export default {
SignName: "ป้ายชื่อ",
"Sms template must contain parameters: ": "เทมเพลต SMS ต้องมีพารามิเตอร์ : ",
"Bark Endpoint": "Bark Endpoint",
"Bark Group": "Bark Group",
"Bark Sound": "Bark Sound",
WebHookUrl: "WebHookUrl",
SecretKey: "SecretKey",
"For safety, must use secret key": "เพื่อความปลอดภัย จำเป็นต้องตั้งค่ากุญแจการเข้าถึง",

@ -397,6 +397,8 @@ export default {
SignName: "SignName",
"Sms template must contain parameters: ": "Sms şablonu parametreleri içermelidir:",
"Bark Endpoint": "Bark Endpoint",
"Bark Group": "Bark Group",
"Bark Sound": "Bark Sound",
WebHookUrl: "WebHookUrl",
SecretKey: "SecretKey",
"For safety, must use secret key": "Güvenlik için gizli anahtar kullanılmalıdır",

@ -396,6 +396,8 @@ export default {
SignName: "SignName",
"Sms template must contain parameters: ": "Sms template must contain parameters: ",
"Bark Endpoint": "Bark Endpoint",
"Bark Group": "Bark Group",
"Bark Sound": "Bark Sound",
WebHookUrl: "WebHookUrl",
SecretKey: "SecretKey",
"For safety, must use secret key": "Để an toàn, hãy dùng secret key",

@ -402,6 +402,8 @@ export default {
TemplateCode: "TemplateCode",
SignName: "SignName",
"Bark Endpoint": "Bark 接入点",
"Bark Group": "Bark 群组",
"Bark Sound": "Bark 铃声",
"Device Token": "Apple Device Token",
Platform: "平台",
iOS: "iOS",

@ -396,6 +396,8 @@ export default {
SignName: "SignName",
"Sms template must contain parameters: ": "Sms 範本必須包含參數:",
"Bark Endpoint": "Bark 端點",
"Bark Group": "Bark 群組",
"Bark Sound": "Bark 鈴聲",
WebHookUrl: "WebHookUrl",
SecretKey: "SecretKey",
"For safety, must use secret key": "為了安全起見,必須使用秘密金鑰",

Loading…
Cancel
Save