Files
ketle-man-ComfyUI-Workflow-…/static/css/gallery-tab.css
T
ketle-manandClaude Sonnet 4.6 3dc593da4e feat: ギャラリータブに画像ダウンロードと一括エクスポート機能を追加
- 詳細パネルのプレビュー画像にマウスホバーでダウンロードアイコンをオーバーレイ表示
- 詳細パネルから単一画像をダウンロード可能に
- 複数選択メニューに「エクスポート」ボタンを追加
- 複数選択した画像をZIPファイルにしてエクスポート
- Backend: POST /wfm/gallery/images/export-zip エンドポイント実装
- Frontend: ダウンロード・ZIPエクスポート機能実装
- i18n対応: 英語/日本語/中国語

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 10:36:09 +09:00

836 lines
18 KiB
CSS

/* ============================================================
Gallery Tab Styles
============================================================ */
/* ── 3カラムレイアウト ──────────────────────────────────────── */
.wfm-gallery-layout {
display: flex;
height: calc(100vh - var(--wfm-header-height, 96px));
overflow: hidden;
gap: 0;
}
/* ── 左: フォルダツリーパネル ──────────────────────────────── */
.wfm-gallery-tree-panel {
width: 250px;
min-width: 250px;
max-width: 250px;
border-right: 1px solid var(--wfm-border);
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--wfm-bg-secondary, #1a1a2e);
}
.wfm-gallery-tree-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
border-bottom: 1px solid var(--wfm-border);
flex-shrink: 0;
background: var(--wfm-bg-primary, #16213e);
gap: 4px;
}
.wfm-gallery-tree-title {
font-size: 12px;
font-weight: 600;
color: var(--wfm-text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
flex: 1;
}
.wfm-gallery-tree-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.wfm-gallery-tree {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 4px 0;
}
.wfm-gallery-tree-item {
display: flex;
align-items: center;
gap: 4px;
padding: 3px 8px;
cursor: pointer;
font-size: 12px;
color: var(--wfm-text-primary);
-webkit-user-select: none;
user-select: none;
transition: background 0.1s;
}
.wfm-gallery-tree-item:hover {
background: var(--wfm-bg-hover, rgba(255,255,255,0.06));
}
.wfm-gallery-tree-item.selected {
background: var(--wfm-accent, #4f8ef7);
color: #fff;
}
.wfm-gallery-tree-item.selected .wfm-gallery-tree-count {
background: rgba(255,255,255,0.25);
}
.wfm-gallery-tree-arrow {
font-size: 10px;
width: 14px;
flex-shrink: 0;
cursor: pointer;
color: var(--wfm-text-secondary);
transition: transform 0.15s;
}
.wfm-gallery-tree-label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: flex;
align-items: center;
gap: 4px;
}
.wfm-gallery-tree-count {
font-size: 10px;
background: var(--wfm-accent-muted, rgba(79,142,247,0.2));
color: var(--wfm-accent, #4f8ef7);
border-radius: 8px;
padding: 0 5px;
line-height: 1.4;
flex-shrink: 0;
}
.wfm-gallery-tree-children {
/* 子ノードコンテナ */
}
/* ── 中: 画像一覧パネル ────────────────────────────────────── */
.wfm-gallery-list-panel {
flex: 1;
overflow-y: auto;
min-width: 0;
border-right: 1px solid var(--wfm-border);
background: var(--wfm-bg-primary, #16213e);
}
.wfm-gallery-grid {
padding: 8px;
}
/* サムネイルビュー */
.wfm-gallery-view-thumb {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 8px;
align-items: start;
}
.wfm-gallery-thumb-card {
position: relative;
background: var(--wfm-bg-secondary, #1a1a2e);
border: 1px solid var(--wfm-border);
border-radius: 6px;
overflow: hidden;
cursor: pointer;
transition: border-color 0.15s, box-shadow 0.15s;
}
.wfm-gallery-thumb-card:hover {
border-color: var(--wfm-accent, #4f8ef7);
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.wfm-gallery-thumb-card.selected {
border-color: var(--wfm-accent, #4f8ef7);
box-shadow: 0 0 0 2px var(--wfm-accent, #4f8ef7);
}
.wfm-gallery-thumb-card.multi-selected {
border-color: #f59e0b;
box-shadow: 0 0 0 2px #f59e0b;
}
.wfm-gallery-thumb-img {
width: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
display: block;
background: var(--wfm-bg-hover, #111);
}
.wfm-gallery-thumb-placeholder {
width: 100%;
aspect-ratio: 1 / 1;
display: flex;
align-items: center;
justify-content: center;
background: var(--wfm-bg-hover, #222);
color: var(--wfm-text-secondary);
font-size: 24px;
}
/* お気に入りボタン(サムネイルカード右上) */
.wfm-gallery-thumb-fav-btn {
position: absolute;
top: 4px;
right: 4px;
background: rgba(0,0,0,0.5);
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
font-size: 13px;
line-height: 1;
padding: 0;
cursor: pointer;
color: rgba(255,255,255,0.6);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.15s, color 0.15s;
}
.wfm-gallery-thumb-card:hover .wfm-gallery-thumb-fav-btn {
opacity: 1;
}
.wfm-gallery-thumb-fav-btn.active {
color: #fbbf24;
opacity: 1;
}
.wfm-gallery-thumb-fav-btn:hover {
background: rgba(0,0,0,0.75);
color: #fbbf24;
}
/* Feederグループボタン(サムネイルカード左上) */
.wfm-gallery-thumb-feeder-btn {
position: absolute;
top: 4px;
left: 4px;
background: rgba(0,0,0,0.5);
border: none;
border-radius: 50%;
width: 24px;
height: 24px;
font-size: 11px;
font-weight: bold;
line-height: 1;
padding: 0;
cursor: pointer;
color: rgba(255,255,255,0.6);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.15s, color 0.15s;
}
.wfm-gallery-thumb-card:hover .wfm-gallery-thumb-feeder-btn {
opacity: 1;
}
.wfm-gallery-thumb-feeder-btn.active {
color: #38bdf8;
opacity: 1;
}
.wfm-gallery-thumb-feeder-btn:hover {
background: rgba(0,0,0,0.75);
color: #38bdf8;
}
/* テーブルビューのお気に入りボタン */
.wfm-gallery-table-fav-btn {
background: none;
border: none;
cursor: pointer;
font-size: 16px;
color: rgba(255,255,255,0.3);
padding: 2px 4px;
transition: color 0.15s;
}
.wfm-gallery-table-fav-btn:hover,
.wfm-gallery-table-fav-btn.active {
color: #fbbf24;
}
.wfm-gallery-thumb-tags {
display: flex;
flex-wrap: wrap;
gap: 2px;
padding: 4px 6px;
}
/* テーブルビュー */
.wfm-gallery-view-table {
display: block;
}
.wfm-gallery-table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.wfm-gallery-table thead th {
position: sticky;
top: 0;
background: var(--wfm-bg-secondary, #1a1a2e);
color: var(--wfm-text-secondary);
font-weight: 600;
padding: 6px 8px;
text-align: left;
border-bottom: 1px solid var(--wfm-border);
z-index: 1;
}
.wfm-gallery-table tbody tr {
cursor: pointer;
transition: background 0.1s;
}
.wfm-gallery-table tbody tr:hover {
background: var(--wfm-bg-hover, rgba(255,255,255,0.05));
}
.wfm-gallery-table tbody tr.selected {
background: rgba(79,142,247,0.15);
}
.wfm-gallery-table tbody tr.multi-selected {
background: rgba(245,158,11,0.15);
}
.wfm-gallery-table td {
padding: 4px 8px;
border-bottom: 1px solid var(--wfm-border);
color: var(--wfm-text-primary);
vertical-align: middle;
}
.wfm-gallery-table-thumb {
width: 40px;
height: 40px;
object-fit: cover;
border-radius: 3px;
display: block;
}
.wfm-gallery-table-name {
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ── タグバッジ共通 ────────────────────────────────────────── */
.wfm-gallery-tag-badge {
display: inline-flex;
align-items: center;
gap: 3px;
background: rgba(79,142,247,0.15);
color: var(--wfm-accent, #4f8ef7);
border: 1px solid rgba(79,142,247,0.3);
border-radius: 10px;
padding: 1px 7px;
font-size: 11px;
white-space: nowrap;
}
.wfm-gallery-tag-remove {
background: none;
border: none;
color: inherit;
cursor: pointer;
padding: 0;
font-size: 12px;
line-height: 1;
opacity: 0.7;
margin-left: 1px;
}
.wfm-gallery-tag-remove:hover {
opacity: 1;
}
/* ── 右: 詳細パネル ────────────────────────────────────────── */
.wfm-gallery-detail-panel {
width: 280px;
min-width: 280px;
max-width: 280px;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--wfm-bg-secondary, #1a1a2e);
}
.wfm-gallery-detail-header {
padding: 6px 10px;
border-bottom: 1px solid var(--wfm-border);
flex-shrink: 0;
background: var(--wfm-bg-primary, #16213e);
}
.wfm-gallery-detail-filename {
font-size: 12px;
font-weight: 600;
color: var(--wfm-text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
/* プレビュー */
.wfm-gallery-detail-preview {
width: 100%;
aspect-ratio: 1 / 1;
max-height: 200px;
display: flex;
align-items: center;
justify-content: center;
background: var(--wfm-bg-primary, #16213e);
border-bottom: 1px solid var(--wfm-border);
overflow: hidden;
flex-shrink: 0;
}
.wfm-gallery-preview-wrapper {
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.wfm-gallery-detail-img {
max-width: 100%;
max-height: 200px;
object-fit: contain;
cursor: pointer;
}
.wfm-gallery-preview-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s;
}
.wfm-gallery-preview-wrapper:hover .wfm-gallery-preview-overlay {
opacity: 1;
}
.wfm-gallery-download-btn {
background: var(--wfm-accent, #4f8ef7);
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
font-size: 20px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
transition: background 0.2s;
}
.wfm-gallery-download-btn:hover {
background: var(--wfm-accent-hover, #3f7fe7);
}
/* タブコンテンツ */
.wfm-gallery-detail-tab-content {
flex: 1;
overflow-y: auto;
padding: 8px;
}
.wfm-gallery-section-title {
font-size: 13px;
font-weight: 600;
color: var(--wfm-text-primary);
margin-bottom: 6px;
display: flex;
align-items: center;
gap: 6px;
}
.wfm-gallery-info-section {
margin-bottom: 4px;
padding: 6px 0;
}
.wfm-gallery-info-row {
font-size: 12px;
color: var(--wfm-text-primary);
margin-bottom: 3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wfm-gallery-tags-display {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-bottom: 6px;
}
.wfm-gallery-memo {
width: 100%;
background: var(--wfm-bg-primary, #16213e);
border: 1px solid var(--wfm-border);
border-radius: 4px;
color: var(--wfm-text-primary);
font-size: 12px;
padding: 6px 8px;
resize: vertical;
box-sizing: border-box;
font-family: inherit;
}
.wfm-gallery-memo:focus {
outline: none;
border-color: var(--wfm-accent, #4f8ef7);
}
/* ── Metadataタブ(Workflow全幅表示) ─────────────────────── */
.wfm-gallery-meta-tab {
display: flex;
flex-direction: column;
padding: 0 !important;
overflow: hidden;
height: 100%;
}
.wfm-gallery-meta-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 10px;
border-bottom: 1px solid var(--wfm-border);
flex-shrink: 0;
background: var(--wfm-bg-primary, #16213e);
gap: 8px;
}
.wfm-gallery-meta-status {
font-size: 11px;
color: var(--wfm-text-secondary);
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wfm-gallery-workflow-json {
flex: 1;
margin: 0;
padding: 10px;
font-family: "Consolas", "Monaco", monospace;
font-size: 11px;
line-height: 1.5;
color: var(--wfm-text-primary);
background: var(--wfm-bg-secondary, #1a1a2e);
overflow: auto;
white-space: pre;
word-break: normal;
border: none;
}
/* グループ */
.wfm-gallery-current-groups {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-bottom: 6px;
font-size: 12px;
color: var(--wfm-text-secondary);
}
.wfm-gallery-groups-list {
display: flex;
flex-direction: column;
gap: 4px;
}
.wfm-gallery-group-row {
display: flex;
align-items: center;
gap: 6px;
padding: 3px 6px;
background: var(--wfm-bg-primary, #16213e);
border: 1px solid var(--wfm-border);
border-radius: 4px;
font-size: 12px;
}
.wfm-gallery-group-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--wfm-text-primary);
}
/* ── 一括操作バー ──────────────────────────────────────────── */
.wfm-gallery-bulk-bar {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 10px;
background: rgba(245,158,11,0.12);
border-bottom: 1px solid rgba(245,158,11,0.35);
flex-shrink: 0;
flex-wrap: wrap;
}
.wfm-gallery-bulk-count {
font-size: 12px;
font-weight: 600;
color: #f59e0b;
white-space: nowrap;
margin-right: 4px;
}
/* ── ライトボックス ─────────────────────────────────────────── */
.wfm-gallery-lightbox {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.9);
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.wfm-gallery-lightbox-inner {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
max-width: 90vw;
max-height: 90vh;
}
.wfm-gallery-lightbox-img {
max-width: 90vw;
max-height: 85vh;
object-fit: contain;
border-radius: 4px;
cursor: default;
}
.wfm-gallery-lightbox-footer {
margin-top: 8px;
color: rgba(255,255,255,0.7);
font-size: 13px;
text-align: center;
}
.wfm-gallery-lightbox-close {
position: absolute;
top: -12px;
right: -12px;
background: rgba(0,0,0,0.7);
border: 1px solid rgba(255,255,255,0.2);
color: #fff;
border-radius: 50%;
width: 28px;
height: 28px;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
padding: 0;
}
.wfm-gallery-lightbox-close:hover {
background: rgba(255,255,255,0.2);
}
/* ── 画像比較ライトボックス ──────────────────────────────────── */
.wfm-lightbox-compare .wfm-lightbox-compare-inner {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
max-width: 96vw;
max-height: 92vh;
overflow: auto;
}
.wfm-lightbox-compare-grid {
display: grid;
grid-template-columns: repeat(var(--compare-cols, 2), 1fr);
gap: 12px;
padding: 16px;
}
.wfm-lightbox-compare-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
}
.wfm-lightbox-compare-img {
max-width: calc(92vw / var(--compare-cols, 2) - 12px);
max-height: 78vh;
object-fit: contain;
border-radius: 4px;
cursor: default;
}
.wfm-lightbox-compare-label {
color: rgba(255,255,255,0.75);
font-size: 12px;
text-align: center;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wfm-lightbox-compare-close {
position: fixed;
top: 16px;
right: 16px;
z-index: 10001;
}
/* ── 詳細パネル アクションボタン行 ───────────────────────────── */
.wfm-gallery-detail-action-row {
display: flex;
gap: 6px;
padding: 4px 8px;
border-bottom: 1px solid var(--wfm-border);
flex-shrink: 0;
flex-wrap: wrap;
}
/* ── 詳細パネル アクションボタン ─────────────────────────────── */
.wfm-gallery-action-btn {
padding: 4px 10px;
border-radius: 4px;
border: 1px solid;
cursor: pointer;
font-size: 12px;
white-space: nowrap;
align-self: center;
margin: 2px 3px;
color: #fff;
}
.wfm-gallery-action-btn-green {
background: var(--wfm-success, #22c55e);
border-color: var(--wfm-success, #22c55e);
}
.wfm-gallery-action-btn-green:hover {
background: #16a34a;
border-color: #16a34a;
}
.wfm-gallery-action-btn-primary {
background: var(--wfm-primary);
border-color: var(--wfm-primary);
}
.wfm-gallery-action-btn-primary:hover {
background: var(--wfm-primary-hover);
border-color: var(--wfm-primary-hover);
}
.wfm-gallery-action-btn-tagger {
background: var(--wfm-accent, #7c5cfc);
border-color: var(--wfm-accent, #7c5cfc);
}
.wfm-gallery-action-btn-tagger:hover {
background: #6a4de0;
border-color: #6a4de0;
}
/* ── ファイル操作ボタン (詳細パネル) ─────────────────────────── */
.wfm-gallery-file-actions {
display: flex;
gap: 6px;
padding-top: 4px;
}
.wfm-gallery-file-actions .wfm-btn {
flex: 1;
}
/* ── 移動先選択モーダル ──────────────────────────────────────── */
.wfm-gallery-move-modal {
background: var(--wfm-bg-primary, #16213e);
border: 1px solid var(--wfm-border);
border-radius: 8px;
padding: 20px;
min-width: 320px;
max-width: 480px;
width: 90%;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
display: flex;
flex-direction: column;
gap: 12px;
}
.wfm-gallery-move-modal-title {
font-size: 14px;
font-weight: 600;
color: var(--wfm-text-primary);
}
.wfm-gallery-move-dest-sel {
width: 100%;
padding: 6px 8px;
font-size: 13px;
}
.wfm-gallery-move-modal-footer {
display: flex;
gap: 8px;
justify-content: flex-end;
}