fork from frontpage

This commit is contained in:
Ruben Fiszel
2022-08-23 21:25:38 +02:00
parent cbbd41e6e2
commit c5c4138983
2 changed files with 36 additions and 3 deletions
+34 -2
View File
@@ -16,6 +16,7 @@
import {
faArchive,
faCalendarAlt,
faCodeFork,
faEdit,
faEye,
faList,
@@ -274,7 +275,7 @@
<div class="mr-3 w-full">
<SharedBadge {canWrite} extraPerms={extra_perms} />
</div>
<div class="flex flex-row-reverse w-full place">
<div class="flex flex-row-reverse w-full place space-x-1">
<div>
<Dropdown
dropdownItems={[
@@ -289,6 +290,11 @@
href: `/flows/edit/${path}`,
disabled: !canWrite
},
{
displayName: 'Use as template/Fork',
icon: faCodeFork,
href: `/flows/add?template=${path}`
},
{
displayName: 'View runs',
icon: faList,
@@ -319,12 +325,38 @@
]}
/>
</div>
{#if canWrite}
<div>
<a
class="inline-flex items-center default-button bg-transparent hover:bg-blue-500 text-blue-700 font-normal hover:text-white py-0 px-1 border-blue-500 hover:border-transparent rounded"
href="/flows/edit/{path}"
>
<div class="inline-flex items-center justify-center px-4">
<Icon data={faEdit} scale={0.6} />
<span class="pl-1">Edit</span>
</div>
</a>
</div>
{:else}
<div>
<a
class="inline-flex items-center default-button bg-transparent hover:bg-blue-500 text-blue-700 font-normal hover:text-white py-0 px-1 border-blue-500 hover:border-transparent rounded"
href="/flows/add?template={path}"
>
<div class="inline-flex items-center justify-center px-4">
<Icon data={faCodeFork} scale={0.6} />
<span class="pl-1">Fork</span>
</div>
</a>
</div>
{/if}
<div>
<a
class="inline-flex items-center default-button bg-transparent hover:bg-blue-500 text-blue-700 font-normal hover:text-white py-0 px-1 border-blue-500 hover:border-transparent rounded"
href="/flows/run/{path}"
>
<div class="inline-flex items-center justify-center">
<div class="inline-flex items-center justify-center px-4">
<Icon data={faPlay} scale={0.6} />
<span class="pl-1">Run</span>
</div>
+2 -1
View File
@@ -10,6 +10,7 @@
import {
faArchive,
faCalendarAlt,
faCodeFork,
faEdit,
faEye,
faList,
@@ -353,7 +354,7 @@
},
{
displayName: 'Use as template',
icon: faEdit,
icon: faCodeFork,
href: `/scripts/add?template=${path}`
},
{