From 29ff6ad6bcf6e7bfc9fece59a3bd849a786022a1 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Thu, 29 Oct 2026 20:27:13 -0700 Subject: change banners to absolute url --- __pycache__/app.cpython-313.pyc | Bin 25145 -> 25241 bytes app.py | 7 +++++-- config.toml | 18 +++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc index be184c3..8f15542 100644 Binary files a/__pycache__/app.cpython-313.pyc and b/__pycache__/app.cpython-313.pyc differ diff --git a/app.py b/app.py index 2b10dcd..2cf12f4 100644 --- a/app.py +++ b/app.py @@ -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" -- cgit v1.2.3