mirror of
https://github.com/LibraHp/GetQzonehistory.git
synced 2025-01-04 03:09:09 +00:00
添加为空时显示
This commit is contained in:
parent
e3397ca0c0
commit
1ff49d6910
17
main.py
17
main.py
@ -286,6 +286,9 @@ class PaginatedContainer(ft.UserControl):
|
|||||||
if current_row.controls:
|
if current_row.controls:
|
||||||
rows.controls.append(current_row)
|
rows.controls.append(current_row)
|
||||||
|
|
||||||
|
# 如果传入的数据为空
|
||||||
|
if not current_data:
|
||||||
|
rows.controls.append(ft.Text("没有更多数据了"))
|
||||||
# 最终将所有卡片的布局添加到 content_area
|
# 最终将所有卡片的布局添加到 content_area
|
||||||
self.content_area.controls.append(rows)
|
self.content_area.controls.append(rows)
|
||||||
|
|
||||||
@ -339,6 +342,15 @@ class Message:
|
|||||||
return f"{user_info}\n{time_info}\n{content_info}\n{type_info}\n{comment_info}\n{images_info}"
|
return f"{user_info}\n{time_info}\n{content_info}\n{type_info}\n{comment_info}\n{images_info}"
|
||||||
|
|
||||||
|
|
||||||
|
def reset_save_content():
|
||||||
|
global all_messages, user_says, forward, leaves, other, friends
|
||||||
|
all_messages = []
|
||||||
|
user_says = []
|
||||||
|
forward = []
|
||||||
|
leaves = []
|
||||||
|
other = []
|
||||||
|
friends = []
|
||||||
|
|
||||||
|
|
||||||
def main(page: ft.Page):
|
def main(page: ft.Page):
|
||||||
page.window.center()
|
page.window.center()
|
||||||
@ -359,6 +371,7 @@ def main(page: ft.Page):
|
|||||||
user_info.content.controls[1].value = "LibraHp"
|
user_info.content.controls[1].value = "LibraHp"
|
||||||
global now_login_user
|
global now_login_user
|
||||||
now_login_user = None
|
now_login_user = None
|
||||||
|
reset_save_content()
|
||||||
content_area.content = create_get_content_page()
|
content_area.content = create_get_content_page()
|
||||||
for tab in tabs.controls:
|
for tab in tabs.controls:
|
||||||
if tab.data != "GetContent" and tab.data != "Logout" and tab.data != "Github":
|
if tab.data != "GetContent" and tab.data != "Logout" and tab.data != "Github":
|
||||||
@ -721,7 +734,7 @@ def main(page: ft.Page):
|
|||||||
controls=[
|
controls=[
|
||||||
ft.Card(
|
ft.Card(
|
||||||
content=ft.Container(
|
content=ft.Container(
|
||||||
content=ft.Text("转发共有 " + str(889) + " 条", size=25),
|
content=ft.Text("转发共有 " + str(forward.__len__()) + " 条", size=25),
|
||||||
padding=20,
|
padding=20,
|
||||||
alignment=ft.alignment.center,
|
alignment=ft.alignment.center,
|
||||||
),
|
),
|
||||||
@ -773,7 +786,7 @@ def main(page: ft.Page):
|
|||||||
),
|
),
|
||||||
ft.Row(
|
ft.Row(
|
||||||
controls=[
|
controls=[
|
||||||
ft.Text(f"最早的说说发布在{all_messages[0].time}", size=20),
|
ft.Text(f"最早的说说发布在{all_messages[all_messages.__len__() - 1].time}", size=20),
|
||||||
ft.Text("程序完全免费,请勿用于商业用途!", size=20),
|
ft.Text("程序完全免费,请勿用于商业用途!", size=20),
|
||||||
],
|
],
|
||||||
alignment="center",
|
alignment="center",
|
||||||
|
Loading…
Reference in New Issue
Block a user