Warmiak commited on
Commit
f59ba92
·
verified ·
1 Parent(s): 70e5387

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -37,3 +37,7 @@ screenshot_search.png filter=lfs diff=lfs merge=lfs -text
37
  screenshot_ship_tree.png filter=lfs diff=lfs merge=lfs -text
38
  screenshot_stories.png filter=lfs diff=lfs merge=lfs -text
39
  screenshot_timeline.png filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
37
  screenshot_ship_tree.png filter=lfs diff=lfs merge=lfs -text
38
  screenshot_stories.png filter=lfs diff=lfs merge=lfs -text
39
  screenshot_timeline.png filter=lfs diff=lfs merge=lfs -text
40
+ media/pinakoteka/orda-boltupie.jpg filter=lfs diff=lfs merge=lfs -text
41
+ media/pinakoteka/orda-holszany.jpg filter=lfs diff=lfs merge=lfs -text
42
+ media/pinakoteka/orda-werki.jpg filter=lfs diff=lfs merge=lfs -text
43
+ media/pinakoteka/orda-wilno-sw-anna.jpg filter=lfs diff=lfs merge=lfs -text
index.html CHANGED
@@ -98,6 +98,18 @@ body.mode-stories .obj-only{display:none}
98
  .sdetail .sq{border-left:3px solid var(--line2);padding-left:8px;margin:8px 0;font-style:italic;color:#334}
99
  .excerpt{color:var(--muted);font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
100
  .dom{font-size:11px;color:var(--muted)}
 
 
 
 
 
 
 
 
 
 
 
 
101
  @media(max-width:900px){.layout{grid-template-columns:1fr}.pane-b{max-height:none}}
102
  </style>
103
  </head>
@@ -167,6 +179,14 @@ body.mode-stories .obj-only{display:none}
167
  </div>
168
  <footer>InventoryAI · Obiekty + Historie · RPC explorer_*</footer>
169
  </div>
 
 
 
 
 
 
 
 
170
  <script>
171
  const SUPABASE_URL='https://nqscnkbgnxwlrkaatwco.supabase.co';
172
  const SUPABASE_KEY='sb_publishable_LR0kGBTMr8YBr7EUCtE0Ng_1Y_0t1rL';
@@ -180,7 +200,7 @@ const STORY_TYPES=[
180
  {id:'modernizacja',label:'modernizacja'},
181
  {id:'ciekawostka',label:'ciekawostka'}
182
  ];
183
- const ICON={ship:'⚓',building:'⌂',floor:'▭',room:'▢',rack:'▣',compartment:'▢',deck:'▭',port:'◦',switch:'⇄',router:'◈',cable:'∿',ups:'⚡',service:'★',boiler:'♨',turbine_set:'⟳',generator:'⚡',gun_mount:'✚',propeller:'✱',shaft_line:'─',sensor:'◉',fire_control:'◎'};
184
  const ic=c=>ICON[c]||'·';
185
  const badge=c=>`<span class="badge ${esc(c||'')}">${esc(CONF[c]||c||'—')}</span>`;
186
 
@@ -307,8 +327,8 @@ async function boot(){
307
  }
308
 
309
  function renderChips(){
310
- const domains=['','telco','maritime','energy','common','knowledge'];
311
- const labels={'':'wszystkie','telco':'telco','maritime':'morskie','energy':'energia','common':'wspólne','knowledge':'wiedza'};
312
  document.getElementById('chips').innerHTML=domains.map(d=>`<button type="button" class="chip ${S.domainFilter===d||(!S.domainFilter&&d==='')?'on':''}" data-d="${d}">${labels[d]}</button>`).join('');
313
  document.querySelectorAll('#chips .chip').forEach(c=>c.onclick=()=>{ S.domainFilter=c.dataset.d||null; if(S.domainFilter==='') S.domainFilter=null; renderChips(); const q=document.getElementById('search').value.trim(); if(q) runSearch(q); });
314
  }
@@ -420,7 +440,7 @@ function renderStoryList(){
420
  async function openTenantRoot(tid, preferId){
421
  S.tenant=tid; S.nodes.clear(); S.roots=[]; S.selected=null; S.detail=null; S.impact=null; S.hit=new Set(); S.stories=[];
422
  S.scope={classId:null, filterKey:'', filterVal:'', limit:50, offset:0, total:0, rows:[], view:'flat', columns:[]};
423
- S.classes=(await rpc('explorer_classes',{p_tenant:tid})).filter(c=>!['story','source'].includes(c.code));
424
  const roots=await rpc('explorer_children',{p_tenant:tid,p_parent:null});
425
  S.roots=roots.map(n=>{ const x={...n, children:[], childrenLoaded:false, collapsed:false}; S.nodes.set(n.id,x); return x; });
426
  await refreshStoryCounts([...S.nodes.keys()]);
@@ -534,6 +554,7 @@ function renderMain(){
534
  <div class="crumb">${crumb||esc(o.code)}</div>
535
  <div class="dtitle">${ic(o.class_code)} ${esc(o.name)}</div>
536
  <div class="dsub"><span class="mono">${esc(o.code)}</span> · ${esc(o.class_name)} · ${badge(o.confidence)}</div>
 
537
  <table class="t"><thead><tr><th>Parametr</th><th>Wartość</th><th>Jedn.</th><th>Pewność</th><th>Źródło</th></tr></thead>
538
  <tbody>${attrRows||'<tr><td colspan="5" class="muted">Brak atrybutów</td></tr>'}</tbody></table>
539
  <div class="rtabs">
@@ -662,7 +683,32 @@ function bindMain(){
662
  document.getElementById('st-scope')?.addEventListener('change', e=>syncScope(e.target.checked));
663
  document.getElementById('st-scope2')?.addEventListener('change', e=>syncScope(e.target.checked));
664
  document.getElementById('goto-slist')?.addEventListener('click', ()=>setView('stories'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
665
  }
 
666
 
667
  function exportCsv(){
668
  const cols=['code','name','class_code','parent_code','confidence',...(S.scope.columns||[]).map(c=>c.code)];
@@ -752,6 +798,9 @@ window.addEventListener('hashchange', ()=>{
752
  }
753
  });
754
 
 
 
 
755
  (async()=>{ try{ await boot(); } catch(e){ document.getElementById('tree').innerHTML=`<div class="err">${esc(e.message)}</div>`; document.getElementById('slist').innerHTML=`<div class="err">${esc(e.message)}</div>`; } })();
756
  </script>
757
  </body>
 
98
  .sdetail .sq{border-left:3px solid var(--line2);padding-left:8px;margin:8px 0;font-style:italic;color:#334}
99
  .excerpt{color:var(--muted);font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
100
  .dom{font-size:11px;color:var(--muted)}
101
+
102
+ .mgallery{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 4px}
103
+ .mthumb{width:88px;height:66px;object-fit:cover;border-radius:6px;border:1px solid var(--line);cursor:pointer;background:#eef2f7}
104
+ .mthumb:hover{outline:2px solid var(--blue);outline-offset:1px}
105
+ .mlb{position:fixed;inset:0;background:rgba(15,23,42,.72);z-index:80;display:none;align-items:center;justify-content:center;padding:24px}
106
+ .mlb.on{display:flex}
107
+ .mlb-card{background:#fff;border-radius:10px;max-width:min(920px,96vw);max-height:92vh;overflow:auto;padding:12px 14px;box-shadow:0 20px 50px rgba(0,0,0,.35)}
108
+ .mlb-card img,.mlb-card video{max-width:100%;max-height:70vh;display:block;margin:0 auto;border-radius:6px}
109
+ .mlb-cap{margin-top:8px;font-size:13px;color:var(--navy);font-weight:650}
110
+ .mlb-credit{font-size:11.5px;color:var(--muted);margin-top:2px}
111
+ .mlb-x{float:right;border:0;background:#eef2f7;border-radius:6px;padding:2px 8px;cursor:pointer;font-weight:700;color:var(--muted)}
112
+
113
  @media(max-width:900px){.layout{grid-template-columns:1fr}.pane-b{max-height:none}}
114
  </style>
115
  </head>
 
179
  </div>
180
  <footer>InventoryAI · Obiekty + Historie · RPC explorer_*</footer>
181
  </div>
182
+ <div class="mlb" id="mlb" role="dialog" aria-modal="true">
183
+ <div class="mlb-card">
184
+ <button type="button" class="mlb-x" id="mlb-x">×</button>
185
+ <div id="mlb-body"></div>
186
+ <div class="mlb-cap" id="mlb-cap"></div>
187
+ <div class="mlb-credit" id="mlb-credit"></div>
188
+ </div>
189
+ </div>
190
  <script>
191
  const SUPABASE_URL='https://nqscnkbgnxwlrkaatwco.supabase.co';
192
  const SUPABASE_KEY='sb_publishable_LR0kGBTMr8YBr7EUCtE0Ng_1Y_0t1rL';
 
200
  {id:'modernizacja',label:'modernizacja'},
201
  {id:'ciekawostka',label:'ciekawostka'}
202
  ];
203
+ const ICON={ship:'⚓',building:'⌂',floor:'▭',room:'▢',rack:'▣',compartment:'▢',deck:'▭',port:'◦',switch:'⇄',router:'◈',cable:'∿',ups:'⚡',service:'★',boiler:'♨',turbine_set:'⟳',generator:'⚡',gun_mount:'✚',propeller:'✱',shaft_line:'─',sensor:'◉',fire_control:'◎',collection:'🖼',artwork:'🖼',artist:'✎',place:'⌖',fleet:'🚛',vehicle:'🚚',truck:'🚚',bus:'🚌',media:'▣'};
204
  const ic=c=>ICON[c]||'·';
205
  const badge=c=>`<span class="badge ${esc(c||'')}">${esc(CONF[c]||c||'—')}</span>`;
206
 
 
327
  }
328
 
329
  function renderChips(){
330
+ const domains=['','telco','maritime','energy','common','knowledge','culture','fleet'];
331
+ const labels={'':'wszystkie','telco':'telco','maritime':'morskie','energy':'energia','common':'wspólne','knowledge':'wiedza','culture':'kultura','fleet':'flota'};
332
  document.getElementById('chips').innerHTML=domains.map(d=>`<button type="button" class="chip ${S.domainFilter===d||(!S.domainFilter&&d==='')?'on':''}" data-d="${d}">${labels[d]}</button>`).join('');
333
  document.querySelectorAll('#chips .chip').forEach(c=>c.onclick=()=>{ S.domainFilter=c.dataset.d||null; if(S.domainFilter==='') S.domainFilter=null; renderChips(); const q=document.getElementById('search').value.trim(); if(q) runSearch(q); });
334
  }
 
440
  async function openTenantRoot(tid, preferId){
441
  S.tenant=tid; S.nodes.clear(); S.roots=[]; S.selected=null; S.detail=null; S.impact=null; S.hit=new Set(); S.stories=[];
442
  S.scope={classId:null, filterKey:'', filterVal:'', limit:50, offset:0, total:0, rows:[], view:'flat', columns:[]};
443
+ S.classes=(await rpc('explorer_classes',{p_tenant:tid})).filter(c=>!['story','source','media'].includes(c.code));
444
  const roots=await rpc('explorer_children',{p_tenant:tid,p_parent:null});
445
  S.roots=roots.map(n=>{ const x={...n, children:[], childrenLoaded:false, collapsed:false}; S.nodes.set(n.id,x); return x; });
446
  await refreshStoryCounts([...S.nodes.keys()]);
 
554
  <div class="crumb">${crumb||esc(o.code)}</div>
555
  <div class="dtitle">${ic(o.class_code)} ${esc(o.name)}</div>
556
  <div class="dsub"><span class="mono">${esc(o.code)}</span> · ${esc(o.class_name)} · ${badge(o.confidence)}</div>
557
+ ${renderMediaStrip(d.media||[])}
558
  <table class="t"><thead><tr><th>Parametr</th><th>Wartość</th><th>Jedn.</th><th>Pewność</th><th>Źródło</th></tr></thead>
559
  <tbody>${attrRows||'<tr><td colspan="5" class="muted">Brak atrybutów</td></tr>'}</tbody></table>
560
  <div class="rtabs">
 
683
  document.getElementById('st-scope')?.addEventListener('change', e=>syncScope(e.target.checked));
684
  document.getElementById('st-scope2')?.addEventListener('change', e=>syncScope(e.target.checked));
685
  document.getElementById('goto-slist')?.addEventListener('click', ()=>setView('stories'));
686
+
687
+ document.querySelectorAll('.mthumb[data-mi]').forEach(img=>{
688
+ img.onclick=()=>{ const m=(S.detail?.media||[])[+img.dataset.mi]; openLightbox(m); };
689
+ });
690
+ }
691
+
692
+
693
+ function renderMediaStrip(media){
694
+ if(!media||!media.length) return '';
695
+ return `<div class="mgallery">${media.map((m,i)=>{
696
+ const src=esc(m.thumbnail_url||m.url||'');
697
+ const isVid=(m.media_type==='video')||(m.mime_type||'').startsWith('video');
698
+ return `<img class="mthumb" data-mi="${i}" src="${src}" alt="${esc(m.caption||m.name||'')}" title="${esc(m.caption||'')}${isVid?' (wideo)':''}">`;
699
+ }).join('')}</div>`;
700
+ }
701
+ function openLightbox(m){
702
+ if(!m) return;
703
+ const body=document.getElementById('mlb-body');
704
+ const isVid=(m.media_type==='video')||(m.mime_type||'').startsWith('video');
705
+ if(isVid) body.innerHTML=`<video src="${esc(m.url)}" controls autoplay playsinline style="max-width:100%;max-height:70vh"></video>`;
706
+ else body.innerHTML=`<img src="${esc(m.url||m.thumbnail_url)}" alt="">`;
707
+ document.getElementById('mlb-cap').textContent=m.caption||m.name||'';
708
+ document.getElementById('mlb-credit').textContent=m.credit||'';
709
+ document.getElementById('mlb').classList.add('on');
710
  }
711
+ function closeLightbox(){ document.getElementById('mlb').classList.remove('on'); document.getElementById('mlb-body').innerHTML=''; }
712
 
713
  function exportCsv(){
714
  const cols=['code','name','class_code','parent_code','confidence',...(S.scope.columns||[]).map(c=>c.code)];
 
798
  }
799
  });
800
 
801
+ document.getElementById('mlb-x')?.addEventListener('click', closeLightbox);
802
+ document.getElementById('mlb')?.addEventListener('click', e=>{ if(e.target.id==='mlb') closeLightbox(); });
803
+ document.addEventListener('keydown', e=>{ if(e.key==='Escape') closeLightbox(); });
804
  (async()=>{ try{ await boot(); } catch(e){ document.getElementById('tree').innerHTML=`<div class="err">${esc(e.message)}</div>`; document.getElementById('slist').innerHTML=`<div class="err">${esc(e.message)}</div>`; } })();
805
  </script>
806
  </body>
media/pinakoteka/orda-boltupie.jpg ADDED

Git LFS Details

  • SHA256: 700f3b045050f2c369a49a87570288ab30477a8b8879f5f8358883a0de0ee8a1
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
media/pinakoteka/orda-druja.jpg ADDED
media/pinakoteka/orda-gojcieniszki.jpg ADDED
media/pinakoteka/orda-holszany.jpg ADDED

Git LFS Details

  • SHA256: bf3020ad3ed8e87171f81d65c91a4d731beee99b49b4df6ec9b754c0a1e58cba
  • Pointer size: 131 Bytes
  • Size of remote file: 113 kB
media/pinakoteka/orda-troki.jpg ADDED
media/pinakoteka/orda-werki.jpg ADDED

Git LFS Details

  • SHA256: 1df9247568ce009e52fd79c6da41405b43a55316102c6331af72b14728b8afc4
  • Pointer size: 131 Bytes
  • Size of remote file: 102 kB
media/pinakoteka/orda-wilno-benedyktynki.jpg ADDED
media/pinakoteka/orda-wilno-sw-anna.jpg ADDED

Git LFS Details

  • SHA256: 0a1fd00abf5635cfb7bd42246bb63323f14f9397b41355715457438d4a0f386e
  • Pointer size: 131 Bytes
  • Size of remote file: 106 kB
media/pinakoteka/orda-wilno-ul-krolewska.jpg ADDED
media/pinakoteka/orda-wilno-widok.jpg ADDED
media/pinakoteka/thumbs/orda-boltupie.jpg ADDED
media/pinakoteka/thumbs/orda-druja.jpg ADDED
media/pinakoteka/thumbs/orda-gojcieniszki.jpg ADDED
media/pinakoteka/thumbs/orda-holszany.jpg ADDED
media/pinakoteka/thumbs/orda-troki.jpg ADDED
media/pinakoteka/thumbs/orda-werki.jpg ADDED
media/pinakoteka/thumbs/orda-wilno-benedyktynki.jpg ADDED
media/pinakoteka/thumbs/orda-wilno-sw-anna.jpg ADDED
media/pinakoteka/thumbs/orda-wilno-ul-krolewska.jpg ADDED
media/pinakoteka/thumbs/orda-wilno-widok.jpg ADDED