update: added gb button

This commit is contained in:
JOhn 2026-11-05 07:27:18 -05:00
parent 6a38019724
commit 373253fa22
2 changed files with 15 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

15
gui/v2/actions/resume_data.py Executable file
View file

@ -0,0 +1,15 @@
import os
def system_profile_image(btn_path: str, protocol: str, location: str) -> str:
"""Use prepared Singbox location artwork without generic substitutes while preserving other protocols' fallbacks."""
image_path = os.path.join(btn_path, f"{protocol}_{location}.png")
if protocol in ("hysteria2", "vless"):
return image_path
candidates = (
image_path,
os.path.join(btn_path, f"icon_{location}.png"),
os.path.join(btn_path, "system_wide_global.png"),
)
return next((path for path in candidates if os.path.exists(path)), candidates[-1])