fix: update button field

This commit is contained in:
ihmily
2026-04-30 16:02:17 +08:00
parent 2e1f60f9f4
commit 33e822e884
4 changed files with 7 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ class LoginPage:
)
self.login_button = ft.Button(
text=self._["login_button"],
content=self._["login_button"],
width=320,
on_click=self.handle_login,
style=ft.ButtonStyle(
@@ -148,14 +148,14 @@ class LoginPage:
self.show_error(self._["input_required"])
return
original_text = self.login_button.text
self.login_button.text = self._["login_in_progress"]
original_text = self.login_button.content
self.login_button.content = self._["login_in_progress"]
self.login_button.disabled = True
self.page.update()
success, token = await self.auth_manager.authenticate(username, password)
self.login_button.text = original_text
self.login_button.content = original_text
self.login_button.disabled = False
self.page.update()

View File

@@ -1377,7 +1377,7 @@ class SettingsPage(PageBase):
old_password_field = ft.TextField(
password=True,
width=300,
label=self._["old_password"],
label=self._["old_password"] + " | " + self._["default_old_password"],
)
new_password_field = ft.TextField(

View File

@@ -243,6 +243,7 @@
"login_required_disabled": "Secure login disabled",
"current_username": "Current Username",
"old_password": "Old Password",
"default_old_password": "default: admin",
"new_password": "New Password",
"confirm_password": "Confirm Password",
"change_password": "Change Password",

View File

@@ -243,6 +243,7 @@
"login_required_disabled": "已禁用安全登录",
"current_username": "当前用户名",
"old_password": "旧密码",
"default_old_password": "默认: admin",
"new_password": "新密码",
"confirm_password": "确认密码",
"change_password": "修改密码",