@kimuson/claude-code-viewer 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +0,0 @@
1
- import{c as x,r as s,u as y,a as g,j as e,C as j,b as w,d as v,e as N,f as k,I as C,B as E,L as S}from"./index-o-QkXv15.js";import{L as I}from"./label-Dbrhlt6Q.js";import{E as L}from"./eye-HGnuNHNq.js";/**
2
- * @license lucide-react v0.548.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const P=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],M=x("eye-off",P);/**
7
- * @license lucide-react v0.548.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const _=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],A=x("key-round",_);function D(){const[a,p]=s.useState(""),[t,h]=s.useState(!1),[i,d]=s.useState(""),[r,l]=s.useState(!1),{authEnabled:c,isAuthenticated:m,login:f}=y(),o=g();s.useEffect(()=>{c?m&&o({to:"/projects"}):o({to:"/projects"})},[c,m,o]);const b=async n=>{n.preventDefault(),d(""),l(!0);try{await f(a)}catch(u){d(u instanceof Error?u.message:"Invalid password. Please try again.")}finally{l(!1)}};return e.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background via-background to-muted/30 p-4",children:[e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-primary/5 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-primary/5 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] bg-gradient-to-r from-primary/3 to-transparent rounded-full blur-3xl"})]}),e.jsxs(j,{className:"w-full max-w-md relative backdrop-blur-sm bg-card/95 border-border/50 shadow-xl animate-in fade-in-0 zoom-in-95 duration-300",children:[e.jsxs(w,{className:"space-y-4 text-center pb-2",children:[e.jsx("div",{className:"mx-auto w-16 h-16 rounded-2xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center border border-primary/10 shadow-inner",children:e.jsx(A,{className:"w-8 h-8 text-primary"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{className:"text-2xl font-bold tracking-tight",children:"Claude Code Viewer"}),e.jsx(N,{className:"text-muted-foreground",children:"Enter your password to continue"})]})]}),e.jsx(k,{className:"pt-4",children:e.jsxs("form",{onSubmit:b,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"password",className:"text-sm font-medium",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(C,{id:"password",type:t?"text":"password",value:a,onChange:n=>p(n.target.value),placeholder:"Enter your password",className:"pr-10 h-11 text-base",autoFocus:!0,disabled:r}),e.jsx("button",{type:"button",onClick:()=>h(!t),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",tabIndex:-1,children:t?e.jsx(M,{className:"h-4 w-4"}):e.jsx(L,{className:"h-4 w-4"})})]})]}),i&&e.jsx("div",{className:"text-sm text-destructive bg-destructive/10 border border-destructive/20 rounded-lg px-4 py-3 animate-in slide-in-from-top-1 duration-200",children:i}),e.jsx(E,{type:"submit",className:"w-full h-11 text-base font-medium",disabled:!a||r,children:r?e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing in..."]}):"Sign in"})]})})]})]})}export{D as component};