feat: tune visual of web app admin panel

This commit is contained in:
3252a8
2026-05-10 20:19:43 +03:00
parent ff59eda3d7
commit e01f56bc34
11 changed files with 918 additions and 188 deletions
+16 -16
View File
@@ -46,29 +46,29 @@ class NotificationService:
user_id: int,
referrer_id: Optional[int] = None,
) -> InlineKeyboardMarkup:
"""Create inline keyboard with links to user (and referrer) profiles."""
buttons = [
[
InlineKeyboardButton(
text=translate(
"log_open_profile_link",
),
url=f"tg://user?id={user_id}",
)
]
]
"""Create inline keyboard with links to user (and referrer) profiles.
if referrer_id:
Email-only users have a synthetic negative ``user_id`` with no
Telegram profile, so we skip the tg:// button for them.
"""
buttons = []
if user_id and user_id > 0:
buttons.append([
InlineKeyboardButton(
text=translate(
"log_open_referrer_profile_button",
),
text=translate("log_open_profile_link"),
url=f"tg://user?id={user_id}",
)
])
if referrer_id and referrer_id > 0:
buttons.append([
InlineKeyboardButton(
text=translate("log_open_referrer_profile_button"),
url=f"tg://user?id={referrer_id}",
)
])
return InlineKeyboardMarkup(inline_keyboard=buttons)
return InlineKeyboardMarkup(inline_keyboard=buttons) if buttons else None
async def _send_to_log_channel(
self,