diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index 8636e4f..93b1ca0 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -34,9 +34,13 @@ class ConfigModel(BaseModel): doors: list[int] class __Image(BaseModel): + class __Font(BaseModel): + file: str + size: int + size: int border: int - fonts: list[tuple[str, int]] + fonts: list[__Font] class __WebDAV(BaseModel): url: str @@ -61,9 +65,9 @@ async def get_config_model( "puzzle": { "solution": cfg.puzzle.solution, "shuffled": shuffled_solution, - "begin": date.today(), - "end": date.today(), - "closing": date.today(), + "begin": date.today(), # TODO + "end": date.today(), # TODO + "closing": date.today(), # TODO "seed": cfg.puzzle.random_seed, }, "calendar": { @@ -72,9 +76,9 @@ async def get_config_model( "doors": [door.day for door in cal_cfg.doors], }, "image": { - "size": 500, - "border": 30, - "fonts": [(cfg.server.font, 50)], + "size": 500, # TODO + "border": 30, # TODO + "fonts": [{"file": cfg.server.font, "size": 50}], }, "webdav": { "url": SETTINGS.webdav.url, diff --git a/ui/src/components/ConfigView.vue b/ui/src/components/ConfigView.vue index 99db282..afd8d8a 100644 --- a/ui/src/components/ConfigView.vue +++ b/ui/src/components/ConfigView.vue @@ -31,7 +31,9 @@