diff --git a/.gitignore b/.gitignore index d3b153ad..4b4c2302 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ venv.bak/ /import/ /imports/ /servers/ +/app/frontend/static/assets/images/custom/ /app/frontend/static/assets/images/auth/custom/ /backups/ /temp/ diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 8df48431..8fd4bec3 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -905,13 +905,13 @@ class PanelHandler(BaseHandler): self.helper.ensure_dir_exists( os.path.join( self.controller.project_root, - "app/frontend/static/assets/images/auth/custom", + "app/frontend/static/assets/images/custom", ) ) for item in os.listdir( os.path.join( self.controller.project_root, - "app/frontend/static/assets/images/auth/custom", + "app/frontend/static/assets/images/custom", ) ): if item not in page_data["backgrounds"]: diff --git a/app/classes/web/routes/api/crafty/config/index.py b/app/classes/web/routes/api/crafty/config/index.py index d625d339..22d1c35f 100644 --- a/app/classes/web/routes/api/crafty/config/index.py +++ b/app/classes/web/routes/api/crafty/config/index.py @@ -39,8 +39,10 @@ config_json_schema = { customize_json_schema = { "type": "object", "properties": { - "photo": {"type": "string"}, - "opacity": {"type": "string"}, + "bg_photo": {"type": "string"}, + "bg_opacity": {"type": "string"}, + "logo_long": {"type": "string"}, + "logo_square": {"type" "string"}, }, "additionalProperties": False, "minProperties": 1, @@ -302,7 +304,7 @@ class ApiCraftyCustomizeIndexHandler(BaseApiHandler): FileHelpers.del_file( os.path.join( self.controller.project_root, - f"app/frontend/static/assets/images/auth/custom/{data['photo']}", + f"app/frontend/static/assets/images/custom/{data['photo']}", ) ) current = self.controller.cached_login diff --git a/app/classes/web/routes/api/crafty/upload/index.py b/app/classes/web/routes/api/crafty/upload/index.py index b37ef796..9ea929ef 100644 --- a/app/classes/web/routes/api/crafty/upload/index.py +++ b/app/classes/web/routes/api/crafty/upload/index.py @@ -69,7 +69,7 @@ class ApiFilesUploadHandler(BaseApiHandler): u_type = "admin_config" self.upload_dir = os.path.join( self.controller.project_root, - "app/frontend/static/assets/images/auth/custom", + "app/frontend/static/assets/images/custom", ) accepted_types = IMAGE_MIME_TYPES elif upload_type == "import": diff --git a/app/frontend/templates/panel/custom_login.html b/app/frontend/templates/panel/custom_login.html index 84af79e6..316b8946 100644 --- a/app/frontend/templates/panel/custom_login.html +++ b/app/frontend/templates/panel/custom_login.html @@ -377,7 +377,7 @@ var src_path = "../../static/assets/images/auth/".concat($("#photo").val()); } else { - var src_path = "../../static/assets/images/auth/custom/".concat($("#photo").val()); + var src_path = "../../static/assets/images/custom/".concat($("#photo").val()); } img.src = src_path; }