mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-30 00:07:30 +00:00
fix: leave drafts unchanged from the parent out of the fork bar's draft badge
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c885e012c5
commit
f614d2cb5d
@@ -47,8 +47,14 @@
|
||||
let showBanner = $derived(isFork && isNotOperator)
|
||||
|
||||
// Drafts in this fork. Pass undefined when the banner is hidden so it doesn't fetch.
|
||||
const drafts = useWorkspaceDrafts(() => (showBanner ? ($workspaceStore ?? undefined) : undefined))
|
||||
const draftCount = $derived(drafts.count)
|
||||
// Drafts cloned in from the parent and never edited are left out, as the draft view
|
||||
// the badge opens hides them; counting them shows a fresh fork's badge over an empty list.
|
||||
const drafts = useWorkspaceDrafts(
|
||||
() => (showBanner ? ($workspaceStore ?? undefined) : undefined),
|
||||
() => false,
|
||||
() => parentWorkspaceId ?? undefined
|
||||
)
|
||||
const draftCount = $derived(drafts.items.filter((d) => d.unchanged_from_parent !== true).length)
|
||||
|
||||
/** Bar width from which each badge says what it counts. Below it they keep the icon and the
|
||||
* number, which is the part a reader scans for; the tooltip names them either way. */
|
||||
|
||||
Reference in New Issue
Block a user