mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-22 00:03:35 +00:00
* fix: keep the instance users table's actions and header in view Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015pMjimm9tUMXtD8rkWB62w * fix: lock only the User option for group-granted roles and keep pinned cells opaque Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015pMjimm9tUMXtD8rkWB62w * fix: close the instance settings drawer from the manage-in-workspace menu item Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015pMjimm9tUMXtD8rkWB62w --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
55 lines
1.4 KiB
Svelte
55 lines
1.4 KiB
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'
|
|
import { AlertTriangle } from 'lucide-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()}
|
|
{#if isConflict}
|
|
<!-- An icon rather than a labelled button: the username column truncates text but
|
|
cannot truncate a button, so a wide trigger here forced the whole table to scroll. -->
|
|
<Button
|
|
variant="subtle"
|
|
unifiedSize="xs"
|
|
iconOnly
|
|
startIcon={{ icon: AlertTriangle }}
|
|
btnClasses="text-yellow-600 dark:text-yellow-400"
|
|
title="No instance username. Click to fix the conflict."
|
|
aria-label="Fix username conflict"
|
|
nonCaptureEvent={true}
|
|
/>
|
|
{:else}
|
|
<Button variant="default" unifiedSize="xs" nonCaptureEvent={true}>Change username</Button>
|
|
{/if}
|
|
{/snippet}
|
|
{#snippet content()}
|
|
<ChangeInstanceUsernameInner
|
|
{email}
|
|
{username}
|
|
{isConflict}
|
|
on:close={() => close()}
|
|
on:renamed
|
|
/>
|
|
{/snippet}
|
|
</Popover>
|