Add kook notification provider

This commit is contained in:
401Unauthorized
2022-12-27 14:05:45 +08:00
parent f6ea1fe9a5
commit c60b741406
6 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<template>
<div class="mb-3">
<label for="kook-bot-token" class="form-label">{{ $t("Bot Token") }}</label>
<HiddenInput id="kook-bot-token" v-model="$parent.notification.kookBotToken" :required="true" autocomplete="new-password"></HiddenInput>
<i18n-t tag="div" keypath="wayToGetKookBotToken" class="form-text">
<a href="https://developer.kookapp.cn/bot" target="_blank">https://developer.kookapp.cn/bot</a>
</i18n-t>
</div>
<div class="mb-3">
<label for="kook-guild-id" class="form-label">{{ $t("Guild ID") }}</label>
<div class="input-group mb-3">
<input id="kook-guild-id" v-model="$parent.notification.kookGuildID" type="text" class="form-control" required>
</div>
<div class="form-text">
<p style="margin-top: 8px;">
{{ $t("wayToGetKookGuildID") }}
</p>
</div>
</div>
<i18n-t tag="p" keypath="More info on:" style="margin-top: 8px;">
<a href="https://developer.kookapp.cn" target="_blank">https://developer.kookapp.cn</a>
</i18n-t>
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
export default {
components: {
HiddenInput,
}
}
</script>

View File

@@ -12,6 +12,7 @@ import GoogleChat from "./GoogleChat.vue";
import Gorush from "./Gorush.vue";
import Gotify from "./Gotify.vue";
import HomeAssistant from "./HomeAssistant.vue";
import Kook from "./Kook.vue";
import Line from "./Line.vue";
import LineNotify from "./LineNotify.vue";
import LunaSea from "./LunaSea.vue";
@@ -63,6 +64,7 @@ const NotificationFormList = {
"gorush": Gorush,
"gotify": Gotify,
"HomeAssistant": HomeAssistant,
"Kook": Kook,
"line": Line,
"LineNotify": LineNotify,
"lunasea": LunaSea,

View File

@@ -270,6 +270,10 @@ export default {
apprise: "Apprise (Support 50+ Notification services)",
GoogleChat: "Google Chat (Google Workspace only)",
pushbullet: "Pushbullet",
Kook: "Kook",
wayToGetKookBotToken: "Create application and get your bot token at {0}",
wayToGetKookGuildID: "Switch on 'Developer Mode' in Kook setting, and right click the guild to get its ID",
"Guild ID": "Guild ID",
line: "Line Messenger",
mattermost: "Mattermost",
"User Key": "User Key",

View File

@@ -250,6 +250,10 @@ export default {
apprise: "Apprise (支持 50+ 种通知服务)",
GoogleChat: "Google Chat仅 Google Workspace",
pushbullet: "Pushbullet",
Kook: "Kook",
wayToGetKookBotToken: "在 {0} 创建应用并获取机器人 Token",
wayToGetKookGuildID: "在Kook设置中打开 ‘开发者模式’,然后右键频道可获取其 ID",
"Guild ID": "频道 ID",
line: "Line Messenger",
mattermost: "Mattermost",
"User Key": "User Key",