improved: add aboutBadge

This commit is contained in:
Dr.Lt.Data 2025-01-02 03:52:18 +09:00
parent c2c8fbec3c
commit de2b8fbd88
4 changed files with 21 additions and 2 deletions

View File

@ -36,7 +36,7 @@ import manager_downloader
from node_package import InstalledNodePackage
version_code = [3, 2, 1]
version_code = [3, 3]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')

View File

@ -1359,6 +1359,11 @@ async def load_components(request):
return web.Response(status=400)
@routes.get("/manager/version")
async def get_version(request):
return web.Response(text=core.version_str, status=200)
async def _confirm_try_install(sender, custom_node_url, msg):
json_obj = await core.get_data_by_mode('default', 'custom-node-list.json')

View File

@ -1507,9 +1507,23 @@ class ManagerMenuDialog extends ComfyDialog {
}
}
async function getVersion() {
let version = await api.fetchApi(`/manager/version`);
return await version.text();
}
app.registerExtension({
name: "Comfy.ManagerMenu",
aboutPageBadges: [
{
label: `ComfyUI-Manager ${await getVersion()}`,
url: 'https://github.com/ltdrdata/ComfyUI-Manager',
icon: 'pi pi-th-large'
}
],
init() {
$el("style", {
textContent: style,

View File

@ -1,7 +1,7 @@
[project]
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."
version = "3.2.1"
version = "3.3"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]