* move settings and static inputs into top node
* Move test button in the top nodes
* Revert "Move test button in the top nodes"
This reverts commit 1c8648a538.
* Add error handler to top toolbar
* nit
* polishing
* add flow settings to topbar dropdown
* remove unused files
* progress
* progress
* fixes
* fix
* fix
* fix
* fix
---------
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
41 lines
908 B
Svelte
41 lines
908 B
Svelte
<script lang="ts">
|
|
import { Button } from './common'
|
|
import Popover from './meltComponents/Popover.svelte'
|
|
import { autoPlacement } from '@floating-ui/core'
|
|
import ChangeInstanceUsernameInner from './ChangeInstanceUsernameInner.svelte'
|
|
|
|
interface Props {
|
|
email: string
|
|
username: string
|
|
isConflict?: boolean
|
|
}
|
|
|
|
let { email, username, isConflict = false }: Props = $props()
|
|
</script>
|
|
|
|
<Popover
|
|
floatingConfig={{
|
|
middleware: [
|
|
autoPlacement({
|
|
allowedPlacements: ['bottom-end', 'top-end']
|
|
})
|
|
]
|
|
}}
|
|
closeButton
|
|
>
|
|
{#snippet trigger()}
|
|
<Button color={isConflict ? 'red' : 'light'} size="xs" spacingSize="xs2" nonCaptureEvent={true}
|
|
>{isConflict ? 'Fix username conflict' : 'Change username'}</Button
|
|
>
|
|
{/snippet}
|
|
{#snippet content()}
|
|
<ChangeInstanceUsernameInner
|
|
{email}
|
|
{username}
|
|
{isConflict}
|
|
on:close={() => close()}
|
|
on:renamed
|
|
/>
|
|
{/snippet}
|
|
</Popover>
|