Apply review notes

This commit is contained in:
Ramin Mazloomi 2025-03-21 05:54:49 +03:30
parent d61ef04040
commit b02ce036b5
2 changed files with 14 additions and 4 deletions
src
components/notifications
lang

View file

@ -35,7 +35,18 @@
<label for="server_url" class="form-label">{{ $t("telegramServerUrl") }}</label>
<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 class="mb-3">
@ -125,7 +136,6 @@ Uptime Kuma Alert{% if monitorJSON %} - {{ monitorJSON['name'] }}{% endif %}
* @returns {string} formatted URL
*/
telegramGetUpdatesURL(mode = "masked") {
let serverUrl = this.$parent.notification.telegramServerUrl;
let token = `<${this.$t("YOUR BOT TOKEN HERE")}>`;
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`;
},
/**

View file

@ -430,7 +430,7 @@
"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:",
"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",
"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.",