mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-22 16:02:24 +00:00
feat(frontend): draft script/flow can only access the edit page until… (#2607)
* feat(frontend): draft script/flow can only access the edit page until deployed * feat(frontend): remove redirect
This commit is contained in:
@@ -420,12 +420,14 @@
|
||||
const dropdownItems: Array<{
|
||||
label: string
|
||||
onClick: () => void
|
||||
}> = [
|
||||
{
|
||||
}> = []
|
||||
|
||||
if (savedFlow?.draft_only === false) {
|
||||
dropdownItems.push({
|
||||
label: 'Exit & see details',
|
||||
onClick: () => dispatch('details', $pathStore)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
if (!newFlow) {
|
||||
dropdownItems.push({
|
||||
|
||||
@@ -314,12 +314,16 @@
|
||||
window.open(`/scripts/add?template=${initialPath}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Exit & See details',
|
||||
onClick: () => {
|
||||
goto(`/scripts/get/${initialPath}?workspace=${$workspaceStore}`)
|
||||
}
|
||||
}
|
||||
...(!script.draft_only
|
||||
? [
|
||||
{
|
||||
label: 'Exit & See details',
|
||||
onClick: () => {
|
||||
goto(`/scripts/get/${initialPath}?workspace=${$workspaceStore}`)
|
||||
}
|
||||
}
|
||||
]
|
||||
: [])
|
||||
]
|
||||
: []
|
||||
|
||||
@@ -584,7 +588,8 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div class="text-sm text-secondary flex flex-row gap-2">
|
||||
No custom worker group tag defined on this instance in "Workers {"->"} Assignable Tags"
|
||||
No custom worker group tag defined on this instance in "Workers {'->'} Assignable
|
||||
Tags"
|
||||
<a
|
||||
href="https://www.windmill.dev/docs/core_concepts/worker_groups"
|
||||
target="_blank"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import Portal from 'svelte-portal'
|
||||
|
||||
export let hasPadding: boolean = true
|
||||
export let target: string | undefined = undefined
|
||||
export let target: string | undefined = 'body'
|
||||
const [popperRef, popperContent] = createPopperActions({ placement: 'auto' })
|
||||
|
||||
const popperOptions: PopperOptions<{}> = {
|
||||
|
||||
@@ -74,7 +74,9 @@
|
||||
{/if}
|
||||
|
||||
<Row
|
||||
href="/flows/get/{path}?workspace={$workspaceStore}"
|
||||
href={draft_only
|
||||
? `/flows/edit/${path}?nodraft=true`
|
||||
: `/flows/get/${path}?workspace=${$workspaceStore}`}
|
||||
kind="flow"
|
||||
workspaceId={workspace_id ?? $workspaceStore ?? ''}
|
||||
{marked}
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
{/if}
|
||||
|
||||
<Row
|
||||
href="/scripts/get/{hash}?workspace={$workspaceStore}"
|
||||
href={draft_only ? `/scripts/edit/${path}` : `/scripts/get/${hash}?workspace=${$workspaceStore}`}
|
||||
kind="script"
|
||||
{marked}
|
||||
{path}
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
let can_write = false
|
||||
let path = $page.params.path
|
||||
let shareModal: ShareModal
|
||||
|
||||
let deploymentInProgress = false
|
||||
|
||||
$: cliCommand = `wmill flow run ${flow?.path} -d '${JSON.stringify(args)}'`
|
||||
|
||||
Reference in New Issue
Block a user