mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 00:06:14 +00:00
feat(frontend): add the view runs buttons for operators (#2932)
* feat(frontend): add the view runs buttons for operators * Update +page.svelte * Update +page.svelte --------- Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
co-authored by
Ruben Fiszel
parent
0299c656c3
commit
821d2d7ea1
@@ -119,7 +119,7 @@
|
||||
function getMainButtons(flow: Flow | undefined, args: object | undefined) {
|
||||
const buttons: any = []
|
||||
|
||||
if (flow) {
|
||||
if (flow && !$userStore?.operator) {
|
||||
buttons.push({
|
||||
label: 'Fork',
|
||||
buttonProps: {
|
||||
@@ -132,7 +132,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (!flow || $userStore?.operator || !can_write) {
|
||||
if (!flow) {
|
||||
return buttons
|
||||
}
|
||||
|
||||
@@ -146,6 +146,10 @@
|
||||
}
|
||||
})
|
||||
|
||||
if (!flow || $userStore?.operator || !can_write) {
|
||||
return buttons
|
||||
}
|
||||
|
||||
if (!$userStore?.operator) {
|
||||
buttons.push({
|
||||
label: 'Build App',
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
function getMainButtons(script: Script | undefined, args: object | undefined, topHash?: string) {
|
||||
const buttons: any = []
|
||||
|
||||
if (!topHash && script) {
|
||||
if (!topHash && script && !$userStore?.operator) {
|
||||
buttons.push({
|
||||
label: 'Fork',
|
||||
buttonProps: {
|
||||
@@ -223,6 +223,20 @@
|
||||
})
|
||||
}
|
||||
|
||||
if (!script) {
|
||||
return buttons
|
||||
}
|
||||
|
||||
buttons.push({
|
||||
label: `View runs`,
|
||||
buttonProps: {
|
||||
href: `/runs/${script.path}`,
|
||||
size: 'xs',
|
||||
color: 'light',
|
||||
startIcon: History
|
||||
}
|
||||
})
|
||||
|
||||
if (!script || $userStore?.operator || !can_write) {
|
||||
return buttons
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user