Update index.html
Browse files- index.html +33 -9
index.html
CHANGED
|
@@ -131,9 +131,7 @@
|
|
| 131 |
.chat-msg{margin-bottom:10px;display:flex;gap:6px}.chat-msg.user{justify-content:flex-end}
|
| 132 |
.chat-msg .cb3{max-width:75%;padding:8px 12px;border-radius:10px;font-size:11px;line-height:1.6}
|
| 133 |
.chat-msg.user .cb3{background:#3b82f6;color:#fff;border-bottom-right-radius:3px}
|
| 134 |
-
.chat-msg.ai .cb3{background:#f1f5f9;color:#1e293b;border-bottom-left-radius:3px}
|
| 135 |
-
.chat-msg.ai .cb3 table{border-collapse:collapse;width:100%;margin:4px 0}.chat-msg.ai .cb3 td{border:1px solid #e2e8f0;padding:3px 6px;font-size:9px}
|
| 136 |
-
.chat-msg.ai .cb3 tr:first-child td{background:#f8fafc;font-weight:700}
|
| 137 |
.chat-input{display:flex;gap:6px;padding:10px 14px;border-top:1px solid #e2e8f0;background:#fff}
|
| 138 |
/* pocket card */
|
| 139 |
.pkt{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:8px;box-shadow:0 1px 2px rgba(0,0,0,.03);display:flex;flex-direction:column;gap:3px}.pkt:hover{border-color:#3b82f6}
|
|
@@ -446,7 +444,27 @@ function FileLibrary(){const[files,setFiles]=useState([]);const[ld,setLd]=useSta
|
|
| 446 |
{f.author===getUser()&&<button className="btn btn-d" style={{fontSize:8,padding:'3px 6px'}} onClick={()=>del(f.id)}>โ</button>}</div></div></div>)}</div>}
|
| 447 |
|
| 448 |
/* === Wizard MD + History + Side === */
|
| 449 |
-
function md2html(t){if(!t)return '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
|
| 451 |
function WizardTab({tasks,drops,pockets,reqs}){
|
| 452 |
const[msgs,setMsgs]=useState(()=>{try{return JSON.parse(localStorage.getItem('vd_chat'))||[{role:'ai',text:'๐ง ๋น๋๋ํํธ ๋ง๋ฒ์ฌ์
๋๋ค. ๋ฌด์์ด๋ ๋ฌผ์ด๋ณด์ธ์!'}]}catch(e){return[{role:'ai',text:'๐ง ๋ง๋ฒ์ฌ์
๋๋ค.'}]}});
|
|
@@ -502,10 +520,10 @@ function DashOverview({tasks,drops,reqs}){
|
|
| 502 |
<span style={{fontSize:12,fontWeight:700}}>๐ง {me}๋์ ๋ธ๋ฆฌํ</span>
|
| 503 |
<button className="btn btn-g" onClick={()=>loadBrief(true)} disabled={briefLoading} style={{fontSize:8}}>{briefLoading?'โณ ์์ฑ ์ค...':'๐ ์๋ก ์์ฑ'}</button></div>
|
| 504 |
{briefLoading&&!brief?<div style={{textAlign:'center',padding:10,color:'#94a3b8',fontSize:10}}>๐ง AI๊ฐ ๋ธ๋ฆฌํ์ ์ค๋นํ๊ณ ์์ต๋๋ค...</div>
|
| 505 |
-
:brief?<><div dangerouslySetInnerHTML={{__html:md2html(brief.text)}} style={{fontSize:
|
| 506 |
{brief.org_text&&<div style={{marginTop:8,padding:10,background:'rgba(255,255,255,.8)',borderRadius:6,border:'1px solid #e2e8f0'}}>
|
| 507 |
<div style={{fontSize:10,fontWeight:700,color:'#7c3aed',marginBottom:4}}>๐ ์กฐ์ง ๋ธ๋ฆฌํ (CEO ์ ์ฉ)</div>
|
| 508 |
-
<div dangerouslySetInnerHTML={{__html:md2html(brief.org_text)}} style={{fontSize:
|
| 509 |
:<div style={{color:'#94a3b8',fontSize:9,textAlign:'center',padding:6}}>๋ธ๋ฆฌํ ๋ก๋ฉ ์ค...</div>}
|
| 510 |
</div>
|
| 511 |
<div className="dash-search"><input value={search} onChange={e=>setSearch(e.target.value)} placeholder="๐ ์ ์ฒด ๊ฒ์ (๊ณผ์ ๋ช
, ๋ด๋น์)"/></div>
|
|
@@ -545,9 +563,15 @@ function AiInsights(){
|
|
| 545 |
<button className="btn btn-n" onClick={loadConn} disabled={cLoading} style={{padding:'10px',fontSize:11,justifyContent:'center'}}>๐ฎ {cLoading?'๋ถ์ ์ค...':'์ฐ๊ฒฐ ๋ฐ๊ฒฌ ์คํ'}</button>
|
| 546 |
{isCeo&&<button className="btn btn-n" onClick={loadWeekly} disabled={wLoading} style={{padding:'10px',fontSize:11,justifyContent:'center',background:'linear-gradient(135deg,#7c3aed,#ec4899)'}}>๐ {wLoading?'๋ถ์ ์ค...':'์กฐ์ง ์ง๋ฅ ๋ฆฌํฌํธ'}</button>}
|
| 547 |
</div>
|
| 548 |
-
{radar&&<div
|
| 549 |
-
|
| 550 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 551 |
{!radar&&!conn&&!weekly&&<div style={{textAlign:'center',color:'#94a3b8',fontSize:11,padding:40}}>
|
| 552 |
<div style={{fontSize:36,marginBottom:10}}>๐ฏ๐ฎ</div>
|
| 553 |
AI๊ฐ ๋น๋๋ํํธ์ ์ ์ฒด ๋ฐ์ดํฐ๋ฅผ ๋ถ์ํ์ฌ<br/>์ฌ์
๊ธฐํ์ ์จ์ ์ฐ๊ฒฐ์ ์ฐพ์๋
๋๋ค.<br/><br/>
|
|
|
|
| 131 |
.chat-msg{margin-bottom:10px;display:flex;gap:6px}.chat-msg.user{justify-content:flex-end}
|
| 132 |
.chat-msg .cb3{max-width:75%;padding:8px 12px;border-radius:10px;font-size:11px;line-height:1.6}
|
| 133 |
.chat-msg.user .cb3{background:#3b82f6;color:#fff;border-bottom-right-radius:3px}
|
| 134 |
+
.chat-msg.ai .cb3{background:#f1f5f9;color:#1e293b;border-bottom-left-radius:3px;font-size:11px;line-height:1.7}
|
|
|
|
|
|
|
| 135 |
.chat-input{display:flex;gap:6px;padding:10px 14px;border-top:1px solid #e2e8f0;background:#fff}
|
| 136 |
/* pocket card */
|
| 137 |
.pkt{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:8px;box-shadow:0 1px 2px rgba(0,0,0,.03);display:flex;flex-direction:column;gap:3px}.pkt:hover{border-color:#3b82f6}
|
|
|
|
| 444 |
{f.author===getUser()&&<button className="btn btn-d" style={{fontSize:8,padding:'3px 6px'}} onClick={()=>del(f.id)}>โ</button>}</div></div></div>)}</div>}
|
| 445 |
|
| 446 |
/* === Wizard MD + History + Side === */
|
| 447 |
+
function md2html(t){if(!t)return '';
|
| 448 |
+
// Code blocks first
|
| 449 |
+
let h=t.replace(/```(\w*)\n([\s\S]*?)```/g,'<pre style="background:#1e293b;color:#e2e8f0;padding:8px;border-radius:5px;font-size:9px;overflow-x:auto;font-family:JetBrains Mono,monospace;margin:6px 0"><code>$2</code></pre>');
|
| 450 |
+
h=h.replace(/`([^`]+)`/g,'<code style="background:#f1f5f9;padding:1px 3px;border-radius:2px;font-size:9px">$1</code>');
|
| 451 |
+
// Tables - group consecutive | lines into one table
|
| 452 |
+
const lines=h.split('\n');const out=[];let tbl=[];
|
| 453 |
+
const flushTable=()=>{if(tbl.length===0)return;
|
| 454 |
+
let html='<div style="overflow-x:auto;margin:8px 0"><table style="border-collapse:collapse;width:100%;font-size:10px">';
|
| 455 |
+
let isFirst=true;
|
| 456 |
+
tbl.forEach(row=>{if(/^[\s\|\-:]+$/.test(row.replace(/\|/g,'').trim()))return;
|
| 457 |
+
const cells=row.split('|').slice(1,-1);if(cells.length===0)return;
|
| 458 |
+
if(isFirst){html+='<tr>'+cells.map(c=>'<th style="background:#f1f5f9;border:1px solid #e2e8f0;padding:6px 10px;font-weight:700;font-size:10px;color:#1e293b;text-align:left;white-space:nowrap">'+c.trim()+'</th>').join('')+'</tr>';isFirst=false;}
|
| 459 |
+
else{html+='<tr>'+cells.map(c=>'<td style="border:1px solid #e2e8f0;padding:6px 10px;font-size:10px;color:#475569;line-height:1.5;vertical-align:top">'+c.trim()+'</td>').join('')+'</tr>';}});
|
| 460 |
+
html+='</table></div>';out.push(html);tbl=[]};
|
| 461 |
+
lines.forEach(l=>{if(l.trim().startsWith('|')&&l.trim().endsWith('|')){tbl.push(l)}else{flushTable();out.push(l)}});flushTable();
|
| 462 |
+
h=out.join('\n');
|
| 463 |
+
h=h.replace(/^### (.+)$/gm,'<div style="font-size:12px;font-weight:700;margin:10px 0 4px;color:#1e293b;border-left:3px solid #3b82f6;padding-left:8px">$1</div>');
|
| 464 |
+
h=h.replace(/^## (.+)$/gm,'<div style="font-size:13px;font-weight:800;margin:12px 0 6px;color:#1e293b;border-bottom:1px solid #e2e8f0;padding-bottom:4px">$1</div>');
|
| 465 |
+
h=h.replace(/\*\*(.+?)\*\*/g,'<b style="color:#1e293b">$1</b>');
|
| 466 |
+
h=h.replace(/^[\-\*] (.+)$/gm,'<div style="padding-left:12px;margin:2px 0;position:relative"><span style="position:absolute;left:0">โข</span> $1</div>');
|
| 467 |
+
h=h.replace(/\n/g,'<br/>');return h}
|
| 468 |
|
| 469 |
function WizardTab({tasks,drops,pockets,reqs}){
|
| 470 |
const[msgs,setMsgs]=useState(()=>{try{return JSON.parse(localStorage.getItem('vd_chat'))||[{role:'ai',text:'๐ง ๋น๋๋ํํธ ๋ง๋ฒ์ฌ์
๋๋ค. ๋ฌด์์ด๋ ๋ฌผ์ด๋ณด์ธ์!'}]}catch(e){return[{role:'ai',text:'๐ง ๋ง๋ฒ์ฌ์
๋๋ค.'}]}});
|
|
|
|
| 520 |
<span style={{fontSize:12,fontWeight:700}}>๐ง {me}๋์ ๋ธ๋ฆฌํ</span>
|
| 521 |
<button className="btn btn-g" onClick={()=>loadBrief(true)} disabled={briefLoading} style={{fontSize:8}}>{briefLoading?'โณ ์์ฑ ์ค...':'๐ ์๋ก ์์ฑ'}</button></div>
|
| 522 |
{briefLoading&&!brief?<div style={{textAlign:'center',padding:10,color:'#94a3b8',fontSize:10}}>๐ง AI๊ฐ ๋ธ๋ฆฌํ์ ์ค๋นํ๊ณ ์์ต๋๋ค...</div>
|
| 523 |
+
:brief?<><div dangerouslySetInnerHTML={{__html:md2html(brief.text)}} style={{fontSize:11,lineHeight:1.7,color:'#334155'}}/>
|
| 524 |
{brief.org_text&&<div style={{marginTop:8,padding:10,background:'rgba(255,255,255,.8)',borderRadius:6,border:'1px solid #e2e8f0'}}>
|
| 525 |
<div style={{fontSize:10,fontWeight:700,color:'#7c3aed',marginBottom:4}}>๐ ์กฐ์ง ๋ธ๋ฆฌํ (CEO ์ ์ฉ)</div>
|
| 526 |
+
<div dangerouslySetInnerHTML={{__html:md2html(brief.org_text)}} style={{fontSize:10,lineHeight:1.6,color:'#334155'}}/></div>}</>
|
| 527 |
:<div style={{color:'#94a3b8',fontSize:9,textAlign:'center',padding:6}}>๋ธ๋ฆฌํ ๋ก๋ฉ ์ค...</div>}
|
| 528 |
</div>
|
| 529 |
<div className="dash-search"><input value={search} onChange={e=>setSearch(e.target.value)} placeholder="๐ ์ ์ฒด ๊ฒ์ (๊ณผ์ ๋ช
, ๋ด๋น์)"/></div>
|
|
|
|
| 563 |
<button className="btn btn-n" onClick={loadConn} disabled={cLoading} style={{padding:'10px',fontSize:11,justifyContent:'center'}}>๐ฎ {cLoading?'๋ถ์ ์ค...':'์ฐ๊ฒฐ ๋ฐ๊ฒฌ ์คํ'}</button>
|
| 564 |
{isCeo&&<button className="btn btn-n" onClick={loadWeekly} disabled={wLoading} style={{padding:'10px',fontSize:11,justifyContent:'center',background:'linear-gradient(135deg,#7c3aed,#ec4899)'}}>๐ {wLoading?'๋ถ์ ์ค...':'์กฐ์ง ์ง๋ฅ ๋ฆฌํฌํธ'}</button>}
|
| 565 |
</div>
|
| 566 |
+
{radar&&<div style={{background:'#fff',border:'1px solid #bfdbfe',borderRadius:10,padding:16,marginBottom:12,boxShadow:'0 2px 8px rgba(59,130,246,.08)'}}>
|
| 567 |
+
<div style={{fontSize:13,fontWeight:800,color:'#1e40af',marginBottom:8,display:'flex',alignItems:'center',gap:6}}>๐ฏ ๊ธฐํ ๋ ์ด๋<span style={{fontSize:8,color:'#94a3b8',fontWeight:400,marginLeft:'auto'}}>AI ๋ถ์ ๊ฒฐ๊ณผ</span></div>
|
| 568 |
+
<div dangerouslySetInnerHTML={{__html:md2html(radar.text)}} style={{fontSize:11,lineHeight:1.7,color:'#334155'}}/></div>}
|
| 569 |
+
{conn&&<div style={{background:'#fff',border:'1px solid #c4b5fd',borderRadius:10,padding:16,marginBottom:12,boxShadow:'0 2px 8px rgba(139,92,246,.08)'}}>
|
| 570 |
+
<div style={{fontSize:13,fontWeight:800,color:'#6d28d9',marginBottom:8,display:'flex',alignItems:'center',gap:6}}>๐ฎ ์ฐ๊ฒฐ ๋ฐ๊ฒฌ<span style={{fontSize:8,color:'#94a3b8',fontWeight:400,marginLeft:'auto'}}>ํฌ๋ก์ค ๋ถ์</span></div>
|
| 571 |
+
<div dangerouslySetInnerHTML={{__html:md2html(conn.text)}} style={{fontSize:11,lineHeight:1.7,color:'#334155'}}/></div>}
|
| 572 |
+
{weekly&&<div style={{background:'linear-gradient(135deg,#faf5ff,#fdf2f8)',border:'1px solid #d8b4fe',borderRadius:10,padding:16,marginBottom:12,boxShadow:'0 2px 8px rgba(168,85,247,.1)'}}>
|
| 573 |
+
<div style={{fontSize:13,fontWeight:800,color:'#7c3aed',marginBottom:8,display:'flex',alignItems:'center',gap:6}}>๐ ์ฃผ๊ฐ ์กฐ์ง ์ง๋ฅ ๋ฆฌํฌํธ<span style={{fontSize:8,color:'#a78bfa',fontWeight:400,marginLeft:'auto'}}>CEO ์ ์ฉ</span></div>
|
| 574 |
+
<div dangerouslySetInnerHTML={{__html:md2html(weekly.text)}} style={{fontSize:11,lineHeight:1.7,color:'#334155'}}/></div>}
|
| 575 |
{!radar&&!conn&&!weekly&&<div style={{textAlign:'center',color:'#94a3b8',fontSize:11,padding:40}}>
|
| 576 |
<div style={{fontSize:36,marginBottom:10}}>๐ฏ๐ฎ</div>
|
| 577 |
AI๊ฐ ๋น๋๋ํํธ์ ์ ์ฒด ๋ฐ์ดํฐ๋ฅผ ๋ถ์ํ์ฌ<br/>์ฌ์
๊ธฐํ์ ์จ์ ์ฐ๊ฒฐ์ ์ฐพ์๋
๋๋ค.<br/><br/>
|