mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
feat: add preview version badge for nightly builds (#8222)
## 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)
This commit is contained in:
committed by
GitHub
parent
e4d2bc2b59
commit
8261e1d187
@@ -1,4 +1,4 @@
|
||||
import { isCloud } from '@/platform/distribution/types'
|
||||
import { isCloud, isNightly } from '@/platform/distribution/types'
|
||||
|
||||
import './clipspace'
|
||||
import './contextMenuFilter'
|
||||
@@ -38,3 +38,8 @@ if (isCloud) {
|
||||
await import('./cloudSubscription')
|
||||
}
|
||||
}
|
||||
|
||||
// Nightly-only extensions
|
||||
if (isNightly && !isCloud) {
|
||||
await import('./nightlyBadges')
|
||||
}
|
||||
|
||||
17
src/extensions/core/nightlyBadges.ts
Normal file
17
src/extensions/core/nightlyBadges.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
})
|
||||
@@ -275,6 +275,7 @@
|
||||
"1x": "1x",
|
||||
"2x": "2x",
|
||||
"beta": "BETA",
|
||||
"nightly": "NIGHTLY",
|
||||
"profile": "Profile",
|
||||
"noItems": "No items"
|
||||
},
|
||||
@@ -2634,5 +2635,11 @@
|
||||
"workspaceNotFound": "Workspace not found",
|
||||
"tokenExchangeFailed": "Failed to authenticate with workspace: {error}"
|
||||
}
|
||||
},
|
||||
"nightly": {
|
||||
"badge": {
|
||||
"label": "Preview Version",
|
||||
"tooltip": "You are using a nightly version of ComfyUI. Please use the feedback button to share your thoughts about these features."
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user