Compare commits

...
1 Commits
Author SHA1 Message Date
ketle-manandClaude Sonnet 4.6 127d85d913 feat: Select All button for Models & Gallery bulk bars, Gallery bulk bar i18n (v0.3.37)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 09:22:04 +09:00
8 changed files with 101 additions and 11 deletions
+21
View File
@@ -1,5 +1,26 @@
# DEVLOG - ComfyUI-Workflow-Studio
## 2026-06-15: 全選択ボタン追加+ギャラリーバルクバーi18n対応
### 変更内容
#### Modelsタブ: 複数選択バーに「全選択」ボタン追加(`static/js/models-tab.js`, `static/js/i18n.js`)
- `selectAll()` 関数を追加: `filterModels()` の結果(フィルター・検索適用後の表示中モデル)を `state.selectedModels` に一括追加して `renderModelGrid()` / `renderBulkActionBar()` を呼び出す
- `renderBulkActionBar()` のバーHTMLに `wfm-bulk-select-all-btn` を Deselect All ボタンの右隣に追加
- イベントリスナーを追加(`"wfm-bulk-select-all-btn"` → `selectAll`)
- i18n: `modelBulkSelectAll` を英語 "Select All" / 日本語 "全選択" / 中国語 "全选" で追加
#### Galleryタブ: 複数選択バーに「全選択」ボタン追加+全ボタンi18n対応(`templates/index.html`, `static/js/gallery-tab.js`, `static/js/app.js`, `static/js/i18n.js`)
- `wfm-gallery-bulk-select-all` ボタンを Deselect All ボタンの右隣に追加(`templates/index.html`)
- クリックリスナー: `state.images` の全パスを `state.selectedImages` に追加し `renderImages()` / `updateBulkBar()` を呼び出す
- バルクバーの全ボタン・セレクトのテキストを空にして `applyI18nToHtml()` 経由で `t()` 設定に変更(ハードコード英語文字列を排除)
- `updateBulkBar()` の選択件数表示を `t("galleryBulkSelected")` でi18n化(`"${count} selected"` → `"${count} ${t(...)}"` )
- グループセレクトの初期オプションを `t("galleryBulkAddToGroup")` でi18n化
- `app.js` の `applyI18nToHtml()` にギャラリーバルクバー全要素のi18n設定処理を追加
- i18n: 英語 / 日本語 / 中国語の3言語でギャラリーバルクバー用キー10個を新規追加: `galleryBulkSelected` / `galleryBulkDeselectAll` / `galleryBulkSelectAll` / `galleryBulkAddToGroup` / `galleryBulkAdd` / `galleryBulkFavAll` / `galleryBulkUnfavAll` / `galleryBulkMoveTo` / `galleryBulkDelete`
---
## 2026-06-10: v0.3.36 — コードレビュー修正+リファクタリング+README刷新
### コードレビュー修正(v0.3.35の不具合10件)
+6 -1
View File
@@ -17,7 +17,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- Built-in AI tools (translation and more)
![Workflow Studio](https://img.shields.io/badge/ComfyUI-Custom_Node-blue)
![Version](https://img.shields.io/badge/version-0.3.36-green)
![Version](https://img.shields.io/badge/version-0.3.37-green)
## Screenshots
@@ -306,6 +306,11 @@ Click the **camera icon** (next to the W button) in ComfyUI's top bar to capture
## Changelog
### v0.3.37
- **Models tab — Select All button** — new button added to the right of "Deselect All" in the multi-select action bar; selects all models currently visible after applying the active search / filter / group filters
- **Gallery tab — Select All button** — new button added to the right of "Deselect All" in the bulk action bar; selects all images in the current folder view
- **Gallery bulk bar — i18n** — all bulk action bar buttons and the selection count were hard-coded English strings; they now use the `t()` translation system (EN / JA / ZH) so the bar respects the selected UI language
### v0.3.36
- **GenerateUI Save — overwrite protection** — saving now checks for an existing file and asks for confirmation before overwriting; if the target file is in UI format, a dedicated warning explains that saving in API format will lose the node layout
- **GenerateUI Save — Raw JSON sync** — unapplied Raw JSON edits are now included in the save (parsed and synced back to the editor); invalid JSON aborts the save with an error instead of silently saving stale content
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-workflow-studio"
description = "A comprehensive workflow, asset management, and generation UI plugin for ComfyUI. Manage workflows, models, images, and prompts; batch generation and Image Feeder in the GenerateUI tab; library side panel with canvas drag & drop and AI tools."
version = "0.3.36"
version = "0.3.37"
license = "MIT"
requires-python = ">= 3.10"
dependencies = ["jinja2"]
+19
View File
@@ -196,6 +196,25 @@ function applyI18nToHtml() {
if (btn.dataset.detailTab === "meta") btn.textContent = t("gallerySideMetadata");
if (btn.dataset.detailTab === "group") btn.textContent = t("modelsSideGroup");
});
const galleryBulkDeselect = document.getElementById("wfm-gallery-bulk-deselect");
if (galleryBulkDeselect) galleryBulkDeselect.textContent = t("galleryBulkDeselectAll");
const galleryBulkSelectAll = document.getElementById("wfm-gallery-bulk-select-all");
if (galleryBulkSelectAll) galleryBulkSelectAll.textContent = t("galleryBulkSelectAll");
const galleryBulkGroupSelect = document.getElementById("wfm-gallery-bulk-group-select");
if (galleryBulkGroupSelect) {
const opt = galleryBulkGroupSelect.querySelector("option[value='']");
if (opt) opt.textContent = t("galleryBulkAddToGroup");
}
const galleryBulkGroupAdd = document.getElementById("wfm-gallery-bulk-group-add");
if (galleryBulkGroupAdd) galleryBulkGroupAdd.textContent = t("galleryBulkAdd");
const galleryBulkFav = document.getElementById("wfm-gallery-bulk-fav");
if (galleryBulkFav) galleryBulkFav.textContent = t("galleryBulkFavAll");
const galleryBulkUnfav = document.getElementById("wfm-gallery-bulk-unfav");
if (galleryBulkUnfav) galleryBulkUnfav.textContent = t("galleryBulkUnfavAll");
const galleryBulkMove = document.getElementById("wfm-gallery-bulk-move");
if (galleryBulkMove) galleryBulkMove.textContent = t("galleryBulkMoveTo");
const galleryBulkDelete = document.getElementById("wfm-gallery-bulk-delete");
if (galleryBulkDelete) galleryBulkDelete.textContent = t("galleryBulkDelete");
// Prompt tab
const assistantHeader = document.querySelector(".wfm-prompt-split-left .wfm-prompt-split-header");
+8 -2
View File
@@ -455,7 +455,7 @@ function updateBulkBar() {
const count = state.selectedImages.size;
if (count > 0) {
bar.style.display = "";
countEl.textContent = `${count} selected`;
countEl.textContent = `${count} ${t("galleryBulkSelected")}`;
} else {
bar.style.display = "none";
}
@@ -647,7 +647,7 @@ function _updateGroupSelects() {
const bulkSel = document.getElementById("wfm-gallery-bulk-group-select");
if (bulkSel) {
const current = bulkSel.value;
bulkSel.innerHTML = `<option value="">Add to Group...</option>`;
bulkSel.innerHTML = `<option value="">${t("galleryBulkAddToGroup")}</option>`;
state.groups.forEach(g => {
const opt = document.createElement("option");
opt.value = g.name;
@@ -1236,6 +1236,12 @@ function bindEvents() {
document.querySelectorAll(".multi-selected").forEach(el => el.classList.remove("multi-selected"));
});
document.getElementById("wfm-gallery-bulk-select-all")?.addEventListener("click", () => {
state.images.forEach(img => state.selectedImages.add(img.path));
renderImages();
updateBulkBar();
});
document.getElementById("wfm-gallery-bulk-group-add")?.addEventListener("click", () => {
const sel = document.getElementById("wfm-gallery-bulk-group-select");
if (sel && sel.value) {
+30
View File
@@ -396,6 +396,7 @@ const LANGUAGES = {
modelBulkMoveDone: "model(s) moved",
modelBulkMoveError: "Failed to move some models",
modelBulkDeselectAll: "Deselect All",
modelBulkSelectAll: "Select All",
modelBulkFavAdd: "★ Favorite",
modelBulkFavRemove: "☆ Unfavorite",
modelBulkFavDone: "models favorited",
@@ -456,6 +457,15 @@ const LANGUAGES = {
galleryOutputDirHint: "Set the ComfyUI output folder to browse in the Gallery tab. Leave blank to use ComfyUI's default output directory.",
gallerySelectImageFirst: "Please select an image first",
galleryNoEmbeddedWorkflow: "No ComfyUI workflow embedded in this image.",
galleryBulkSelected: "selected",
galleryBulkDeselectAll: "Deselect All",
galleryBulkSelectAll: "Select All",
galleryBulkAddToGroup: "Add to Group...",
galleryBulkAdd: "Add",
galleryBulkFavAll: "★ Favorite All",
galleryBulkUnfavAll: "☆ Unfavorite All",
galleryBulkMoveTo: "Move To...",
galleryBulkDelete: "Delete",
tabAi: "AI TOOL",
@@ -1166,6 +1176,7 @@ const LANGUAGES = {
modelBulkMoveDone: "件のモデルを移動しました",
modelBulkMoveError: "一部のモデルの移動に失敗しました",
modelBulkDeselectAll: "選択解除",
modelBulkSelectAll: "全選択",
modelBulkFavAdd: "★ お気に入り追加",
modelBulkFavRemove: "☆ お気に入り解除",
modelBulkFavDone: "件をお気に入りに追加しました",
@@ -1226,6 +1237,15 @@ const LANGUAGES = {
galleryOutputDirHint: "ギャラリータブで参照するComfyUIのoutputフォルダを設定します。空欄の場合はComfyUIのデフォルトoutputディレクトリを使用します。",
gallerySelectImageFirst: "先に画像を選択してください",
galleryNoEmbeddedWorkflow: "この画像にはComfyUIワークフローが埋め込まれていません。",
galleryBulkSelected: "件選択中",
galleryBulkDeselectAll: "選択解除",
galleryBulkSelectAll: "全選択",
galleryBulkAddToGroup: "グループに追加...",
galleryBulkAdd: "追加",
galleryBulkFavAll: "★ お気に入り追加(全件)",
galleryBulkUnfavAll: "☆ お気に入り解除(全件)",
galleryBulkMoveTo: "移動先...",
galleryBulkDelete: "削除",
tabAi: "AI TOOL",
@@ -1936,6 +1956,7 @@ const LANGUAGES = {
modelBulkMoveDone: "个模型已移动",
modelBulkMoveError: "部分模型移动失败",
modelBulkDeselectAll: "取消全选",
modelBulkSelectAll: "全选",
modelBulkFavAdd: "★ 收藏",
modelBulkFavRemove: "☆ 取消收藏",
modelBulkFavDone: "个模型已收藏",
@@ -1996,6 +2017,15 @@ const LANGUAGES = {
galleryOutputDirHint: "设置图库标签页浏览的ComfyUI输出文件夹。留空则使用ComfyUI默认输出目录。",
gallerySelectImageFirst: "请先选择图像",
galleryNoEmbeddedWorkflow: "此图像中未嵌入ComfyUI工作流。",
galleryBulkSelected: "项已选择",
galleryBulkDeselectAll: "取消全选",
galleryBulkSelectAll: "全选",
galleryBulkAddToGroup: "添加到分组...",
galleryBulkAdd: "添加",
galleryBulkFavAll: "★ 全部收藏",
galleryBulkUnfavAll: "☆ 全部取消收藏",
galleryBulkMoveTo: "移动到...",
galleryBulkDelete: "删除",
tabAi: "AI TOOL",
+8
View File
@@ -314,6 +314,12 @@ function clearSelection() {
renderBulkActionBar();
}
function selectAll() {
filterModels().forEach(m => state.selectedModels.add(m));
renderModelGrid();
renderBulkActionBar();
}
function renderBulkActionBar() {
const bar = document.getElementById("wfm-models-bulk-bar");
if (!bar) return;
@@ -340,6 +346,7 @@ function renderBulkActionBar() {
<div class="wfm-bulk-header">
<span class="wfm-bulk-count">${count} ${t("modelSelected")}</span>
<button class="wfm-btn wfm-btn-sm" id="wfm-bulk-deselect-all-btn">${t("modelBulkDeselectAll")}</button>
<button class="wfm-btn wfm-btn-sm" id="wfm-bulk-select-all-btn">${t("modelBulkSelectAll")}</button>
<span class="wfm-bulk-sep"></span>
<button class="wfm-btn wfm-btn-sm" id="wfm-bulk-fav-add-btn">${t("modelBulkFavAdd")}</button>
<button class="wfm-btn wfm-btn-sm" id="wfm-bulk-fav-remove-btn">${t("modelBulkFavRemove")}</button>
@@ -377,6 +384,7 @@ function renderBulkActionBar() {
`;
document.getElementById("wfm-bulk-deselect-all-btn")?.addEventListener("click", clearSelection);
document.getElementById("wfm-bulk-select-all-btn")?.addEventListener("click", selectAll);
document.getElementById("wfm-bulk-fav-add-btn")?.addEventListener("click", () => bulkSetFavorite(true));
document.getElementById("wfm-bulk-fav-remove-btn")?.addEventListener("click", () => bulkSetFavorite(false));
document.getElementById("wfm-bulk-add-btn")?.addEventListener("click", () => {
+8 -7
View File
@@ -1224,15 +1224,16 @@
<!-- 複数選択時の一括操作バー -->
<div id="wfm-gallery-bulk-bar" class="wfm-gallery-bulk-bar" style="display:none;">
<span id="wfm-gallery-bulk-count" class="wfm-gallery-bulk-count"></span>
<button id="wfm-gallery-bulk-deselect" class="wfm-btn wfm-btn-sm">Deselect All</button>
<button id="wfm-gallery-bulk-deselect" class="wfm-btn wfm-btn-sm"></button>
<button id="wfm-gallery-bulk-select-all" class="wfm-btn wfm-btn-sm"></button>
<select id="wfm-gallery-bulk-group-select" class="wfm-select" style="font-size:12px;padding:3px 6px;">
<option value="">Add to Group...</option>
<option value=""></option>
</select>
<button id="wfm-gallery-bulk-group-add" class="wfm-btn wfm-btn-sm wfm-btn-primary">Add</button>
<button id="wfm-gallery-bulk-fav" class="wfm-btn wfm-btn-sm">★ Favorite All</button>
<button id="wfm-gallery-bulk-unfav" class="wfm-btn wfm-btn-sm">☆ Unfavorite All</button>
<button id="wfm-gallery-bulk-move" class="wfm-btn wfm-btn-sm">Move To...</button>
<button id="wfm-gallery-bulk-delete" class="wfm-btn wfm-btn-sm wfm-btn-danger">Delete</button>
<button id="wfm-gallery-bulk-group-add" class="wfm-btn wfm-btn-sm wfm-btn-primary"></button>
<button id="wfm-gallery-bulk-fav" class="wfm-btn wfm-btn-sm"></button>
<button id="wfm-gallery-bulk-unfav" class="wfm-btn wfm-btn-sm"></button>
<button id="wfm-gallery-bulk-move" class="wfm-btn wfm-btn-sm"></button>
<button id="wfm-gallery-bulk-delete" class="wfm-btn wfm-btn-sm wfm-btn-danger"></button>
</div>
</div>