Files
Clintchiz 2c960fc1dc
Quality / quality (ubuntu-latest) (push) Failing after 9m49s
Quality / quality (windows-latest) (push) Canceled after 0s
refactor: migrate legacy wire namespace to wrn
2026-08-12 18:51:15 +05:30

28 lines
1013 B
Plaintext

import { Alert, Button } from "@wrnexus/ui"
component ImpersonationBanner {
props {
visible: boolean = true
targetName: string = "this user"
stopAction: string = "/api/auth/impersonation/stop"
stopSchema: string = "auth-empty"
redirect: string = "/account"
message: string = "You are viewing the application as"
stopLabel: string = "Stop impersonating"
color: string = "warning"
size: string = "md"
class: string = ""
}
view {
{#if visible}
<Alert {...attrs} title='{message + " " + targetName}' icon="icon-[lucide--scan-face]" color='{color}' size='{size}' variant="soft" class='{class}'>
<form method="post" action='{stopAction}' data-schema='{stopSchema}' data-redirect='{redirect}' novalidate class="mt-2">
<p data-error="_form" role="alert" class="m-0 hidden text-xs text-[var(--wrn-color-danger)]"></p>
<Button type="submit" label='{stopLabel}' color='{color}' size="sm" />
</form>
</Alert>
{/if}
}
}