mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 10:02:28 +08:00
remove legacy ui components
- default_ui - a1111
This commit is contained in:
parent
268b84a2b6
commit
ede8279c17
@ -42,7 +42,7 @@ import manager_downloader
|
|||||||
from node_package import InstalledNodePackage
|
from node_package import InstalledNodePackage
|
||||||
|
|
||||||
|
|
||||||
version_code = [3, 14, 1]
|
version_code = [3, 15]
|
||||||
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
||||||
|
|
||||||
|
|
||||||
@ -1550,7 +1550,6 @@ def write_config():
|
|||||||
'share_option': get_config()['share_option'],
|
'share_option': get_config()['share_option'],
|
||||||
'bypass_ssl': get_config()['bypass_ssl'],
|
'bypass_ssl': get_config()['bypass_ssl'],
|
||||||
"file_logging": get_config()['file_logging'],
|
"file_logging": get_config()['file_logging'],
|
||||||
'default_ui': get_config()['default_ui'],
|
|
||||||
'component_policy': get_config()['component_policy'],
|
'component_policy': get_config()['component_policy'],
|
||||||
'windows_selector_event_loop_policy': get_config()['windows_selector_event_loop_policy'],
|
'windows_selector_event_loop_policy': get_config()['windows_selector_event_loop_policy'],
|
||||||
'model_download_by_agent': get_config()['model_download_by_agent'],
|
'model_download_by_agent': get_config()['model_download_by_agent'],
|
||||||
@ -1589,7 +1588,6 @@ def read_config():
|
|||||||
'share_option': default_conf['share_option'] if 'share_option' in default_conf else 'all',
|
'share_option': default_conf['share_option'] if 'share_option' in default_conf else 'all',
|
||||||
'bypass_ssl': default_conf['bypass_ssl'].lower() == 'true' if 'bypass_ssl' in default_conf else False,
|
'bypass_ssl': default_conf['bypass_ssl'].lower() == 'true' if 'bypass_ssl' in default_conf else False,
|
||||||
'file_logging': default_conf['file_logging'].lower() == 'true' if 'file_logging' in default_conf else True,
|
'file_logging': default_conf['file_logging'].lower() == 'true' if 'file_logging' in default_conf else True,
|
||||||
'default_ui': default_conf['default_ui'] if 'default_ui' in default_conf else 'none',
|
|
||||||
'component_policy': default_conf['component_policy'] if 'component_policy' in default_conf else 'workflow',
|
'component_policy': default_conf['component_policy'] if 'component_policy' in default_conf else 'workflow',
|
||||||
'windows_selector_event_loop_policy': default_conf['windows_selector_event_loop_policy'].lower() == 'true' if 'windows_selector_event_loop_policy' in default_conf else False,
|
'windows_selector_event_loop_policy': default_conf['windows_selector_event_loop_policy'].lower() == 'true' if 'windows_selector_event_loop_policy' in default_conf else False,
|
||||||
'model_download_by_agent': default_conf['model_download_by_agent'].lower() == 'true' if 'model_download_by_agent' in default_conf else False,
|
'model_download_by_agent': default_conf['model_download_by_agent'].lower() == 'true' if 'model_download_by_agent' in default_conf else False,
|
||||||
@ -1606,7 +1604,6 @@ def read_config():
|
|||||||
'share_option': 'all',
|
'share_option': 'all',
|
||||||
'bypass_ssl': False,
|
'bypass_ssl': False,
|
||||||
'file_logging': True,
|
'file_logging': True,
|
||||||
'default_ui': 'none',
|
|
||||||
'component_policy': 'workflow',
|
'component_policy': 'workflow',
|
||||||
'windows_selector_event_loop_policy': False,
|
'windows_selector_event_loop_policy': False,
|
||||||
'model_download_by_agent': False,
|
'model_download_by_agent': False,
|
||||||
|
|||||||
@ -175,10 +175,6 @@ def set_preview_method(method):
|
|||||||
set_preview_method(core.get_config()['preview_method'])
|
set_preview_method(core.get_config()['preview_method'])
|
||||||
|
|
||||||
|
|
||||||
def set_default_ui_mode(mode):
|
|
||||||
core.get_config()['default_ui'] = mode
|
|
||||||
|
|
||||||
|
|
||||||
def set_component_policy(mode):
|
def set_component_policy(mode):
|
||||||
core.get_config()['component_policy'] = mode
|
core.get_config()['component_policy'] = mode
|
||||||
|
|
||||||
@ -1374,17 +1370,6 @@ async def preview_method(request):
|
|||||||
return web.Response(status=200)
|
return web.Response(status=200)
|
||||||
|
|
||||||
|
|
||||||
@routes.get("/manager/default_ui")
|
|
||||||
async def default_ui_mode(request):
|
|
||||||
if "value" in request.rel_url.query:
|
|
||||||
set_default_ui_mode(request.rel_url.query['value'])
|
|
||||||
core.write_config()
|
|
||||||
else:
|
|
||||||
return web.Response(text=core.get_config()['default_ui'], status=200)
|
|
||||||
|
|
||||||
return web.Response(status=200)
|
|
||||||
|
|
||||||
|
|
||||||
@routes.get("/manager/component/policy")
|
@routes.get("/manager/component/policy")
|
||||||
async def component_policy(request):
|
async def component_policy(request):
|
||||||
if "value" in request.rel_url.query:
|
if "value" in request.rel_url.query:
|
||||||
|
|||||||
@ -40,7 +40,7 @@ docStyle.innerHTML = `
|
|||||||
|
|
||||||
#cm-manager-dialog {
|
#cm-manager-dialog {
|
||||||
width: 1000px;
|
width: 1000px;
|
||||||
height: 520px;
|
height: 450px;
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@ -137,7 +137,7 @@ docStyle.innerHTML = `
|
|||||||
|
|
||||||
.cm-notice-board {
|
.cm-notice-board {
|
||||||
width: 290px;
|
width: 290px;
|
||||||
height: 270px;
|
height: 210px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
color: var(--input-text);
|
color: var(--input-text);
|
||||||
border: 1px solid var(--descrip-text);
|
border: 1px solid var(--descrip-text);
|
||||||
@ -908,19 +908,6 @@ class ManagerMenuDialog extends ComfyDialog {
|
|||||||
switch_comfyui_button,
|
switch_comfyui_button,
|
||||||
fetch_updates_button,
|
fetch_updates_button,
|
||||||
|
|
||||||
$el("br", {}, []),
|
|
||||||
$el("button.cm-button", {
|
|
||||||
type: "button",
|
|
||||||
textContent: "Alternatives of A1111",
|
|
||||||
onclick:
|
|
||||||
() => {
|
|
||||||
if(!CustomNodesManager.instance) {
|
|
||||||
CustomNodesManager.instance = new CustomNodesManager(app, self);
|
|
||||||
}
|
|
||||||
CustomNodesManager.instance.show(CustomNodesManager.ShowMode.ALTERNATIVES);
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
|
|
||||||
$el("br", {}, []),
|
$el("br", {}, []),
|
||||||
$el("button.cm-button-red", {
|
$el("button.cm-button-red", {
|
||||||
type: "button",
|
type: "button",
|
||||||
@ -1015,21 +1002,6 @@ class ManagerMenuDialog extends ComfyDialog {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// default ui state
|
|
||||||
let default_ui_combo = document.createElement("select");
|
|
||||||
default_ui_combo.setAttribute("title", "Set the default state to be displayed in the main menu when the browser starts.");
|
|
||||||
default_ui_combo.className = "cm-menu-combo";
|
|
||||||
default_ui_combo.appendChild($el('option', { value: 'none', text: 'Default UI: None' }, []));
|
|
||||||
default_ui_combo.appendChild($el('option', { value: 'history', text: 'Default UI: History' }, []));
|
|
||||||
default_ui_combo.appendChild($el('option', { value: 'queue', text: 'Default UI: Queue' }, []));
|
|
||||||
api.fetchApi('/manager/default_ui')
|
|
||||||
.then(response => response.text())
|
|
||||||
.then(data => { default_ui_combo.value = data; });
|
|
||||||
|
|
||||||
default_ui_combo.addEventListener('change', function (event) {
|
|
||||||
api.fetchApi(`/manager/default_ui?value=${event.target.value}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// share
|
// share
|
||||||
let share_combo = document.createElement("select");
|
let share_combo = document.createElement("select");
|
||||||
@ -1092,7 +1064,6 @@ class ManagerMenuDialog extends ComfyDialog {
|
|||||||
this.datasrc_combo,
|
this.datasrc_combo,
|
||||||
channel_combo,
|
channel_combo,
|
||||||
preview_combo,
|
preview_combo,
|
||||||
default_ui_combo,
|
|
||||||
share_combo,
|
share_combo,
|
||||||
component_policy_combo,
|
component_policy_combo,
|
||||||
$el("br", {}, []),
|
$el("br", {}, []),
|
||||||
@ -1637,27 +1608,3 @@ app.registerExtension({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
async function set_default_ui()
|
|
||||||
{
|
|
||||||
let res = await api.fetchApi('/manager/default_ui');
|
|
||||||
if(res.status == 200) {
|
|
||||||
let mode = await res.text();
|
|
||||||
switch(mode) {
|
|
||||||
case 'history':
|
|
||||||
app.ui.queue.hide();
|
|
||||||
app.ui.history.show();
|
|
||||||
break;
|
|
||||||
case 'queue':
|
|
||||||
app.ui.queue.show();
|
|
||||||
app.ui.history.hide();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// do nothing
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
set_default_ui();
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "comfyui-manager"
|
name = "comfyui-manager"
|
||||||
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
||||||
version = "3.14.1"
|
version = "3.15"
|
||||||
license = { file = "LICENSE.txt" }
|
license = { file = "LICENSE.txt" }
|
||||||
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
|
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user