mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-01 19:32:34 +02:00
Apply review notes
This commit is contained in:
parent
d61ef04040
commit
b02ce036b5
2 changed files with 14 additions and 4 deletions
|
@ -35,7 +35,18 @@
|
||||||
|
|
||||||
<label for="server_url" class="form-label">{{ $t("telegramServerUrl") }}</label>
|
<label for="server_url" class="form-label">{{ $t("telegramServerUrl") }}</label>
|
||||||
<input id="server_url" v-model="$parent.notification.telegramServerUrl" type="text" class="form-control">
|
<input id="server_url" v-model="$parent.notification.telegramServerUrl" type="text" class="form-control">
|
||||||
<p class="form-text">{{ $t("telegramServerUrlDescription") }}</p>
|
<div class="form-text">
|
||||||
|
<i18n-t keypath="telegramServerUrlDescription">
|
||||||
|
<a
|
||||||
|
href="https://core.telegram.org/bots/api#using-a-local-bot-api-server"
|
||||||
|
target="_blank"
|
||||||
|
>{{ $t("here") }}</a>
|
||||||
|
<a
|
||||||
|
href="https://api.telegram.org"
|
||||||
|
target="_blank"
|
||||||
|
>https://api.telegram.org</a>
|
||||||
|
</i18n-t>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
@ -125,7 +136,6 @@ Uptime Kuma Alert{% if monitorJSON %} - {{ monitorJSON['name'] }}{% endif %}
|
||||||
* @returns {string} formatted URL
|
* @returns {string} formatted URL
|
||||||
*/
|
*/
|
||||||
telegramGetUpdatesURL(mode = "masked") {
|
telegramGetUpdatesURL(mode = "masked") {
|
||||||
let serverUrl = this.$parent.notification.telegramServerUrl;
|
|
||||||
let token = `<${this.$t("YOUR BOT TOKEN HERE")}>`;
|
let token = `<${this.$t("YOUR BOT TOKEN HERE")}>`;
|
||||||
|
|
||||||
if (this.$parent.notification.telegramBotToken) {
|
if (this.$parent.notification.telegramBotToken) {
|
||||||
|
@ -136,7 +146,7 @@ Uptime Kuma Alert{% if monitorJSON %} - {{ monitorJSON['name'] }}{% endif %}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${serverUrl}/bot${token}/getUpdates`;
|
return `${this.$parent.notification.telegramServerUrl}/bot${token}/getUpdates`;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -430,7 +430,7 @@
|
||||||
"supportTelegramChatID": "Support Direct Chat / Group / Channel's Chat ID",
|
"supportTelegramChatID": "Support Direct Chat / Group / Channel's Chat ID",
|
||||||
"wayToGetTelegramChatID": "You can get your chat ID by sending a message to the bot and going to this URL to view the chat_id:",
|
"wayToGetTelegramChatID": "You can get your chat ID by sending a message to the bot and going to this URL to view the chat_id:",
|
||||||
"telegramServerUrl": "(Optional) Server Url",
|
"telegramServerUrl": "(Optional) Server Url",
|
||||||
"telegramServerUrlDescription": "Telegram custom bot api server url. Defaults to https://api.telegram.org if empty.",
|
"telegramServerUrlDescription": "To lift Telegram's bot api limitations or gain access in blocked areas (China, Iran, etc). For more information click {0}. Default: {1}",
|
||||||
"YOUR BOT TOKEN HERE": "YOUR BOT TOKEN HERE",
|
"YOUR BOT TOKEN HERE": "YOUR BOT TOKEN HERE",
|
||||||
"chatIDNotFound": "Chat ID is not found; please send a message to this bot first",
|
"chatIDNotFound": "Chat ID is not found; please send a message to this bot first",
|
||||||
"disableCloudflaredNoAuthMsg": "You are in No Auth mode, a password is not required.",
|
"disableCloudflaredNoAuthMsg": "You are in No Auth mode, a password is not required.",
|
||||||
|
|
Loading…
Add table
Reference in a new issue