Display frontend version in settings dialog (#157)

* Display frontend version in settings dialog

* Change execution order
This commit is contained in:
Chenlei Hu
2024-07-18 10:09:15 -04:00
committed by GitHub
parent c2e7ef11ec
commit dea9af8650
2 changed files with 3 additions and 2 deletions

View File

@@ -12,11 +12,11 @@
font-family: 'Roboto Mono', 'Noto Color Emoji';
}
</style> -->
<script type="module" src="/src/main.ts"></script>
<script type="module">
window["__COMFYUI_FRONTEND_VERSION__"] = __COMFYUI_FRONTEND_VERSION__;
console.log("ComfyUI Front-end version:", __COMFYUI_FRONTEND_VERSION__);
</script>
<script type="module" src="/src/main.ts"></script>
<link rel="stylesheet" type="text/css" href="/user.css" />
<link rel="stylesheet" type="text/css" href="/materialdesignicons.min.css" />
</head>

View File

@@ -11,6 +11,7 @@ export class ComfySettingsDialog extends ComfyDialog<HTMLDialogElement> {
constructor(app: ComfyApp) {
super();
const frontendVersion = window["__COMFYUI_FRONTEND_VERSION__"];
this.app = app;
this.settingsValues = {};
this.settingsLookup = {};
@@ -24,7 +25,7 @@ export class ComfySettingsDialog extends ComfyDialog<HTMLDialogElement> {
$el("table.comfy-modal-content.comfy-table", [
$el(
"caption",
{ textContent: "Settings" },
{ textContent: `Settings (v${frontendVersion})` },
$el("button.comfy-btn", {
type: "button",
textContent: "\u00d7",