Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
c199d3d
wip v3 ui refactor
pythongosssss Sep 27, 2025
a1eaea2
Fix breadrumb collapsing
pythongosssss Sep 28, 2025
af050f1
Combine menu sections on small height
pythongosssss Sep 28, 2025
f46af7b
Remove terminal background
pythongosssss Oct 1, 2025
b9a44b1
Update styling of single tab tab-list to be a label
pythongosssss Oct 1, 2025
1ae877a
Update sidebar button to always be secondary
pythongosssss Oct 1, 2025
1218986
Refactor connected/floating resizing
pythongosssss Oct 2, 2025
3fb42de
Redesigned C menu
pythongosssss Oct 3, 2025
9be09c4
Make button hover indicator small in small mode
pythongosssss Oct 3, 2025
29bb027
add missing entry
pythongosssss Oct 3, 2025
daba827
Revert "Make button hover indicator small in small mode"
pythongosssss Oct 5, 2025
28d76c1
- change light menu to white
pythongosssss Oct 5, 2025
2877a59
Move FPS info drawing based on sidebar position
pythongosssss Oct 5, 2025
d32fe1d
fix tests
pythongosssss Oct 5, 2025
5f3d4b8
rework resize handling
pythongosssss Oct 8, 2025
719a47a
Make menu sticky so it is aligned with scrollable items
pythongosssss Oct 8, 2025
bc91aee
Add support for legacy custom actions
pythongosssss Oct 8, 2025
8720e46
[automated] Apply ESLint and Prettier fixes
actions-user Oct 8, 2025
7d82a78
hide login in focus mode
pythongosssss Oct 8, 2025
154577f
Merge branch 'pysssss/v3-floating-ui' of https://github.com/Comfy-Org…
pythongosssss Oct 8, 2025
c8b7582
- move top menu to own component
pythongosssss Oct 9, 2025
b8a6b2c
Relocate comfy legacy menu to inside graph container so z-index works
pythongosssss Oct 9, 2025
9f1d8e7
- fix removed provided element
pythongosssss Oct 9, 2025
2ebec8e
Merge remote-tracking branch 'origin/main' into pysssss/v3-floating-ui
pythongosssss Oct 9, 2025
78bde9d
[automated] Apply ESLint and Prettier fixes
actions-user Oct 9, 2025
1fffcbe
- add support for forced connected sidebar setting
pythongosssss Oct 11, 2025
3a3e359
component boilerplate
benceruleanlu Oct 13, 2025
cc49818
First pass starting point
benceruleanlu Oct 13, 2025
3dc9949
Hook to execution store with proper colors
benceruleanlu Oct 13, 2025
dd399e8
Hook to the right colors
benceruleanlu Oct 13, 2025
a5881d6
Remove useless type assertation
benceruleanlu Oct 13, 2025
cea859d
Replace erroneous code with placeholder comment
benceruleanlu Oct 13, 2025
8c03c7d
Add margin between number and its running text
benceruleanlu Oct 13, 2025
e0745cd
Add hover effects
benceruleanlu Oct 14, 2025
8ce643a
Correct mixed up colors
benceruleanlu Oct 14, 2025
2b98d8a
Show on first execution
benceruleanlu Oct 14, 2025
dbb1243
Correct visibility of empty state
benceruleanlu Oct 14, 2025
8e2a8e2
Add expanded state first pass
benceruleanlu Oct 14, 2025
5a6c596
Correct title wording
benceruleanlu Oct 14, 2025
3c0b309
Header changes
benceruleanlu Oct 14, 2025
c16f51c
Header changes again
benceruleanlu Oct 14, 2025
5173ae5
Styling for the empty state
benceruleanlu Oct 14, 2025
b26dcc8
Improve comments
benceruleanlu Oct 14, 2025
7c140b2
Fix styling of active state and add testing hack
benceruleanlu Oct 14, 2025
584478f
Align with design tokens and lucide icons
benceruleanlu Oct 14, 2025
c017344
Fix header styling
benceruleanlu Oct 14, 2025
1590ef7
Fix/implement the top actions for expanded state, fix i18n
benceruleanlu Oct 15, 2025
87bfa32
Fix expanded state's stylings
benceruleanlu Oct 15, 2025
fa34720
Job list WIP
benceruleanlu Oct 15, 2025
f418488
Title fix for completed state and color/padding fix for job row
benceruleanlu Oct 15, 2025
e26697b
Change secondary text for completed state to be generation time
benceruleanlu Oct 15, 2025
8c6caa6
Padding fix for secondary job text
benceruleanlu Oct 15, 2025
b4499aa
Add job buttons
benceruleanlu Oct 15, 2025
7ecce7a
use i18n strings
benceruleanlu Oct 15, 2025
5ca7b37
Replace CSS with TWCSS
benceruleanlu Oct 15, 2025
d312459
Merge remote-tracking branch 'origin/main' into pysssss/v3-floating-ui
pythongosssss Oct 16, 2025
38023af
[automated] Update test expectations
invalid-email-address Oct 16, 2025
633ebf5
Fix test
pythongosssss Oct 16, 2025
ef11cee
Fix tests, library panel covers the node
pythongosssss Oct 16, 2025
50d79c3
Move click position, 10,10 is now tabs
pythongosssss Oct 16, 2025
d1808d4
Merge remote-tracking branch 'origin/pysssss/v3-floating-ui' into bl-…
benceruleanlu Oct 16, 2025
1b0b420
Hook into cloud's initialization state
benceruleanlu Oct 16, 2025
a348762
Merge remote-tracking branch 'origin/main' into bl-execution
benceruleanlu Oct 17, 2025
3459187
Remove useRO dynamic minwidth stupidity
benceruleanlu Oct 17, 2025
69c7459
Add primary text for initialization state.
benceruleanlu Oct 17, 2025
139f283
nit
benceruleanlu Oct 17, 2025
b74f5b1
fix truncation for node name
benceruleanlu Oct 17, 2025
cd9ec56
UNTESTED: multiple workflow execution ws support
benceruleanlu Oct 17, 2025
bc2fecf
Correct queued primary text
benceruleanlu Oct 18, 2025
501c0f4
Add timestamp secondary text
benceruleanlu Oct 18, 2025
d2350e8
Implement the running state of job row item
benceruleanlu Oct 18, 2025
8ec56f9
Add concurrent run indicator
benceruleanlu Oct 18, 2025
118d668
Implement functionality and styling for expanded more button
benceruleanlu Oct 18, 2025
9a3c701
Add more tooltips
benceruleanlu Oct 18, 2025
f9b2ac6
Add job date groupings
benceruleanlu Oct 18, 2025
7c7d725
Implement per workflow filtering functionality
benceruleanlu Oct 18, 2025
8826037
Add shared utils and types
benceruleanlu Oct 20, 2025
40dc10f
Use new utils and helpers
benceruleanlu Oct 20, 2025
567a9ca
Add tooltip and progress composables
benceruleanlu Oct 20, 2025
592c0c7
Use new tooltip and progress composables;
benceruleanlu Oct 20, 2025
3bd60ea
Internationalize date grouping
benceruleanlu Oct 20, 2025
feeae07
Add popover and view button functionality
benceruleanlu Oct 20, 2025
873f58f
Wire up workflow and jobid to popover and styling changes
benceruleanlu Oct 20, 2025
c7c28d4
Fix image icon sizing
benceruleanlu Oct 20, 2025
549c8af
Implement right click and ... job item menu
benceruleanlu Oct 21, 2025
2dca955
Implement job details popover
benceruleanlu Oct 21, 2025
62b2de6
Implement completed state
benceruleanlu Oct 21, 2025
48e197a
nit
benceruleanlu Oct 21, 2025
cfa6f9e
Refactor composables out of QPO
benceruleanlu Oct 21, 2025
9d3a42a
Inline BaseJobRow.vue
benceruleanlu Oct 21, 2025
7772486
nit
benceruleanlu Oct 21, 2025
0481ea7
Extract active and empty
benceruleanlu Oct 21, 2025
2fa3b31
Extract expanded state
benceruleanlu Oct 21, 2025
64fff22
Styling alignment on show assets button
benceruleanlu Oct 21, 2025
f74f70f
Allow clicking on asset preview
benceruleanlu Oct 21, 2025
d33860a
Narrow click target to image only
benceruleanlu Oct 21, 2025
29be942
Add font-inter to buttons
benceruleanlu Oct 21, 2025
2fd244a
Add QueueJobItem stories
benceruleanlu Oct 21, 2025
f7c0d18
Replace queuePopoverStore with local state
benceruleanlu Oct 21, 2025
aed919d
Fix icon and text of added state
benceruleanlu Oct 21, 2025
8a54834
Folder restructuring
benceruleanlu Oct 21, 2025
53d64f2
nit
benceruleanlu Oct 22, 2025
4fefa70
Centralize derivation of job item details
benceruleanlu Oct 22, 2025
522ddf0
fix: surface knip hook output in vscode (#6183)
benceruleanlu Oct 22, 2025
d0dff98
nit
benceruleanlu Oct 22, 2025
a4b0e7d
Add cb for emit on menu
benceruleanlu Oct 22, 2025
f37ac33
Replaces instances of xss with xxs
benceruleanlu Oct 22, 2025
2c7c64b
Implement add to current workflow
benceruleanlu Oct 22, 2025
e700570
Implement download asset button
benceruleanlu Oct 22, 2025
7c4ec41
Styling changes
benceruleanlu Oct 22, 2025
3b853dd
Remove cache busting timestamped url
benceruleanlu Oct 22, 2025
cfcfc69
Readd spacing-lg
benceruleanlu Oct 22, 2025
a2ee22d
Increase width of QPO
benceruleanlu Oct 23, 2025
d57eeb9
feat: Add Media Assets sidebar tab for file management
viva-jinyi Oct 17, 2025
fb43726
refactor: Apply PR #6112 review feedback for Media Assets feature
viva-jinyi Oct 20, 2025
306fbda
chore: unexpected export
viva-jinyi Oct 20, 2025
50e3849
feat: Improve media asset display with file format tags and filename …
viva-jinyi Oct 20, 2025
bbc8096
feat: Add includePublic parameter to getAssetsByTag API
viva-jinyi Oct 22, 2025
b81c89c
fix: test code
viva-jinyi Oct 22, 2025
293a826
refactor: useQueueStore
viva-jinyi Oct 22, 2025
13c5b44
refactor: Apply review feedback for media assets implementation
viva-jinyi Oct 23, 2025
b48636a
Extract AssetsSidebarTab template and improve UI structure (#6164)
viva-jinyi Oct 23, 2025
096240f
Finish job details popover and hook error reporting up with job menu …
benceruleanlu Oct 23, 2025
9f513b0
Implement export job workflow
benceruleanlu Oct 23, 2025
951eb24
Merge remote-tracking branch 'origin/feature/media-asset-sidebar-tab'…
benceruleanlu Oct 23, 2025
8ab2ed5
[automated] Apply ESLint and Prettier fixes
actions-user Oct 23, 2025
3950d68
return failed instead of queued for unknown job state
benceruleanlu Oct 23, 2025
04b7762
execution: use reactive Map for promptId → workflowId; populate via q…
benceruleanlu Oct 23, 2025
c8c7704
minor tuck refactor
benceruleanlu Oct 24, 2025
48915ee
explanatory comment
benceruleanlu Oct 24, 2025
7390e95
feat: Add Media Assets sidebar tab for file management
viva-jinyi Oct 17, 2025
da9531a
refactor: Apply PR #6112 review feedback for Media Assets feature
viva-jinyi Oct 20, 2025
2a06632
chore: unexpected export
viva-jinyi Oct 20, 2025
01419ff
feat: Improve media asset display with file format tags and filename …
viva-jinyi Oct 20, 2025
e0cc4e2
feat: Add includePublic parameter to getAssetsByTag API
viva-jinyi Oct 22, 2025
2f7deae
fix: test code
viva-jinyi Oct 22, 2025
e6215b1
refactor: useQueueStore
viva-jinyi Oct 22, 2025
0afcdba
refactor: Apply review feedback for media assets implementation
viva-jinyi Oct 23, 2025
1e6cdee
Extract AssetsSidebarTab template and improve UI structure (#6164)
viva-jinyi Oct 23, 2025
995f48a
feat: Implement centralized AssetsStore for reactive assets updates
viva-jinyi Oct 24, 2025
0bc5c16
refactor: Apply formatUtil code review feedback and improve type safety
viva-jinyi Oct 24, 2025
7383c0f
[automated] Update test expectations
invalid-email-address Oct 24, 2025
26e9236
feat: Auto-refresh assets on file upload
viva-jinyi Oct 24, 2025
4eac455
fix: Add AssetsStore update trigger to WidgetSelectDropdown uploads
viva-jinyi Oct 24, 2025
ffb6708
Merge remote-tracking branch 'origin/feature/media-asset-sidebar-tab'…
benceruleanlu Oct 24, 2025
4b4ffc1
Merge remote-tracking branch 'origin/main' into bl-execution
benceruleanlu Nov 4, 2025
d274605
knip
benceruleanlu Nov 4, 2025
f2314c8
Feat: Doubleclick to toggle edit for Markdown (litegraph) (#6560)
DrJKL Nov 4, 2025
57c00a2
Style: Pinned, Muted, Bypassed header indicators (#6530)
DrJKL Nov 4, 2025
c511e96
Add .pnpm-store to gitignore (#6566)
benceruleanlu Nov 4, 2025
69f270b
nit
benceruleanlu Nov 4, 2025
d69e30c
[fix] improve FormDropdownMenu scrolling behavior (#6570)
Myestery Nov 4, 2025
0ed5735
feat: Add Open Graph and Twitter meta tags for cloud distribution (#6…
viva-jinyi Nov 4, 2025
35701b1
Fix cloud routing issues caused by incorrect api_base calculation (#6…
viva-jinyi Nov 4, 2025
9069778
hide minimap on mobile by default (#6579)
christian-byrne Nov 4, 2025
ab51f65
fix(vite): use dynamic base URL based on cloud distribution (#6562)
christian-byrne Nov 4, 2025
9e903c8
Remove tracking for firstSeenByPromptId
benceruleanlu Nov 4, 2025
fcfac96
Fix positioning of queue progress overlay
benceruleanlu Nov 5, 2025
b92da1e
Fix mysterious extraneous style changes
benceruleanlu Nov 5, 2025
7e5c8cd
style.css cleanup
benceruleanlu Nov 5, 2025
792d6e0
Remove unused pin.svg
benceruleanlu Nov 5, 2025
fa70c24
Merge remote-tracking branch 'origin/main' into bl-execution
benceruleanlu Nov 5, 2025
1187fca
Add delay to popover appearance
benceruleanlu Nov 5, 2025
97da2fe
Davinci level ux fix
benceruleanlu Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/desktop-ui/src/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Import only English locale eagerly as the default/fallback
// ESLint cannot statically resolve dynamic imports with path aliases (@frontend-locales/*),
// but these are properly configured in tsconfig.json and resolved by Vite at build time.
// eslint-disable-next-line import-x/no-unresolved

import enCommands from '@frontend-locales/en/commands.json' with { type: 'json' }
// eslint-disable-next-line import-x/no-unresolved

import en from '@frontend-locales/en/main.json' with { type: 'json' }
// eslint-disable-next-line import-x/no-unresolved

import enNodes from '@frontend-locales/en/nodeDefs.json' with { type: 'json' }
// eslint-disable-next-line import-x/no-unresolved

import enSettings from '@frontend-locales/en/settings.json' with { type: 'json' }
import { createI18n } from 'vue-i18n'

Expand All @@ -27,7 +27,7 @@ function buildLocale<

// Locale loader map - dynamically import locales only when needed
// ESLint cannot statically resolve these dynamic imports, but they are valid at build time
/* eslint-disable import-x/no-unresolved */

const localeLoaders: Record<
string,
() => Promise<{ default: Record<string, unknown> }>
Expand Down
21 changes: 10 additions & 11 deletions apps/desktop-ui/src/views/ServerStartView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<BaseViewTemplate dark>
<div class="relative min-h-screen">
<!-- Terminal Background Layer (always visible during loading) -->
<div v-if="!isError" class="fixed inset-0 overflow-hidden z-0">
<div v-if="!isError" class="fixed inset-0 z-0 overflow-hidden">
<div class="h-full w-full">
<BaseTerminal @created="terminalCreated" />
</div>
</div>

<!-- Semi-transparent overlay -->
<div v-if="!isError" class="fixed inset-0 bg-neutral-900/80 z-5"></div>
<div v-if="!isError" class="fixed inset-0 z-5 bg-neutral-900/80"></div>

<!-- Smooth radial gradient overlay -->
<div
Expand Down Expand Up @@ -45,9 +45,9 @@
<!-- Error Section (positioned at bottom) -->
<div
v-if="isError"
class="absolute bottom-20 left-0 right-0 flex flex-col items-center gap-4"
class="absolute right-0 bottom-20 left-0 flex flex-col items-center gap-4"
>
<div class="flex gap-4 justify-center">
<div class="flex justify-center gap-4">
<Button
icon="pi pi-flag"
:label="$t('serverStart.reportIssue')"
Expand All @@ -71,10 +71,10 @@
<!-- Terminal Output (positioned at bottom when manually toggled in error state) -->
<div
v-if="terminalVisible && isError"
class="absolute bottom-4 left-4 right-4 max-w-4xl mx-auto z-10"
class="absolute right-4 bottom-4 left-4 z-10 mx-auto max-w-4xl"
>
<div
class="bg-neutral-900/95 rounded-lg p-4 border border-neutral-700 h-[300px]"
class="h-[300px] rounded-lg border border-neutral-700 bg-neutral-900/95 p-4"
>
<BaseTerminal @created="terminalCreated" />
</div>
Expand All @@ -85,11 +85,10 @@
</template>

<script setup lang="ts">
import {
InstallStage,
type InstallStageInfo,
type InstallStageName,
ProgressStatus
import { InstallStage, ProgressStatus } from '@comfyorg/comfyui-electron-types'
import type {
InstallStageInfo,
InstallStageName
} from '@comfyorg/comfyui-electron-types'
import type { Terminal } from '@xterm/xterm'
import Button from 'primevue/button'
Expand Down
32 changes: 31 additions & 1 deletion packages/design-system/src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
/* Font Families */
--font-inter: 'Inter', sans-serif;

/* Spacing Tokens */
--spacing-spacing-xxs: 4px;
--spacing-spacing-xs: 8px;
--spacing-spacing-sm: 12px;
--spacing-spacing-md: 16px;
--spacing-spacing-lg: 24px;

/* Corner Radius Tokens */
--corner-radius-corner-radius-md: 8px;

/* Palette Colors */
--color-charcoal-100: #55565e;
--color-charcoal-200: #494a50;
Expand Down Expand Up @@ -57,6 +67,21 @@
--color-slate-200: #9fa2bd;
--color-slate-300: #5b5e7d;

--color-slate-100: var(--color-slate-100);

--color-brand-yellow: #f0ff41;
--color-brand-blue: #172dd7;

--color-blue-100: #0b8ce9;
--color-blue-200: #31b9f4;
--color-blue-300: #185a8b;
--color-blue-900: #171718;
--color-blue-900-40: rgb(from var(--color-blue-900) r g b / 0.4);
--color-success-100: #00cd72;
--color-success-200: #47e469;
--color-warning-100: #fd9903;
--color-warning-200: #fcbf64;

--color-white: #ffffff;
--color-black: #000000;

Expand Down Expand Up @@ -87,6 +112,7 @@

--color-danger-100: #c02323;
--color-danger-200: #d62952;
--color-red-200: #B33A3A;

--color-coral-red-600: #973a40;
--color-coral-red-500: #c53f49;
Expand All @@ -97,6 +123,10 @@

--color-comfy-menu-secondary: var(--comfy-menu-secondary-bg);

--color-blue-100-30: rgb(from var(--color-blue-100) r g b / 0.3);
--color-interface-panel-job-progress-primary: var(--color-blue-300);
--color-interface-panel-job-progress-secondary: var(--color-blue-100-30);

--color-blue-selection: rgb(from var(--color-azure-600) r g b / 0.3);
--color-node-hover-100: rgb(from var(--color-charcoal-800) r g b/ 0.15);
--color-node-hover-200: rgb(from var(--color-charcoal-800) r g b/ 0.1);
Expand Down Expand Up @@ -402,7 +432,7 @@
--color-node-stroke-selected: var(--node-stroke-selected);
--color-node-stroke-error: var(--node-stroke-error);
--color-node-stroke-executing: var(--node-stroke-executing);
--color-text-secondary: var(--text-secondary);
--color-slate-100: var(--text-secondary);
--color-text-primary: var(--text-primary);
--color-input-surface: var(--input-surface);

Expand Down
3 changes: 3 additions & 0 deletions packages/design-system/src/icons/file-output.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 15 additions & 10 deletions src/components/TopMenuSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
<SubgraphBreadcrumb />
</div>

<div
class="actionbar-container pointer-events-auto mx-1 flex h-12 items-center rounded-lg border border-[var(--interface-stroke)] px-2 shadow-interface"
>
<!-- Support for legacy topbar elements attached by custom scripts, hidden if no elements present -->
<!-- Right side: actionbar with overlay underneath -->
<div class="mx-1 flex flex-col items-end gap-1">
<div
ref="legacyCommandsContainerRef"
class="[&:not(:has(*>*:not(:empty)))]:hidden"
></div>
<ComfyActionbar />
<CurrentUserButton v-if="isLoggedIn" class="shrink-0" />
<LoginButton v-else-if="isDesktop" />
class="actionbar-container pointer-events-auto flex h-12 items-center rounded-lg border border-[var(--interface-stroke)] px-2 shadow-interface"
>
<!-- Support for legacy topbar elements attached by custom scripts, hidden if no elements present -->
<div
ref="legacyCommandsContainerRef"
class="[&:not(:has(*>*:not(:empty)))]:hidden"
></div>
<ComfyActionbar />
<CurrentUserButton v-if="isLoggedIn" class="shrink-0" />
<LoginButton v-else-if="isDesktop" />
</div>
<QueueProgressOverlay />
</div>
</div>
</template>
Expand All @@ -24,6 +28,7 @@ import { onMounted, ref } from 'vue'

import ComfyActionbar from '@/components/actionbar/ComfyActionbar.vue'
import SubgraphBreadcrumb from '@/components/breadcrumb/SubgraphBreadcrumb.vue'
import QueueProgressOverlay from '@/components/queue/QueueProgressOverlay.vue'
import CurrentUserButton from '@/components/topbar/CurrentUserButton.vue'
import LoginButton from '@/components/topbar/LoginButton.vue'
import { useCurrentUser } from '@/composables/auth/useCurrentUser'
Expand Down
1 change: 1 addition & 0 deletions src/components/actionbar/ComfyActionbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ const actionbarClass = computed(() =>
'w-[265px] border-dashed border-blue-500 opacity-80',
'm-1.5 flex items-center justify-center self-stretch',
'rounded-md before:w-50 before:-ml-50 before:h-full',
'pointer-events-auto',
isMouseOverDropZone.value &&
'border-[3px] opacity-100 scale-105 shadow-[0_0_20px] shadow-blue-500'
)
Expand Down
73 changes: 73 additions & 0 deletions src/components/queue/CompletionSummaryBanner.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import type { Meta, StoryObj } from '@storybook/vue3-vite'

import CompletionSummaryBanner from './CompletionSummaryBanner.vue'

const meta: Meta<typeof CompletionSummaryBanner> = {
title: 'Queue/CompletionSummaryBanner',
component: CompletionSummaryBanner,
parameters: {
layout: 'padded'
}
}

export default meta
type Story = StoryObj<typeof meta>

const thumb = (hex: string) =>
`data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><rect width='24' height='24' fill='%23${hex}'/></svg>`

const thumbs = [thumb('ff6b6b'), thumb('4dabf7'), thumb('51cf66')]

export const AllSuccessSingle: Story = {
args: {
mode: 'allSuccess',
completedCount: 1,
failedCount: 0,
thumbnailUrls: [thumbs[0]]
}
}

export const AllSuccessPlural: Story = {
args: {
mode: 'allSuccess',
completedCount: 3,
failedCount: 0,
thumbnailUrls: thumbs
}
}

export const MixedSingleSingle: Story = {
args: {
mode: 'mixed',
completedCount: 1,
failedCount: 1,
thumbnailUrls: thumbs.slice(0, 2)
}
}

export const MixedPluralPlural: Story = {
args: {
mode: 'mixed',
completedCount: 2,
failedCount: 3,
thumbnailUrls: thumbs
}
}

export const AllFailedSingle: Story = {
args: {
mode: 'allFailed',
completedCount: 0,
failedCount: 1,
thumbnailUrls: []
}
}

export const AllFailedPlural: Story = {
args: {
mode: 'allFailed',
completedCount: 0,
failedCount: 4,
thumbnailUrls: []
}
}
94 changes: 94 additions & 0 deletions src/components/queue/CompletionSummaryBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<template>
<button
type="button"
class="group flex w-full items-center justify-between gap-[calc(var(--spacing-spacing-xs)+var(--spacing-spacing-xxs))] rounded-lg border border-[var(--color-charcoal-400)] bg-[var(--color-charcoal-800)] p-[var(--spacing-spacing-xxs)] text-left transition-colors duration-200 ease-in-out hover:cursor-pointer hover:border-[var(--color-charcoal-300)] hover:bg-[var(--color-charcoal-700)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-slate-200)]"
>
<span class="inline-flex items-center gap-[var(--spacing-spacing-xs)]">
<span v-if="props.mode === 'allFailed'" class="inline-flex items-center">
<i
class="mr-[var(--spacing-spacing-xs)] icon-[lucide--circle-alert] block size-4 leading-none"
:class="'text-[var(--color-red-200)]'"
/>
</span>

<span class="inline-flex items-center gap-[var(--spacing-spacing-xs)]">
<span
v-if="props.mode !== 'allFailed'"
class="relative inline-flex h-6 items-center"
>
<span
v-for="(url, idx) in props.thumbnailUrls"
:key="url + idx"
class="inline-block h-6 w-6 overflow-hidden rounded-[6px] border-2 border-[var(--color-charcoal-800)] bg-[var(--color-charcoal-800)]"
:style="{ marginLeft: idx === 0 ? '0' : '-12px' }"
>
<img :src="url" alt="preview" class="h-full w-full object-cover" />
</span>
</span>

<span class="text-[14px] font-normal text-white">
<template v-if="props.mode === 'allSuccess'">
<i18n-t
keypath="sideToolbar.queueProgressOverlay.jobsCompleted"
:plural="props.completedCount"
>
<template #count>
<span class="font-bold">{{ props.completedCount }}</span>
</template>
</i18n-t>
</template>
<template v-else-if="props.mode === 'mixed'">
<i18n-t
keypath="sideToolbar.queueProgressOverlay.jobsCompleted"
:plural="props.completedCount"
>
<template #count>
<span class="font-bold">{{ props.completedCount }}</span>
</template>
</i18n-t>
<span>, </span>
<i18n-t
keypath="sideToolbar.queueProgressOverlay.jobsFailed"
:plural="props.failedCount"
>
<template #count>
<span class="font-bold">{{ props.failedCount }}</span>
</template>
</i18n-t>
</template>
<template v-else>
<i18n-t
keypath="sideToolbar.queueProgressOverlay.jobsFailed"
:plural="props.failedCount"
>
<template #count>
<span class="font-bold">{{ props.failedCount }}</span>
</template>
</i18n-t>
</template>
</span>
</span>
</span>

<span
class="flex items-center justify-center rounded p-[var(--spacing-spacing-xxs)] text-[var(--color-slate-100)] transition-colors duration-200 ease-in-out group-hover:bg-[var(--color-charcoal-600)] group-hover:text-white"
>
<i class="icon-[lucide--chevron-down] block size-4 leading-none" />
</span>
</button>
</template>

<script setup lang="ts">
import { defineProps, withDefaults } from 'vue'

type Props = {
mode: 'allSuccess' | 'mixed' | 'allFailed'
completedCount: number
failedCount: number
thumbnailUrls?: string[]
}

const props = withDefaults(defineProps<Props>(), {
thumbnailUrls: () => []
})
</script>
Loading
Loading