feat: implement advanced access control system with user blocking, rate limiting, and enhanced login security; update UI components for improved user experience and documentation
This commit is contained in:
22
apps/web/src/lib/components/ti/UserStatusBadge.svelte
Normal file
22
apps/web/src/lib/components/ti/UserStatusBadge.svelte
Normal file
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
ativo: boolean;
|
||||
bloqueado?: boolean;
|
||||
}
|
||||
|
||||
let { ativo, bloqueado = false }: Props = $props();
|
||||
|
||||
const getStatus = () => {
|
||||
if (bloqueado) return { text: "Bloqueado", class: "badge-error" };
|
||||
if (ativo) return { text: "Ativo", class: "badge-success" };
|
||||
return { text: "Inativo", class: "badge-warning" };
|
||||
};
|
||||
|
||||
const status = $derived(getStatus());
|
||||
</script>
|
||||
|
||||
<span class="badge {status.class}">
|
||||
{status.text}
|
||||
</span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user