forked from Support/sp-hydra-veil-gui
update: added gb button
This commit is contained in:
parent
6a38019724
commit
373253fa22
2 changed files with 15 additions and 0 deletions
BIN
gui/resources/images/button_GB_COV.png
Executable file
BIN
gui/resources/images/button_GB_COV.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 8 KiB |
15
gui/v2/actions/resume_data.py
Executable file
15
gui/v2/actions/resume_data.py
Executable 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])
|
||||||
Loading…
Reference in a new issue