Files
windmill/frontend/src/lib/components/common/button/PulseButton.svelte
T
ebfde197fc fix(ui): capture v2 UX (#4954)
* feat: captures

* flow UI and improvements

* fix: build

* fix sqlx

* Move Capture WIP

* Add capture to webhook and websocket

* Move connection status viewer in the head

* change trigger section label

* Add popover capture picker using melt ui

* Add shortcut to triggers capture from input form

* remove capture tab in input

* Allways show capture

* remove useless logs

* Add email capture

* Add kafka capture into triggers

* Add edit option in capture table

* use light header for arg input

* Add prefilled group id

* Change button label

* fix logic

* Open resource drawer if prototype has fields

* fix default completion

* Change name Prototype

* Dissociate Editor Mode for triggers

* Fix bug for script

* Fix apply args

* fix apply schema

* Add capture table to script

* fix apply args

* Add capture button for script

* Delete capture tab

* Set capture on when opening triggers capture

* fix connection indicator

* fix minor issues

* Add preprocessor logic

* Use slot in log Panel for captures

* handle capture refresh in script

* Delete capture tab from script editor

* reset kafka resource on toggle static

* fix minor issue

* Allow resource in kafka capture

* use simple capture button in flow

* Remove capture panel

* Polish route trigger editor

* Fix resource saving

* Remove excessive padding

* merge nits

* Add history tab

# Conflicts:
#	frontend/src/lib/components/EditableSchemaForm.svelte

* add workflow_dispatch to build

* add workflow_dispatch to build

* Move input copy from in a panel

* better capture UI

* Add smoothing animation on open input editor

* fix bad wrapping in input editor menu

* clean code

* restore captureTable

* clean

* fix sqlx

* fix build

* fix build

* build

* make initial_messages optional in line with db

* fix npm check

* better handle args for capture webhook and http

* add capture pagination

* Add capture table

* Add table for history inputs

* nit

* simplify capture table

* stop capturing on closing capture section

* show only 10 items per page for captures

* set focus to logs on script test

* Fix collapsable section

* nit

* open captures when applying args from triggers

* update edit input drawer

* fix all EditableSchemaForm

* fix panel init animation

* Add capture popover

* change open tab button

* clean code

* fix bad table display

* Fix JSON input bad sync

* make capture icon bigger

* nit

* nit

* revert unwanted change

* Change capture name and nits

* infinite scroll and cleaning

* Add toast when failing to retreive first step input

* add icons to dropdown edit input list

* remove unused log

* Add click outside to all schema pickers

* fix click oustide

* Fix migrations

* solve run button not refreshing properly

* Add a capture drawer

* change apply args and schema logic

* change apply args and schema logic

* fix toggle display

* fix schema display

* improve preview mode

* Add first step panel

* nit

* clean

* Add hint for captures

* clean

* nit

* nit

* fix script node page height

* improve animation on redirecting to capture

* improve saved input picker

* nit

* add Json placeholder

* nit

* add list animations

* delete useless logs

* add animated list to captures history and saved inputs

* Delete unused component

* clean

* nit

* clean code

* improve tab scroll experience

* nit

* nits

* nits

* fix script args update

* nit

* nit: include preview in history inputs in edit mode

---------

Co-authored-by: HugoCasa <hugo@casademont.ch>
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2025-01-13 14:45:38 +01:00

83 lines
1.6 KiB
Svelte

<script>
export let pulseDuration = 2
export let numberOfPulses = 3
export let scale = 1.2
let isPulsing = false
let pulseCount = 1
export function triggerPulse(count) {
if (pulseCount < 1) return
if (!isPulsing) {
pulseCount = count
isPulsing = true
setTimeout(() => {
isPulsing = false
}, pulseDuration * count * 1000)
}
}
</script>
<div class="relative">
<div>
<slot />
</div>
{#each Array(numberOfPulses) as _, i}
<div
class:deactivate={isPulsing}
style={`--pulse-duration: ${pulseDuration}s; --i:${i}; --scale:${scale}; --number-of-pulses:${numberOfPulses}; --pulse-count:${pulseCount};`}
>
<div class="pulse" class:active={isPulsing} />
</div>
{/each}
</div>
<style>
.relative {
position: relative;
display: inline-block;
}
.pulse {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
background: rgb(81, 151, 255);
border-radius: 8px;
transform: translate(-50%, -50%) scale(1);
z-index: 0;
pointer-events: none;
opacity: 0;
}
.pulse.active {
animation: pulse var(--pulse-duration) ease-out infinite;
animation-delay: calc(var(--i) * var(--pulse-duration) / var(--number-of-pulses));
opacity: 1;
}
.deactivate {
animation: fade calc(var(--pulse-duration) * 0.3) ease-out;
animation-delay: calc(var(--pulse-duration) * var(--pulse-count) - var(--pulse-duration) * 0.2);
opacity: 1;
}
@keyframes fade {
0% {
opacity: 0.8;
}
100% {
opacity: 0;
}
}
@keyframes pulse {
100% {
transform: translate(-50%, -50%) scale(var(--scale));
opacity: 0;
}
}
</style>