Skip to content

Commit

Permalink
UI groups in notifications extension
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpozdeev committed Jan 19, 2024
1 parent 700e58e commit 34e8421
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ext/notifications/extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bundleId": "notifications",
"name": "Notifications",
"version": "1.2",
"version": "1.2.1",
"description": "Notify about new tasks and lists on e-mail or telegram"
}
5 changes: 3 additions & 2 deletions src/ext/notifications/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"notifications.urlconfigwarning": "Enable PHP 'allow_url_fopen' directive to use Telegram notifications.",
"notifications.check": "Check",
"notifications.bot_not_configured": "Bot is not configured",
"notifications.h_email": "E-Mail:",
"notifications.g_email": "E-Mail",
"notifications.h_email": "E-mail:",
"notifications.d_email": "Separate multiple addresses with comma.",
"notifications.h_mailfrom": "Mail from:",
"notifications.d_mailfrom": "Use this e-mail as sender's address.",
"notifications.h_telegram": "Telegram",
"notifications.g_telegram": "Telegram",
"notifications.h_token": "Bot token:",
"notifications.d_token": "Telegram Bot API token from @BotFather.",
"notifications.h_active_chats": "Active chats:",
Expand Down
5 changes: 3 additions & 2 deletions src/ext/notifications/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"notifications.urlconfigwarning": "Для использования Telegram требуется включить директиву 'allow_url_fopen' в настройках PHP .",
"notifications.check": "Проверить",
"notifications.bot_not_configured": "Бот не настроен",
"notifications.h_email": "E-Mail:",
"notifications.g_email": "E-Mail",
"notifications.h_email": "E-mail:",
"notifications.d_email": "Разделите несколько адресов c помощью запятой.",
"notifications.h_mailfrom": "Адрес отправителя:",
"notifications.d_mailfrom": "Этот адрес будет указан как адрес отправителя в письмах с уведомлениями.",
"notifications.h_telegram": "Telegram",
"notifications.g_telegram": "Telegram",
"notifications.h_token": "Токен для бота:",
"notifications.d_token": "Токен для телеграм-бота, полученный от @BotFather.",
"notifications.h_active_chats": "Активные чаты:",
Expand Down
13 changes: 11 additions & 2 deletions src/ext/notifications/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ function settingsPage(): string
return
<<<EOD
$warning
<div class="tr group-header">
<div class="th"> {$e('notifications.g_email')} </div>
</div>
<div class="group">
<div class="tr">
<div class="th"> {$e('notifications.h_email')}
<div class="descr">{$e('notifications.d_email')}</div>
Expand All @@ -125,9 +130,12 @@ function settingsPage(): string
</div>
<div class="td"> <input name="mailfrom" value="$mailfrom" class="in350" autocomplete="email" placeholder="$mailfromDefault"> </div>
</div>
<div class="tr">
<div class="th"> {$e('notifications.h_telegram')} </div>
</div><!--/group-->
<div class="tr group-header">
<div class="th"> {$e('notifications.g_telegram')} </div>
</div>
<div class="group">
<div class="tr">
<div class="th"> {$e('notifications.h_token')}
<div class="descr">{$e('notifications.d_token')}</div>
Expand All @@ -146,6 +154,7 @@ function settingsPage(): string
</div>
<div class="td"> $newChat </div>
</div>
</div><!--/group-->
EOD;
}

Expand Down

0 comments on commit 34e8421

Please sign in to comment.