Files
windmill/frontend/src/lib/components/common/button/RefreshButton.svelte
T
e888c84a36 polish critical alert modal (#4802)
* polish critical alert modal

* Use Table component

* use table component pagination

* Add acknowledge to the table

* Polishing table

* fix nit

* Filter alerts

* Add notification count on modal

* Adjust table height

* Change mute description

* Fix layout

* minor fix

* Fix small screen issue

* fix toast on refresh

* Revert "fix toast on refresh"

This reverts commit ae3593e1af.

* filtering to backend, superadmin also acknowledges workspace (unless CLOUD_HOSTED), simplifications

* sqlx prep

* improve reactivity

* improvements

---------

Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
Co-authored-by: Alexander Petric <petric.al@gmail.com>
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2024-12-05 11:07:11 +01:00

35 lines
667 B
Svelte

<script lang="ts">
import { Button } from '$lib/components/common'
import { RefreshCw } from 'lucide-svelte'
import Popover from '$lib/components/Popover.svelte'
export let loading: boolean
let buttonHover = false
</script>
<Popover>
<Button
on:mouseenter={() => (buttonHover = true)}
on:mouseleave={() => (buttonHover = false)}
color="light"
size="xs2"
variant="border"
on:click
>
<RefreshCw class={loading ? 'animate-spin ' : ''} size="14" />
</Button>
<svelte:fragment slot="text">
{#if loading}
{#if buttonHover}
Stop Refreshing
{:else}
Refreshing...
{/if}
{:else}
Refresh
{/if}
</svelte:fragment>
</Popover>