mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
## Summary Adds a "Preview Version" badge to the topbar on nightly builds to help users identify when they're using an unreleased version and encourage feedback. ## Changes - Add `nightly.badge` i18n translations (label and tooltip) - Create `nightlyBadges.ts` extension with info variant badge - Load nightly badges extension when `isNightly` is true - Badge tooltip encourages users to provide feedback via the feedback button ## Test plan - [ ] Build and run nightly version, verify "NIGHTLY | Preview Version" badge appears in topbar - [ ] Hover over badge, verify tooltip shows: "You are using a nightly version of ComfyUI. Please use the feedback button to share your thoughts about these features." - [ ] Verify stable OSS builds don't show the badge - [ ] Verify cloud builds don't show the nightly badge ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8222-feat-add-preview-version-badge-for-nightly-builds-2ef6d73d36508102aa0dfc22ef14c9c1) by [Unito](https://www.unito.io)
18 lines
413 B
TypeScript
18 lines
413 B
TypeScript
import { t } from '@/i18n'
|
|
import { useExtensionService } from '@/services/extensionService'
|
|
import type { TopbarBadge } from '@/types/comfy'
|
|
|
|
const badges: TopbarBadge[] = [
|
|
{
|
|
text: t('nightly.badge.label'),
|
|
label: t('g.nightly'),
|
|
variant: 'warning',
|
|
tooltip: t('nightly.badge.tooltip')
|
|
}
|
|
]
|
|
|
|
useExtensionService().registerExtension({
|
|
name: 'Comfy.Nightly.Badges',
|
|
topbarBadges: badges
|
|
})
|