PageSourceSearch

https://teacherss.kr/assets/SchoolRegistrationPage-DlBnwE68.js

js teacherss.kr collected 2026-10-02 01:59:49 UTC 4,955 bytes, 1 lines download raw bytes

1import{k as N,r as x,j as e,L as l}from"./vendor-react-D4NFYCVY.js";import{u as b,S as v,L as S,B as o,R as i,a as w,b as A,c as L,d as k,e as O,A as P,t as p}from"./index-Bo7vBx4r.js";import{A as I,a as E,b as R}from"./alert-D76yy7Qz.js";import{S as C}from"./SchoolSelect-BMAkMHwi.js";import{m as t}from"./vendor-motion-LReuCgk7.js";import"./vendor-data-DiuZHwsT.js";import"./vendor-state-mPENyaSF.js";import"./vendor-firebase-BXtaSaVx.js";import"./vendor-ui-DW-ZtMoV.js";import"./vendor-utils-CBGDym6X.js";import"./vendor-tiptap-DOlczfgE.js";import"./input-D7jdUXkC.js";import"./label-B3SoQVvX.js";import"./select-tgHeBxeb.js";import"./useRegisteredSchools-C6GNEfSR.js";import"./search-BABb3Il5.js";function X(){const c=N(),{user:s,registerSchool:h,signOut:u,isLoading:m}=b(),[n,d]=x.useState(!1),[a,j]=x.useState(null),f=async()=>{if(a){d(!0);try{await h(a.id),p.success("학교 연결이 완료되었어요."),c(i.APP.DASHBOARD)}catch(r){p.error(r instanceof Error?r.message:"학교 연결에 실패했습니다.")}finally{d(!1)}}},g=async()=>{await u(),c(i.LOGIN)},y=r=>{switch(r){case"email":return"전화번호 / 비밀번호";default:return"이메일"}};return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-muted/50 via-background to-muted/30 flex items-center justify-center p-4",children:e.jsxs(t.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{type:"spring",stiffness:300,damping:25},className:"w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx(t.div,{initial:{scale:.8,opacity:0}
1,animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:400,damping:20,delay:.1},className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-primary shadow-lg mb-5",children:e.jsx(v,{className:"w-8 h-8 text-primary-foreground"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"학교 연결"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"이미 로그인한 계정에 소속 학교를 연결할 때만 사용하는 단계입니다."})]}),!s&&e.jsx(t.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.15},className:"mb-6",children:e.jsxs(I,{className:"border-primary/20 bg-primary/5",children:[e.jsx(S,{className:"h-4 w-4"}),e.jsx(E,{children:"학교 연결은 로그인 후 진행합니다"}),e.jsxs(R,{className:"space-y-3",children:[e.jsx("p",{children:"이미 계정이 있고 소속 학교만 연결하려는 경우에 사용합니다."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(o,{asChild:!0,className:"h-11 rounded-xl",children:e.jsxs(l,{to:i.SIGNUP_PHONE,children:[e.jsx(w,{className:"w-4 h-4"}),"전화번호로 새 가입 시작"]})}),e.jsx(o,{asChild:!0,variant:"outline",className:"h-11 rounded-xl",children:e.jsx(l,{to:i.LOGIN,children:"로그인으로 돌아가기"})})]})]})]})}),s&&e.jsxs(t.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.2},className:"flex items-center gap-3 p-4 bg-card rounded-2xl border mb-6",children:[e.jsxs(A,{className:"h-10 w-10",children:[e.jsx(L,{src:s.profileImage,alt:s.name}),e.jsx(k,{className:"bg-primary/10 text-primary font-bold",children:s.name.charAt(0)})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.name}),e.jsxs("p",{className:"text-sm text-muted-foreground truncate",children:["현재 로그인 방식: ",y(s.provider)]})]}),e.jsx("button",{type:"button",onClick:g,className:"text-sm text-muted-foreground hover:text-foreground transition-colors shrink-0",children:e.jsx(O,{className:"h-4 w-4"})})]}),e.jsxs(t.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25},className:"mb-5 rounded-2xl border border-border bg-card/70 p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:"이 화면이 필요한 경우"}),e.jsxs("ul",{className:"mt-2 space-y-1 text-sm text-muted-foreground",children:[e.jsx("li",{children:"이미 만든 계정에 소속 학교를 연결해야 할 때"}),e.jsx("li",{children:"초대 링크 대신 직접 학교를 골라 합류해야 할 때"})]})]}),e.jsxs(t.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.3},className:"space-y-4",children:[e.jsx(C,{value:a==null?void 0:a.id,onChange:j,disabled:m||n}),e.jsx(o,{type:"button",onClick:f,className:"w-full h-14 text-lg rounded-2xl",disabled:m||n||!a,children:n?"연결 중...":e.jsxs(e.Fragment,{children:["학교 연결하기",e.jsx(P,{className:"ml-2 h-5 w-5"})]})})]}),e.jsx(t.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},className:"text-center mt-8 space-y-2",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["신규 교사 가입이 필요하다면"," ",e.jsx(l,{to:i.SIGNUP_PHONE,className:"font-semibold text-primary hover:underline",children:"전화번호 가입"}),"으로 시작해 주세요."]})})]})})}export{X as SchoolRegistrationPage,X 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.