Add custom theme support, token refresh settings and check account login status.

Now launch log viewer has a new look.

Fix an issue that causes credentials method option not working.

Add log view to settings page.
This commit is contained in:
wei committed 2026-10-14 00:31:37 +08:00
1 parent 6e29fe1d5c
commit 1bafc60d95
25 files changed
+1149 -199

No files matched your search

+23
View File
@@ -490,3 +490,26 @@ def update_profile(profiles: dict, profile_id: str, profile_data: dict, fix_wron
return profiles, profile_id
def set_last_used_time(profiles: dict, profile_id: str, time: datetime.datetime):
"""
Set profile last used time.
:param profiles: Profiles data
:param profile_id: Target profile ID.
:param time: The time to set
:return:
"""
if not is_profile_exists(profiles, profile_id):
raise ProfileException(
"Specified profile id {} not found.".format(profile_id)
)
profiles["profiles"][profile_id]["lastUsed"] = time.isoformat().replace("+00:00", "Z")
def set_last_used_time_to_current(profiles: dict, profile_id: str):
"""
Set profile last used time to the current time.
:param profiles: Profiles data
:param profile_id: Target profile ID.
:return:
"""
set_last_used_time(profiles, profile_id, datetime.datetime.now(datetime.timezone.utc))