diff --git a/__init__.py b/__init__.py index 363f1df..0ff578a 100644 --- a/__init__.py +++ b/__init__.py @@ -241,18 +241,7 @@ def check_model_existence(metadata_path, config_manager, id_model=None): - -# If is different from ComfyUISidebar, change it -if __package__ != "ComfyUI-N-Sidebar": - RED = "\033[31m" - END = '\33[0m' - print(f"{RED}!!!{END}") - print(f"{RED}!!!{END}") - print(f"{RED}WARNING:'{__package__}' folder name is WRONG!!! Please rename it 'ComfyUI-N-Sidebar'.{END}") - print(f"{RED}!!!{END}") - print(f"{RED}!!!{END}") -else: - print("ComfyUI-N-Sidebar is loading...") +print("ComfyUI-N-Sidebar is loading...") @@ -299,6 +288,18 @@ for folder in folders: list_panels_array.append(folder) + +@server.PromptServer.instance.routes.get("/sidebar/current" ) +async def s_get(request): + #current directory + current_dir = os.path.dirname(os.path.realpath(__file__)) + current_dir_name = os.path.basename(current_dir) + + return web.json_response(current_dir_name, content_type='application/json') + + + + @server.PromptServer.instance.routes.get("/sidebar/backup" ) async def s_get(request): backup_path = file_path + ".bak" diff --git a/app/css/base_style_sb.css b/app/css/base_style_sb.css index 2496bb9..8415109 100644 --- a/app/css/base_style_sb.css +++ b/app/css/base_style_sb.css @@ -760,8 +760,8 @@ /* Settings */ #switch_settings{ - bottom: 5px; - position: absolute; + /*bottom: 5px; + position: absolute;*/ width: -moz-available; /* WebKit-based browsers will ignore this. */ width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */ width: fill-available; diff --git a/app/html/sidebar.html b/app/html/sidebar.html index 8b65fa4..0cc33a5 100644 --- a/app/html/sidebar.html +++ b/app/html/sidebar.html @@ -7,11 +7,12 @@ C