mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-13 08:02:47 +00:00
fix: Archive button for archive-only deletes, single delete doc, inert Multiple triggers label in View
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ccfb259080
commit
8f6118c0e1
@@ -468,6 +468,12 @@
|
||||
fix={data.foldedFixes[0]}
|
||||
label={`${data.foldedFixes.length} error${data.foldedFixes.length === 1 ? '' : 's'} · Fix`}
|
||||
/>
|
||||
{:else if upstream && coTriggers.length > 1 && !coTriggers.some((t) => t.onOpen)}
|
||||
<!-- Several triggers, none editable here (View mode): a plain label. -->
|
||||
<span
|
||||
class="truncate rounded-md border px-1.5 py-1 text-3xs leading-none font-normal border-gray-300 dark:border-gray-600 text-secondary"
|
||||
>Multiple triggers</span
|
||||
>
|
||||
{:else if upstream && coTriggers.length > 1}
|
||||
<!-- Several triggers start what builds this asset: one chip, a menu to pick
|
||||
the one to edit. -->
|
||||
|
||||
@@ -19,7 +19,6 @@ export type ViewEdge = {
|
||||
export const noAssetNodeId = (runnableId: string) => `no-asset:${runnableId}`
|
||||
export const isNoAssetNode = (id: string) => id.startsWith('no-asset:')
|
||||
|
||||
/** The script and trigger an assets-only asset's delete removes. */
|
||||
/** What an assets-only delete removes: the script, its trigger, or both. */
|
||||
export type AssetUpstreamDelete = {
|
||||
script?: { path: string; unsaved: boolean }
|
||||
|
||||
@@ -3531,7 +3531,11 @@
|
||||
: assetDeleteTarget?.script
|
||||
? `${canHardDeleteScripts ? 'Delete' : 'Archive'} script?`
|
||||
: 'Delete trigger?'}
|
||||
confirmationText="Delete"
|
||||
confirmationText={assetDeleteTarget?.script && !canHardDeleteScripts
|
||||
? assetDeleteTarget.trigger
|
||||
? 'Archive and delete'
|
||||
: 'Archive'
|
||||
: 'Delete'}
|
||||
onConfirmed={confirmAssetUpstreamDelete}
|
||||
onCanceled={() => {
|
||||
if (!assetDeleteLoading) assetDeleteTarget = undefined
|
||||
|
||||
Reference in New Issue
Block a user