PageSourceSearch

https://pratiquemovimento.com.br/assets/LoginProfessor-Ci2Pb3IK.js

js pratiquemovimento.com.br collected 2026-10-08 02:16:58 UTC 4,017 bytes, 1 lines download raw bytes

1import{t as e,ao as s,r as a,j as r,ap as t,C as o,a as n,b as l,c as i,d as c,B as d,ai as m,aj as x,am as u,aq as h,af as f,a0 as p}from"./index-DgSFfepF.js";import{I as j}from"./input-S9Ov6r2n.js";import{L as g}from"./label-BkIkjyb9.js";import{B as b}from"./badge-CwmQuoU-.js";import{l as v}from"./logo-pratique-preto-BgFcxTGz.js";function N(){const N=e(),{user:y,professor:w,loading:E,signIn:C}=s(),[P,k]=a.useState(""),[q,S]=a.useState(""),[z,A]=a.useState(!1),[I,F]=a.useState(!1);return a.useEffect(()=>{(async()=>{if(!E&&y&&w){const{data:e,error:s}=await f.auth.getUser();if(s||!e.user)return void(await f.auth.signOut());w.first_login?N("/professor/nova-senha",{replace:!0}):N("/professor",{replace:!0})}})()},[y,w,E,N]),E?r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-b from-background to-secondary/30",children:r.jsxs("div",{className:"text-center",children:[r.jsx("h2",{className:"font-teko text-3xl font-bold text-foreground mb-2",children:"Carregando..."}),r.jsx("p",{className:"font-raleway text-muted-foreground",children:"Aguarde um momento"})]})}):r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-b from-background to-secondary/30 p-4",children:r.jsxs("div",{className:"w-full max-w-md",children:[r.jsxs("div",{className:"flex flex-col items-center mb-8",children:[r.jsx("img",{src:v,alt:"Pratique",className:"h-12 mb-4 dark:invert"}),r.jsxs(b,{variant:"secondary",className:"flex items-center gap-2 px-4 py-2 text-base",children:[r.jsx(t,{className:"h-5 w-5"}),"Portal de Ponto"]})]}),r.jsxs(o,{children:[r.jsxs(n,{className:"text-center",children:[r.jsx(l,{className:"text-2xl",children:"Acesso do Professor"}),r.jsx(i,{children:"Entre com suas credenciais para acessar o sistema de ponto"})]}),r.jsxs(c,{children:[r.jsxs("form",{onSubmit:async e=>{if(e.preventDefault(),P&&q){F(!0);try{const{error:e}=await C(P,q);if(e)return e.message.includes("Invalid login credentials")?p.error("Email ou senha incorretos"):p.error(e.message||"Erro ao fazer login"),void F(!1);p.success("Login realizado com sucesso!"),setTimeout(()=>{F(!1),N("/professor",{replace:!0})},500)}catch(s){p.error("Erro ao fazer login"),F(!1)}}else p.error("Preencha todos os campos")},className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(g,{htmlFor:"email",children:"Email"}),r.jsx(j,{id:"email",type:"email",placeholder:"[email protected]",value:P,onChange:e=>k(e.target.value),disabled:I,required:!0})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(g,{htmlFor:"password",children:"Senha"}),r.jsxs("div",{className:"relative",children:[r.jsx(j,{id:"password",type:z?"text":"password",placeholder:"••••••••",value:q,onChange:e=>S(e.target.value),disabled:I,required:!0}),r.jsx(d,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 hover:bg-transparent",onClick:()=>A(!z),tabIndex:-1,children:z?r.jsx(m,{className:"h-4 w-4 text-muted-foreground"}):r.jsx(x,{className:"h-4 w-4 text-muted-foreground"})})]})]}),r.jsx(d,{type:"submit",className:"w-full",disabled:I,children:I?"Entrando...":"Entrar"})]}),r.jsx("div",{className:"mt-4 text-center",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Esqueceu sua senha?"," ",r.jsx("a",{href:"https://wa.me/5519996092946?text=Ol%C3%A1%2C%20n%C3%A3o%20lembro%20minha%20senha%20do%20sistema%20de%20ponto.%20Pode%20me%20ajudar%2C%20por%20favor%3F",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Entre em contato"})]})}),r.jsx("div",{className:"mt-6 pt-6 border-t text-center",children:r.jsxs(u,{to:"/",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[r.jsx(h,{className:"h-4 w-4"}),"Voltar ao site"]})})]})]}),r.jsx("p",{className:"text-center text-xs text-muted-foreground mt-6",children:"Problemas para acessar? Entre em contato com a administração."})]})})}export{N as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.