fix(desktop): corrige tela de desativacao e adiciona botao Verificar novamente
All checks were successful
All checks were successful
- Corrige erro gramatical: "Dispositivo desativada" -> "Dispositivo desativado" - Adiciona botao "Verificar novamente" na tela de desativacao - Adiciona callback onReactivated no MachineStateMonitor - Corrige fundo escuro para cobrir toda a tela quando desativado - Corrige acentuacoes faltantes no historico de automacoes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
70cba99424
commit
a5bab2cc33
4 changed files with 119 additions and 46 deletions
|
|
@ -1,6 +1,24 @@
|
|||
import { ShieldAlert, Mail } from "lucide-react"
|
||||
import { ShieldAlert, Mail, RefreshCw } from "lucide-react"
|
||||
import { useState } from "react"
|
||||
|
||||
type DeactivationScreenProps = {
|
||||
companyName?: string | null
|
||||
onRetry?: () => Promise<void> | void
|
||||
}
|
||||
|
||||
export function DeactivationScreen({ companyName, onRetry }: DeactivationScreenProps) {
|
||||
const [isRetrying, setIsRetrying] = useState(false)
|
||||
|
||||
const handleRetry = async () => {
|
||||
if (isRetrying || !onRetry) return
|
||||
setIsRetrying(true)
|
||||
try {
|
||||
await onRetry()
|
||||
} finally {
|
||||
setIsRetrying(false)
|
||||
}
|
||||
}
|
||||
|
||||
export function DeactivationScreen({ companyName }: { companyName?: string | null }) {
|
||||
return (
|
||||
<div className="min-h-screen grid place-items-center bg-neutral-950 p-6">
|
||||
<div className="flex w-full max-w-[720px] flex-col items-center gap-6 rounded-2xl border border-slate-200 bg-white px-8 py-10 shadow-sm">
|
||||
|
|
@ -8,9 +26,9 @@ export function DeactivationScreen({ companyName }: { companyName?: string | nul
|
|||
<span className="inline-flex items-center gap-2 rounded-full border border-rose-200 bg-rose-50 px-3 py-1 text-xs font-semibold text-rose-700">
|
||||
<ShieldAlert className="size-4" /> Acesso bloqueado
|
||||
</span>
|
||||
<h1 className="text-2xl font-semibold text-neutral-900">Dispositivo desativada</h1>
|
||||
<h1 className="text-2xl font-semibold text-neutral-900">Dispositivo desativado</h1>
|
||||
<p className="max-w-md text-sm text-neutral-600">
|
||||
Esta dispositivo foi desativada temporariamente pelos administradores. Enquanto isso, o acesso ao portal e o
|
||||
Este dispositivo foi desativado temporariamente pelos administradores. Enquanto isso, o acesso ao portal e o
|
||||
envio de informações ficam indisponíveis.
|
||||
</p>
|
||||
{companyName ? (
|
||||
|
|
@ -29,12 +47,25 @@ export function DeactivationScreen({ companyName }: { companyName?: string | nul
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<a
|
||||
href="mailto:suporte@rever.com.br"
|
||||
className="mx-auto inline-flex items-center gap-2 rounded-full border border-black bg-black px-4 py-2 text-sm font-semibold text-white transition hover:bg-black/90"
|
||||
>
|
||||
<Mail className="size-4" /> Falar com o suporte
|
||||
</a>
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<a
|
||||
href="mailto:suporte@rever.com.br"
|
||||
className="inline-flex items-center gap-2 rounded-full border border-black bg-black px-4 py-2 text-sm font-semibold text-white transition hover:bg-black/90"
|
||||
>
|
||||
<Mail className="size-4" /> Falar com o suporte
|
||||
</a>
|
||||
{onRetry && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleRetry}
|
||||
disabled={isRetrying}
|
||||
className="inline-flex items-center gap-2 rounded-full border border-slate-300 bg-white px-4 py-2 text-sm font-semibold text-neutral-700 transition hover:bg-slate-50 disabled:opacity-50"
|
||||
>
|
||||
<RefreshCw className={`size-4 ${isRetrying ? "animate-spin" : ""}`} />
|
||||
{isRetrying ? "Verificando..." : "Verificar novamente"}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue