@javierfrancoleal/dsh-supervisor 1.0.45 → 1.0.46

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.
package/dashboard.html CHANGED
@@ -557,7 +557,7 @@ function buildLangMenu(){
557
557
  const r=document.createElement("div");
558
558
  r.className="orow"+(l==="en"?" center":"");
559
559
  r.innerHTML='<span>'+LANGNAMES[l]+'</span><span class="sub">'+l.toUpperCase()+'</span>';
560
- r.onclick=()=>{cur=l;try{localStorage.setItem("dsh-lang",cur);}catch(e){}applyLang();$("langOverlay").style.display="none";markReel();$("langStep").style.display="none";const sp=$("splash");sp.classList.remove("done");const p=sp.querySelector("svg path");if(p){p.style.animation="none";void p.offsetWidth;p.style.animation="";}const tag=$("splashTag");if(tag){tag.textContent=t("tagline");}setTimeout(()=>{$("loginView").style.display="";document.body.classList.remove("firstboot");},2100);setTimeout(()=>{sp.classList.add("done");},2600);};
560
+ r.onclick=()=>{cur=l;try{localStorage.setItem("dsh-lang",cur);}catch(e){}applyLang();$("langOverlay").style.display="none";markReel();$("langStep").style.display="none";bootFlash(2600,()=>{$("loginView").style.display="";document.body.classList.remove("firstboot");});};
561
561
  rows.appendChild(r);
562
562
  }
563
563
  }
@@ -587,6 +587,15 @@ $("langStepReel").onclick=()=>{$("langOverlay").style.display="flex";const en=do
587
587
  $("closeOverlay").onclick=()=>{$("langOverlay").style.display="none";};
588
588
  // The Apple flow: after the splash, the language menu opens once (until chosen).
589
589
 
590
+ function bootFlash(ms,then){
591
+ const sp=$("splash");
592
+ sp.style.display="flex";
593
+ sp.classList.remove("done");
594
+ const p=sp.querySelector("svg path");
595
+ if(p){p.style.animation="none";void p.offsetWidth;p.style.animation="";}
596
+ const tag=$("splashTag");if(tag){tag.textContent=t("tagline");}
597
+ setTimeout(()=>{sp.classList.add("done");if(then)then();},ms);
598
+ }
590
599
  function pill(l){for(const host of ["footLangs"]){const el=$(host);if(!el)continue;const b=document.createElement("button");b.className="pill";b.dataset.l=l;b.textContent=LANG[l];b.onclick=()=>{cur=l;try{localStorage.setItem("dsh-lang",cur);}catch(e){}applyLang();};$(host).appendChild(b);}}
591
600
  for(const l of Object.keys(LANG))pill(l);
592
601
  try{const q=new URLSearchParams(location.search);const ql=q.get("lang");if(ql&&S[ql])cur=ql;}catch(e){}
@@ -702,7 +711,7 @@ $("setupBtn").onclick=async()=>{
702
711
  if(r.error){$("setupBtn").disabled=false;$("setupBtn").textContent=t("setupBtn");toast(String(r.error).indexOf("already")>=0?t("loginFailed"):r.error);return;}
703
712
  token=r.token;me={name:r.name,role:r.role,label:r.label||r.name};
704
713
  sessionStorage.setItem("dsh-sup-token",token);sessionStorage.setItem("dsh-sup-me",JSON.stringify(me));
705
- enter();
714
+ bootFlash(1400,()=>enter());
706
715
  };
707
716
  $("loginBtn").onclick=async()=>{
708
717
  const err=$("loginError");
@@ -716,9 +725,9 @@ $("loginBtn").onclick=async()=>{
716
725
  err.classList.add("hidden");
717
726
  token=r.token;me={name:r.name,role:r.role,label:r.label||r.name};
718
727
  sessionStorage.setItem("dsh-sup-token",token);sessionStorage.setItem("dsh-sup-me",JSON.stringify(me));
719
- $("loginPass").value="";enter();
728
+ $("loginPass").value="";bootFlash(1400,()=>enter());
720
729
  };
721
- function logout(){api("/api/logout",{});token=null;me=null;sessionStorage.clear();if(livePoll)clearInterval(livePoll);if(kitchenPoll)clearInterval(kitchenPoll);setWho();show("loginView");}
730
+ function logout(){api("/api/logout",{});token=null;me=null;sessionStorage.clear();if(livePoll)clearInterval(livePoll);if(kitchenPoll)clearInterval(kitchenPoll);setWho();bootFlash(1200,()=>show("loginView"));}
722
731
  $("logoutBtn").onclick=logout;
723
732
  const sb=$("switchBtn");if(sb)sb.onclick=logout;
724
733
  async function loadUsers(){const tb=$("usersTable").querySelector("tbody");tb.innerHTML='<tr><td colspan="2">'+skel(2)+'</td></tr>';const r=await api("/api/users");tb.innerHTML="";(r.users||[]).forEach(u=>{const tr=document.createElement("tr");tr.innerHTML="<td>"+esc(u.name)+"</td><td>"+esc(u.label||u.name)+" · "+t(LVL[u.role]||"lvlEmployee")+"</td>";tb.appendChild(tr);});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@javierfrancoleal/dsh-supervisor",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
4
  "description": "The Veilleux central control plane of the J.Franco agentic workflow suite: user accounts, the live conversation flow (listen → per-person summary → confirm → orders), telemetry, and the universal sector dashboard with 10 languages. Created by J.Franco.",
5
5
  "author": "J.Franco",
6
6
  "license": "MIT",
package/server.js CHANGED
@@ -44,7 +44,7 @@ const LIVE_FILE = path.join(DATA_DIR, "live.json");
44
44
  const SECTOR_FILE = path.join(DATA_DIR, "sector.json");
45
45
  const REG_FILE = path.join(DATA_DIR, "register.json");
46
46
  const PRICE_PER_MILLION = Number(process.env.DSH_PRICE_PER_MILLION || 0.28);
47
- const VERSION = "1.0.44";
47
+ const VERSION = "1.0.46";
48
48
  // Homeostasis: the daily token budget (metabolic limit). The brain rests
49
49
  // when the budget is spent — no runaway costs.
50
50
  const DAILY_BUDGET_USD = Number(process.env.DSH_DAILY_BUDGET_USD || 0); // 0 = unlimited: consumption is the business