PageSourceSearch

https://lms.gie.kr/assets/Note-Bvmq_hFB.js

js gie.kr collected 2026-10-06 12:42:51 UTC 2,172 bytes, 1 lines download raw bytes

1import{e as g,a as v,u as S,r as i,j as e}from"./index-DMTSLr9O.js";import{T as D}from"./TiptapEditor-B3P-sO-K.js";import{L as p}from"./LMSLayout-DVcuaCDx.js";/* empty css                   */import"./index-BmbtWtbg.js";import"./config-pocBRGU-.js";import"./LMSSidebar-DvoCer1q.js";const L=()=>{const{noteId:o}=g(),x=v(),{t:a}=S(),[t,r]=i.useState(null),[s,l]=i.useState(!1),[m,c]=i.useState(""),[h,d]=i.useState("");i.useEffect(()=>{if(o){const n={id:o,title:o.replace(/-/g," ").replace(/\b\w/g,N=>N.toUpperCase()),content:"",createdDate:new Date().toISOString().split("T")[0],modifiedDate:new Date().toISOString().split("T")[0]};r(n),c(n.title),d(n.content)}},[o]);const u=()=>{if(t){const n={...t,title:m,content:h,modifiedDate:new Date().toISOString().split("T")[0]};r(n),l(!1)}},j=()=>{t&&(c(t.title),d(t.content),l(!1))},f=()=>{window.confirm("정말로 이 노트를 삭제하시겠습니까?")&&x("/lms/home")};return t?e.jsxs(p,{children:[e.jsxs("div",{className:"note-header",children:[e.jsxs("div",{className:"note-title-section",children:[s?e.jsx("input",{type:"text",value:m,onChange:n=>c(n.target.value),className:"note-title-input",placeholder:"노트 제목"}):e.jsx("h1",{className:"note-title",children:t.title}),e.jsxs("div",{className:"note-meta",children:[e.jsxs("span",{children:["생성: ",t.createdDate]}),t.modifiedDate!==t.createdDate&&e.jsxs("span",{children:["수정: ",t.modifiedDate]})]})]}),e.jsx("div",{className:"note-actions",children:s?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:u,className:"save-btn",children:a("저장")}),e.jsx("button",{onClick:j,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:f,className:"delete-btn",children:a("삭제")})]})})]}),e.jsx("div",{className:"note-content",children:e.jsx(D,{content:s?h:t.content,onChange:n=>{s&&d(n)},placeholder:s?"노트 내용을 작성하세요...":"",editable:s,minHeight:"300px"})})]}):e.jsx(p,{children:e.jsx("div",{className:"note-loading",children:e.jsx("p",{children:a("노트를 불러오는 중...")})})})};export{L 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.