diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-10-29 20:27:13 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-10-29 20:27:13 -0700 |
| commit | 29ff6ad6bcf6e7bfc9fece59a3bd849a786022a1 (patch) | |
| tree | 00593a47efb36e4ca3ef4a54e45f906918082acd | |
| parent | 96bfe2e1505b4ae250f2d5201f9541ceb01cec84 (diff) | |
change banners to absolute url
| -rw-r--r-- | __pycache__/app.cpython-313.pyc | bin | 25145 -> 25241 bytes | |||
| -rw-r--r-- | app.py | 7 | ||||
| -rw-r--r-- | config.toml | 18 |
3 files changed, 14 insertions, 11 deletions
diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc Binary files differindex be184c3..8f15542 100644 --- a/__pycache__/app.cpython-313.pyc +++ b/__pycache__/app.cpython-313.pyc @@ -39,8 +39,11 @@ ALLOWED_STATIC_EXTENSIONS = { } -def safe_url(filename): - return quote(str(filename or ""), safe="/") +def safe_url(url): + raw = str(url or "").strip() + if not raw: + return "" + return quote(raw, safe=":/?&=#%+~@!$,;*-._") diff --git a/config.toml b/config.toml index e314aed..73bface 100644 --- a/config.toml +++ b/config.toml @@ -51,7 +51,7 @@ background_color = "#07111f" # Main background color panel_color = "#101b2d" # Main panel and channel block color accent_color = "#2589ff" # Buttons, highlights, and refresh timer text_color = "#e8f2ff" -banner_url = "banner.jpg" # Leave empty ("") to hide the header banner +banner_url = "banner.jpg" # Absolute URL (e.g. "https://...") or path; leave empty ("") to hide the header banner enable_stars = true # Set to true to enable a subtle animated space background # Interface buttons and links @@ -71,7 +71,7 @@ text = "another moekyun service" author = "" author_url = "" -# Channel customization. Exact channel name => image filename. +# Channel customization. Exact channel name => absolute image URL (e.g. "https://...") [channel_banners] "INFORMATION" = "info.png" "GAME SERVERS" = "game.jpeg" @@ -80,14 +80,14 @@ author_url = "" "Wonhee HQ" = "illit.jpg" [channel_icons] -# "Lobby" = "lobby_icon.png" -# "General" = "general_icon.png" +# "Lobby" = "https://example.com/lobby_icon.png" +# "General" = "https://example.com/general_icon.png" [generic_images] -background = "" # Default image applied to unknown channels -icon = "" # Default icon applied to unknown channels +background = "" # Default image URL applied to unknown channels +icon = "" # Default icon URL applied to unknown channels -# Server groups / roles: "GROUP_ID" = "Image" +# Server groups / roles: "GROUP_ID" = "https://example.com/role_icon.png" [role_icons] -# "6" = "admin.png" -# "9" = "vip.png" +# "6" = "https://example.com/admin.png" +# "9" = "https://example.com/vip.png" |
