Skip to content

Commit 76f33f5

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

2 files changed

Lines changed: 45 additions & 11 deletions

File tree

main.py

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,54 @@ async def main_view(page: ft.Page):
6565
fit=ft.BoxFit.CONTAIN,
6666
)
6767

68+
session_string = getting_account() # Получаем строку сессии из файла базы данных
69+
usernames = getting_members() # Получаем username из базы данных
70+
writing_group_links = get_links_table_group_send_messages()
71+
links_inviting = get_links_inviting()
72+
6873
card = ft.Card(
6974
shadow_color=ft.Colors.ON_SURFACE_VARIANT,
75+
show_border_on_foreground=True,
7076
content=ft.Container(
71-
width=400,
77+
width=580,
7278
padding=10,
7379
content=ft.ListTile(
74-
# bgcolor=ft.Colors.GREY_400,
75-
# leading=ft.Icon(ft.Icons.FOREST),
7680
title=ft.Text(
77-
"Подключенных аккаунтов\n"
78-
"Групп для рассылки\n"
79-
"Групп для инвайтинга\n"
80-
"Всего username"
81-
),
81+
spans=[
82+
ft.TextSpan(
83+
text="Подключенных аккаунтов: ",
84+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
85+
),
86+
ft.TextSpan(
87+
text=f"{len(session_string)}\n",
88+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD), # 🔴
89+
),
90+
ft.TextSpan(
91+
text="Групп для рассылки сообщений по чатам: ",
92+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
93+
),
94+
ft.TextSpan(
95+
text=f"{len(writing_group_links)}\n",
96+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD),
97+
),
98+
ft.TextSpan(
99+
text="Групп для инвайтинга: ",
100+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
101+
),
102+
ft.TextSpan(
103+
text=f"{len(links_inviting)}\n",
104+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD),
105+
),
106+
ft.TextSpan(
107+
text="Всего username: ",
108+
style=ft.TextStyle(weight=ft.FontWeight.BOLD, color=ft.Colors.GREY_900),
109+
),
110+
ft.TextSpan(
111+
text=f"{len(usernames)}",
112+
style=ft.TextStyle(color=ft.Colors.RED_500, weight=ft.FontWeight.BOLD),
113+
),
114+
],
115+
)
82116
),
83117
),
84118
)

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
flet~=0.80.1
22
loguru~=0.7.3
33
configparser~=7.2.0
4-
phonenumbers~=9.0.20
4+
phonenumbers~=9.0.25
55
requests~=2.32.5
66
Telethon~=1.42.0
77
thefuzz~=0.22.1
88
scheduler~=0.8.8
99
openpyxl~=3.1.5
1010
uvicorn~=0.41.0
11-
fastapi~=0.133.0
11+
fastapi~=0.135.1
1212
PyYAML~=6.0.3
1313
jinja2~=3.1.6
1414
flet-desktop~=0.80.1
1515
flet-cli~=0.80.1
16-
peewee~=4.0.0
16+
peewee~=4.0.1
1717
python-csv~=0.0.14
1818
python-socks~=2.8.1
1919
progress~=1.6.1

0 commit comments

Comments
 (0)