mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 00:16:53 +00:00
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:
@@ -10,8 +10,7 @@
|
||||
import { emptySchema } from '$lib/utils'
|
||||
import { getScriptByPath } from '$lib/scripts'
|
||||
|
||||
import { faCodeBranch } from '@fortawesome/free-solid-svg-icons'
|
||||
import { Building, Globe2 } from 'lucide-svelte'
|
||||
import { Building, GitFork, Globe2 } from 'lucide-svelte'
|
||||
import { createEventDispatcher, getContext } from 'svelte'
|
||||
import { fly } from 'svelte/transition'
|
||||
import type { AppViewerContext } from '../../types'
|
||||
@@ -172,7 +171,7 @@
|
||||
size="xs"
|
||||
variant="border"
|
||||
color="blue"
|
||||
startIcon={{ icon: faCodeBranch }}
|
||||
startIcon={{ icon: GitFork }}
|
||||
btnClasses="truncate"
|
||||
>
|
||||
Fork a script
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
import { Button, Drawer, DrawerContent } from '$lib/components/common'
|
||||
import type Editor from '$lib/components/Editor.svelte'
|
||||
import ScriptEditor from '$lib/components/ScriptEditor.svelte'
|
||||
import { faSave } from '@fortawesome/free-solid-svg-icons'
|
||||
import type { InlineScript } from '../../types'
|
||||
import { Save } from 'lucide-svelte'
|
||||
|
||||
let scriptEditorDrawer: Drawer
|
||||
export let inlineScript: InlineScript
|
||||
@@ -37,7 +37,7 @@
|
||||
/>
|
||||
{/if}
|
||||
<svelte:fragment slot="actions">
|
||||
<Button startIcon={{ icon: faSave }} disabled>Automatically Saved</Button>
|
||||
<Button startIcon={{ icon: Save }} disabled>Automatically Saved</Button>
|
||||
</svelte:fragment>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
|
||||
+9
-16
@@ -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)
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user