complete refactor javascript to typescript and reorg frontend files and folders

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-05-20 11:40:17 +02:00
parent 4341193b35
commit 4b2f38ab7f
174 changed files with 22603 additions and 3989 deletions
+4 -2
View File
@@ -1,3 +1,4 @@
import os
import math
from typing import NamedTuple
@@ -6,6 +7,7 @@ from PIL import Image, ImageDraw, ImageFont
from modules import script_callbacks, shared
from modules.logger import log
from modules.paths import script_path
class Grid(NamedTuple):
@@ -143,9 +145,9 @@ class GridAnnotation:
def get_font(fontsize: float):
try:
return ImageFont.truetype(shared.opts.font or "javascript/notosans-nerdfont-regular.ttf", fontsize)
return ImageFont.truetype(shared.opts.font or os.path.join(script_path, "ui", "fonts", "notosans-nerdfont-regular.ttf"), fontsize)
except Exception:
return ImageFont.truetype("javascript/notosans-nerdfont-regular.ttf", fontsize)
return ImageFont.truetype(os.path.join(script_path, "ui", "fonts", "notosans-nerdfont-regular.ttf"), fontsize)
def draw_grid_annotations(im: Image.Image, width: int, height: int, x_texts: list[list[GridAnnotation]], y_texts: list[list[GridAnnotation]], margin=0, title: list[GridAnnotation] | None = None):