PageSourceSearch

https://www.hussde.com/assets/Note-kXT-E7Xl.js

js hussde.com collected 2026-09-29 02:04:28 UTC 2,414 bytes, 1 lines download raw bytes

1import{d as C,h as D,u as T,r as s,j as e}from"./index-CitDxPDD.js";import{L as x}from"./LMSLayout-BNIclSg2.js";import{T as E}from"./TiptapEditor-CXjQtmf_.js";/* empty css                   */import"./LMSHeader-BkpnkaSX.js";import"./LMSSidebar-CkyrX723.js";import"./TiptapEditor-Bs-meWAo.js";import"./with-selector-CPBoAPpH.js";const M=()=>{const{t:a}=C("lms"),{noteId:i}=D(),j=T(),[n,m]=s.useState(null),[o,l]=s.useState(!1),[p,c]=s.useState(""),[u,r]=s.useState(""),f=(t,d)=>{let h;return(...b)=>{clearTimeout(h),h=setTimeout(()=>t.apply(null,b),d)}},g=s.useCallback(f(t=>{r(t)},150),[]);s.useEffect(()=>{if(i){const t={id:i,title:i.replace(/-/g," ").replace(/\b\w/g,d=>d.toUpperCase()),content:"",createdDate:new Date().toISOString().split("T")[0],modifiedDate:new Date().toISOString().split("T")[0]};m(t),c(t.title),r(t.content)}},[i]);const N=()=>{if(n){const t={...n,title:p,content:u,modifiedDate:new Date().toISOString().split("T")[0]};m(t),l(!1)}},S=()=>{n&&(c(n.title),r(n.content),l(!1))},v=()=>{window.confirm("정말로 이 노트를 삭제하시겠습니까?")&&j("/lms/home")};return n?e.jsxs(x,{children:[e.jsxs("div",{className:"note-header",children:[e.jsxs("div",{className:"note-title-section",children:[o?e.jsx("input",{type:"text",value:p,onChange:t=>c(t.target.value),className:"note-title-input",placeholder:"노트 제목"}):e.jsx("h1",{className:"note-title",children:n.title}),e.jsxs("div",{className:"note-meta",children:[e.jsxs("span",{children:["생성: ",n.createdDate]}),n.modifiedDate!==n.createdDate&&e.jsxs("span",{children:["수정: ",n.modifiedDate]})]})]}),e.jsx("div",{className:"note-actions",children:o?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:N,className:"save-btn",children:a("저장")}),e.jsx("button",{onClick:S,className:"cancel-btn",children:a("취소")})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>l(!0),className:"edit-btn",children:a("편집")}),e.jsx("button",{onClick:v,className:"delete-btn",children:a("삭제")})]})})]}),e.jsx("div",{className:"note-content",children:o?e.jsx(E,{content:u,onChange:t=>g(t),placeholder:"노트 내용을 작성하세요...",minHeight:"400px"}):e.jsx("div",{className:"prose prose-lg max-w-none p-4",dangerouslySetInnerHTML:{__html:n.content}})})]}):e.jsx(x,{children:e.jsx("div",{className:"note-loading",children:e.jsx("p",{children:a("노트를 불러오는 중...")})})})};export{M 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.