Skip to content

Commit dd684ae

Browse files
committed
Добавлен вывод дополнительной информации для пользователя на начальном экране.
1 parent 00d9eec commit dd684ae

1 file changed

Lines changed: 36 additions & 7 deletions

File tree

main.py

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,18 +305,47 @@ async def main(page: ft.Page):
305305

306306
card = ft.Card(
307307
shadow_color=ft.Colors.ON_SURFACE_VARIANT,
308+
show_border_on_foreground=True,
308309
content=ft.Container(
309310
width=580,
310311
padding=10,
311312
content=ft.ListTile(
312-
# bgcolor=ft.Colors.GREY_400,
313-
# leading=ft.Icon(ft.Icons.FOREST),
314313
title=ft.Text(
315-
f"Подключенных аккаунтов: {len(session_string)}\n"
316-
f"Групп для рассылки сообщений по чатам: {len(writing_group_links)}\n"
317-
f"Групп для инвайтинга: {len(links_inviting)}\n"
318-
f"Всего username: {len(usernames)}"
319-
),
314+
spans=[
315+
ft.TextSpan(
316+
text="Подключенных аккаунтов: ",
317+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
318+
),
319+
ft.TextSpan(
320+
text=f"{len(session_string)}\n",
321+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD), # 🔴
322+
),
323+
ft.TextSpan(
324+
text="Групп для рассылки сообщений по чатам: ",
325+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
326+
),
327+
ft.TextSpan(
328+
text=f"{len(writing_group_links)}\n",
329+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD),
330+
),
331+
ft.TextSpan(
332+
text="Групп для инвайтинга: ",
333+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
334+
),
335+
ft.TextSpan(
336+
text=f"{len(links_inviting)}\n",
337+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD),
338+
),
339+
ft.TextSpan(
340+
text="Всего username: ",
341+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
342+
),
343+
ft.TextSpan(
344+
text=f"{len(usernames)}",
345+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD),
346+
),
347+
],
348+
)
320349
),
321350
),
322351
)

0 commit comments

Comments
 (0)