From 13a04c2312865fc56be47e133b395936fd76d600 Mon Sep 17 00:00:00 2001 From: awsr <43862868+awsr@users.noreply.github.com> Date: Tue, 16 Dec 2025 20:48:12 -0800 Subject: [PATCH 1/2] Add color-adjustable SVG string support --- modules/ui_symbols.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/ui_symbols.py b/modules/ui_symbols.py index d60aabe47..ddc16c273 100644 --- a/modules/ui_symbols.py +++ b/modules/ui_symbols.py @@ -40,3 +40,24 @@ sort_time_asc = '\uf0de' sort_time_dsc = '\uf0dd' style_apply = '↶' style_save = '↷' + +class SVGSymbol: + def __init__(self, svg: str): + self.svg = svg + self.before = "" + self.after = "" + self.supports_color = False + if "currentColor" in self.svg: + self.supports_color = True + self.before, self.after = self.svg.split("currentColor", maxsplit=1) + + def color(self, color: str): + if self.supports_color: + return self.before + color + self.after + else: + return self.svg + + def __str__(self): + return self.svg + +svg_bullet = SVGSymbol("") From 2a959737671aac1fb3c19ce6b50ba13fcacf458d Mon Sep 17 00:00:00 2001 From: awsr <43862868+awsr@users.noreply.github.com> Date: Tue, 16 Dec 2025 20:49:07 -0800 Subject: [PATCH 2/2] Fix and improve extension status icons --- modules/ui_extensions.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 640c0d622..836fe5db6 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -382,27 +382,27 @@ def create_html(search_text, sort_column): if ext.get('status', None) is None or type(ext['status']) == str: # old format ext['status'] = 0 if ext['url'] is None or ext['url'] == '': - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#00C0FD')}
" elif ext['status'] > 0: if ext['status'] == 1: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#00FD9C')}
" elif ext['status'] == 2: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#FFC300')}
" elif ext['status'] == 3: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#FFC300')}
" elif ext['status'] == 4: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#4E22FF')}
" elif ext['status'] == 5: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#CE0000')}
" elif ext['status'] == 6: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#AEAEAE')}
" else: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#008EBC')}
" else: if updated < datetime.timestamp(datetime.now() - timedelta(6*30)): - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#C000CF')}
" else: - status = f"{ui_symbols.bullet}" + status = f"
{ui_symbols.svg_bullet.color('#7C7C7C')}
" code += f"""