feat(frontend): Buttons refactor (#2545)

* feat(frontend): wip

* feat(frontend): button refactor wip

* feat(frontend): button refactor wip

* feat(frontend): fix build

* feat(frontend): fix build

* fix(frontend): fix build

* fix(frontend): fix buttons styles

* fix(frontend): remove dev file

* feat(frontend): clean up

* feat(frontend): done

* feat(frontend): done

* feat(frontend): remove duplicated componnet

* feat(frontend): wip

* feat(frontend): wip

* feat(frontend): forked Flow icons

* feat(frontend): remove legacy dropdown

* feat(frontend): migrated all + remove dependencies

* feat(frontend): clean up
This commit is contained in:
Faton Ramadani
2023-11-10 09:43:10 +01:00
committed by GitHub
parent 0ccf706fa2
commit fe35c7ad3c
168 changed files with 1635 additions and 2249 deletions
@@ -11,14 +11,6 @@
StaticAppInput,
UserAppInput
} from '../../inputType'
import {
faCodeBranch,
faExternalLinkAlt,
faEye,
faPen,
faRefresh,
faTrashAlt
} from '@fortawesome/free-solid-svg-icons'
import type { AppViewerContext } from '../../types'
import { workspaceStore } from '$lib/stores'
import { createEventDispatcher } from 'svelte'
@@ -29,6 +21,7 @@
import { getScriptByPath } from '$lib/scripts'
import { sendUserToast } from '$lib/toast'
import { autoPlacement } from '@floating-ui/core'
import { ExternalLink, Eye, GitFork, Pen, RefreshCw, Trash } from 'lucide-svelte'
export let runnable: RunnableByPath
export let fields: Record<string, StaticAppInput | ConnectedAppInput | RowAppInput | UserAppInput>
@@ -115,7 +108,7 @@
<Button
variant="border"
size="xs"
startIcon={{ icon: faRefresh }}
startIcon={{ icon: RefreshCw }}
on:click={async () => {
sendUserToast('Refreshing inputs')
refresh(runnable)
@@ -129,7 +122,7 @@
size="xs"
variant="border"
color="red"
startIcon={{ icon: faTrashAlt }}
startIcon={{ icon: Trash }}
on:click={() => {
dispatch('delete')
}}
@@ -140,7 +133,7 @@
<Button
variant="border"
size="xs"
startIcon={{ icon: faEye }}
startIcon={{ icon: Eye }}
on:click={() => {
flowPath = runnable.path
drawerFlowViewer.openDrawer()
@@ -151,16 +144,16 @@
<Button
variant="border"
size="xs"
startIcon={{ icon: faPen }}
endIcon={{ icon: faExternalLinkAlt }}
startIcon={{ icon: Pen }}
endIcon={{ icon: ExternalLink }}
target="_blank"
href="/flows/edit/{runnable.path}?nodraft=true">Edit</Button
>
<Button
variant="border"
size="xs"
startIcon={{ icon: faEye }}
endIcon={{ icon: faExternalLinkAlt }}
startIcon={{ icon: Eye }}
endIcon={{ icon: ExternalLink }}
target="_blank"
href="/flows/get/{runnable.path}?workspace={$workspaceStore}"
>
@@ -170,7 +163,7 @@
<Button
size="xs"
variant="border"
startIcon={{ icon: faCodeBranch }}
startIcon={{ icon: GitFork }}
on:click={() => {
fork(runnable.path)
}}