PageSourceSearch

https://slovicka-z-tabule.macaly.app/assets/onboarding-DVSbvMBc.js

js slovicka-z-tabule.macaly.app collected 2026-10-03 04:59:21 UTC 4,978 bytes, 1 lines download raw bytes

1import{j as e,o as C,l as S,m as A,g as r}from"./index-C85f1AT8.js";import{A as L,a as h,C as B}from"./card-BE0rv6DZ.js";import{c as n,B as i}from"./mascot-DcGQbnxF.js";import{I as E}from"./input-C5SoR5uG.js";import{L as I}from"./label-7yR_Sk9c.js";import{R as j}from"./role-card-DMgc0nS6.js";import{U as P,G as c,S as w}from"./user-DpXWtx2H.js";import{C as v}from"./chevron-right-DH_DWRAd.js";import{C as g}from"./chevron-left-D3weigqo.js";import"./auth_helpers-DV8vHpKc.js";const M=["A1","A2","B1","B2","C1","C2"],f={A1:"Začátečník — pozdravy, základní fráze",A2:"Základy — jednoduché věty o každodenních věcech",B1:"Mírně pokročilý — zvládnu jednoduchou konverzaci",B2:"Pokročilý — plynná konverzace na známá témata",C1:"Velmi pokročilý — většina situací bez přípravy",C2:"Mistrovský — téměř jako rodilý mluvčí"};function T(){return e.jsx(L,{children:e.jsx(R,{})})}function R(){const m=C(h.users.getMe),N=S(h.users.updateProfile),k=A(),[a,l]=r.useState(0),[d,y]=r.useState(m?.name??""),[o,x]=r.useState("student"),[t,b]=r.useState(null),[p,u]=r.useState(!1);if(m===void 0)return null;const z=async()=>{u(!0);try{await N({name:d.trim()||void 0,role:o,level:t??void 0,onboarded:!0}),k({to:"/dashboard"})}finally{u(!1)}};return e.jsx("main",{className:"min-h-dvh grid place-items-center px-6 py-12",children:e.jsxs("div",{className:"w-full max-w-lg",children:[e.jsxs("div",{className:"flex items-center justify-center mb-8 gap-2",children:[e.jsx("div",{className:n("size-2 rounded-full",a>=0?"bg-primary":"bg-border")}),e.jsx("div",{className:n("size-2 rounded-full",a>=1?"bg-primary":"bg-border")}),e.jsx("div",{className:n("size-2 rounded-full",a>=2?"bg-primary":"bg-border")})]}),e.jsxs(B,{className:"glass-strong p-7 shadow-xl animate-fade-up",children:[a===0&&e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-xl bg-primary/10 text-primary grid place-items-center",children:e.jsx(P,{className:"size-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-2xl",children:"Jak ti máme říkat?"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Abychom tě mohli pozdravit."})]})]}),e.jsxs("div",{children:[e.jsx(I,{htmlFor:"name",children:"Tvoje jméno nebo přezdívka"}),e.jsx(E,{id:"name",value:d,onChange:s=>y(s.target.value),placeholder:"např. Anička",autoFocus:!0,className:"mt-1.5"})]}),e.jsxs(i,{onClick:()=>l(1),disabled:!d.trim(),className:"w-full",size:"lg",children:["Pokračovat ",e.jsx(v,{className:"size-4"})]})]}),a===1&&e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-xl bg-primary/10 text-primary grid place-items-center",children:e.jsx(c,{className:"size-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-2xl",children:"Jsi student nebo lektor?"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Aplikace se přizpůsobí."})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(j,{active:o==="student",onClick:()=>x("student"),icon:w,title:"Student",desc:"Chci se učit a procvičovat",testId:"role-card-student"}),e.jsx(j,{active:o==="lektor",onClick:()=>x("lektor"),icon:c,title:"Lektor",desc:"Mám studenty a chci jejich přehled",testId:"role-card-lektor"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(i,{variant:"ghost",onClick:()=>l(0),size:"lg",children:[e.jsx(g,{className:"size-4"})," Zpět"]}),e.jsxs(i,{onClick:()=>l(2),size:"lg",className:"flex-1",children:["Pokračovat ",e.jsx(v,{className:"size-4"})]})]})]}),a===2&&e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-xl bg-primary/10 text-primary grid place-items-center",children:e.jsx(c,{className:"size-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-2xl",children:"Jaká je tvoje úroveň?"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Přizpůsobíme tomu AI i cvičení."})]})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:M.map(s=>e.jsxs("button",{onClick:()=>
1b(s),className:n("rounded-xl border p-3 text-left transition-all",t===s?"border-primary bg-primary/5 ring-2 ring-primary/30":"border-border hover:bg-muted"),children:[e.jsx("div",{className:"font-display text-xl",children:s}),e.jsx("div",{className:"text-[10px] text-muted-foreground leading-tight mt-0.5",children:f[s].split(" — ")[0]})]},s))}),t&&e.jsx("p",{className:"text-xs text-muted-foreground",children:f[t]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(i,{variant:"ghost",onClick:()=>l(1),size:"lg",children:[e.jsx(g,{className:"size-4"})," Zpět"]}),e.jsx(i,{onClick:z,disabled:!t||p,size:"lg",className:"flex-1",children:p?"Ukládám…":"Hotovo, jdeme na to!"})]})]})]})]})})}export{T as component};

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.