Review fixes for Starblink, Island Wi-Fi and late joiners
Some checks failed
CI / plan (push) Has been cancelled
CI / build (push) Has been cancelled
CI / translations (push) Has been cancelled
Container image / gate (push) Has been cancelled
CI / part (push) Has been cancelled
CI / test (push) Has been cancelled
CI / timings (push) Has been cancelled
Container image / test (push) Has been cancelled
Container image / publish (push) Has been cancelled
Some checks failed
CI / plan (push) Has been cancelled
CI / build (push) Has been cancelled
CI / translations (push) Has been cancelled
Container image / gate (push) Has been cancelled
CI / part (push) Has been cancelled
CI / test (push) Has been cancelled
CI / timings (push) Has been cancelled
Container image / test (push) Has been cancelled
Container image / publish (push) Has been cancelled
- Until a zone's first circuit or spur is up, its row and panel say when the islands come online instead of homes out of 0 and a red 0% served (wisp-commissioning-homes-of-zero). - Once your own constellation flies, a zone's Starblink row points to GEO, MEO or a spur (wisp.leo_no_rivals), never to a pie dish (zone-leo-pie-dish-advice). - The late joiner's welcome and bank note say the match is on home broadband, not island Wi-Fi, in all six languages (late-match-island-homes). - A gateway's section shows its city's transit ports (Transit out of the city) and warns when they fill; the fiber row only where there is fiber (leo-backhaul-transit-only). - Spurs are subsea cable, no longer unrepeatered, in every language and the catalog comment (spur-unrepeatered-1400km). - French calls a spur a câble de dérivation, not a câble d'antenne (fr-spur-cable-antenna).
This commit is contained in:
parent
5ca8270db9
commit
41e6fd78ef
14 changed files with 178 additions and 50 deletions
|
|
@ -7,19 +7,23 @@ function wispNoPop(c){if(!wispOn()||S.pops[c])return '';const zs=wispAt(c);if(!z
|
|||
// A zone's status: what carries it today, or why nothing does.
|
||||
function wispStatus(z,Z){if(!Z)return {t:tr('wisp.st_none'),k:'st'};if(wispLit(Z))return wispCut(z)?{t:tr('wisp.st_cut'),k:'restrictive'}:{t:tr('wisp.st_spur'),k:'open'};
|
||||
const o=Z.sat;if(o&&!(o.ready>S.day))return {t:SAT_ORB[wispOrb(o)].n,k:''};return o||Z.sp?{t:tr('wisp.st_soon'),k:'st'}:{t:tr('wisp.st_none'),k:'st'};}
|
||||
// In a POP's Customers tab, after Home broadband: one row per zone, one of them open at a time (UI.wz).
|
||||
// Days until the first of a zone's circuits or spur being commissioned comes up; 0 for none.
|
||||
const wispSoon=Z=>[Z.sat,Z.nxt,Z.sp].reduce((m,o)=>o&&o.ready>S.day&&(!m||o.ready-S.day<m)?o.ready-S.day:m,0);
|
||||
// In a POP's Customers tab, after Home broadband: one row per zone, one of them open at a time (UI.wz). Until something
|
||||
// reaches the islands nobody is online: the row says when they will be, not a red 0% served.
|
||||
function wispHtml(c){if(!wispOn()||!S.pops[c])return '';const zs=wispAt(c);if(!zs.length)return '';
|
||||
return `<section><h3>🏝️ ${tr('wisp.section')}</h3><p class="lead">${tr('wisp.lead',{rate:fmt$(wispRate(zs[0]))})}</p>${zs.map(wispRow).join('')}</section>`;}
|
||||
function wispRow(z){const W=WISP[z],Z=wispZ(z),r=R.wisp&&R.wisp[z],P=wispPool(z),st=wispStatus(z,Z),open=UI.wz===z,d=Z?Z.d:0,sf=r?r.sf:0;
|
||||
let h=`<div class="row"><div class="grow"><div class="nm">${esc(W.n)} <span class="tag ${st.k}">${st.t}</span></div><div class="meta">${tr('wisp.pool',{g:fmtG(P)})}${Z?' · '+tr('pie_gov.served',{p:pct(sf)}):''}</div>${Z?`<div class="bar me"><i style="width:${Math.min(100,d/P*100)}%"></i></div>`:''}</div>${btn(open?tr('common.close'):tr('common.open'),'wispOpen',{z},'ghost sm')}</div>`;
|
||||
function wispRow(z){const W=WISP[z],Z=wispZ(z),r=R.wisp&&R.wisp[z],P=wispPool(z),st=wispStatus(z,Z),open=UI.wz===z,d=Z?Z.d:0,sf=r?r.sf:0,on=!!Z&&wispTake(Z)>0,n=Z&&!on?wispSoon(Z):0;
|
||||
let h=`<div class="row"><div class="grow"><div class="nm">${esc(W.n)} <span class="tag ${st.k}">${st.t}</span></div><div class="meta">${tr('wisp.pool',{g:fmtG(P)})}${on?' · '+tr('pie_gov.served',{p:pct(sf)}):n?' · '+tr('city_panel.ready_in_n_d',{n}):''}</div>${on?`<div class="bar me"><i style="width:${Math.min(100,d/P*100)}%"></i></div>`:''}</div>${btn(open?tr('common.close'):tr('common.open'),'wispOpen',{z},'ghost sm')}</div>`;
|
||||
return open?h+wispOpenHtml(z,Z,r):h;}
|
||||
// The open zone: its homes and money, its backhaul (the circuit, the birds to order on), the spur, closing it.
|
||||
// The open zone: its homes and money (once something reaches them; until then, the day it will), its backhaul (the
|
||||
// circuit, the birds to order on), the spur, closing it. A cut spur or a solar storm is an outage: that one shows in red.
|
||||
function wispOpenHtml(z,Z,r){const K=Z?wispK(z,Z):0,k=Z?wispLink(z,Z):null;let h='';
|
||||
if(Z){const sf=r?r.sf:0,cl=sf<0.9?'var(--tx-red,var(--bad))':'var(--eye)';
|
||||
h+=`<div class="kv"><span>${tr('wisp.homes_online')}</span><b>${tr('city_panel.a_of_b',{a:fmtG(Z.d),b:fmtG(K)})}</b></div>
|
||||
if(Z){const sf=r?r.sf:0,cl=sf<0.9?'var(--tx-red,var(--bad))':'var(--eye)',n=K>0?0:wispSoon(Z);
|
||||
h+=K>0?`<div class="kv"><span>${tr('wisp.homes_online')}</span><b>${tr('city_panel.a_of_b',{a:fmtG(Z.d),b:fmtG(K)})}</b></div>
|
||||
<div class="kv"><span>${tr('wisp.served')}</span><b style="color:${cl}">${pct(sf)}</b></div>
|
||||
<div class="kv"><span>${tr('common.revenue')}</span><b>${tr('common.price_mo',{price:fmt$(r?r.d*r.sf*wispRate(z):0)})}</b></div>
|
||||
<div class="kv"><span>${tr('wisp.upkeep')}</span><b>${tr('common.price_mo',{price:fmt$(wispUpMo(z)+(wispLit(Z)?wispSpurMo(z):0))})}</b></div>
|
||||
<div class="kv"><span>${tr('common.revenue')}</span><b>${tr('common.price_mo',{price:fmt$(r?r.d*r.sf*wispRate(z):0)})}</b></div>`:n?`<p class="note">${trn('wisp.online_in_n_days',n)}</p>`:'';
|
||||
h+=`<div class="kv"><span>${tr('wisp.upkeep')}</span><b>${tr('common.price_mo',{price:fmt$(wispUpMo(z)+(wispLit(Z)?wispSpurMo(z):0))})}</b></div>
|
||||
${k&&r&&r.d>=k.g*0.98?`<p class="why">${tr('wisp.full')}</p>`:''}`;}
|
||||
h+=`<p class="note">${tr('wisp.take',{geo:pct(SAT_ORB.geo.wisp),meo:pct(SAT_ORB.meo.wisp),leo:pct(SAT_ORB.leo.wisp)})}</p>${ip4On()?`<p class="note">${tr('wisp.ipv6')}</p>`:''}`;
|
||||
return `<div class="wisp">${h}${wispBackhaul(z,Z,k)}${wispSpurHtml(z,Z)}${Z?`<div class="btns">${btn(UI.confirm==='wz:'+z?tr('satellites.really_close_it'):tr('wisp.close'),'wispRm',{z},'ghost sm')}</div>`:''}</div>`;}
|
||||
|
|
@ -38,8 +42,8 @@ function wispBackhaul(z,Z,k){const W=WISP[z],c=W.c,C=CITY[c].name,t=teleOf(c);
|
|||
const kit=Z?0:wispKit(z);
|
||||
for(const id of wispBirds(z)){if(o&&o.bird===id)continue;const B=SATS[id],O=SAT_ORB[B.orb],P=SAT_PROV[B.p];if(lvl()<O.lv)continue;
|
||||
// The teleport's own upgrade, where the bird needs one: tracking antennas for MEO, a Starblink gateway for LEO (and why
|
||||
// that cannot go up, when it cannot).
|
||||
const trk=B.orb==='meo'&&t<2,gw=B.orb==='leo'&&!leoGw(c),why=(trk?trkWhy(c):gw?leoGwWhy(c):'')||wispSatWhy(z,id);
|
||||
// that cannot go up, when it cannot). None once your own constellation flies: wispSatWhy says what the islands have left.
|
||||
const trk=B.orb==='meo'&&t<2,gw=B.orb==='leo'&&!leoGw(c)&&!leoRival(),why=(trk?trkWhy(c):gw?leoGwWhy(c):'')||wispSatWhy(z,id);
|
||||
const up=trk?btn(tr('satellites.add_tracking_antennas_cost_mo',{cost:fmt$(TRK_COST),mo:fmt$(TRK_MO)}),'teleTrk',{city:c},'sm',S.cash<TRK_COST||!!trkWhy(c))
|
||||
:gw?btn(tr('satellites.host_leo_gateway_cost_mo',{cost:fmt$(LEO_GW_COST),mo:fmt$(LEO_GW_MO)}),'teleLeo',{city:c},'sm',S.cash<LEO_GW_COST||!!leoGwWhy(c)):'';
|
||||
h+=`<div class="row">${satLogo(P)}<div class="grow"><div class="nm">${esc(B.n)} <span class="tag">${O.n}</span></div><div class="meta">${esc(P.n)} · ${tr('satellites.ms_round_trip',{ms:Math.round(2*wispMs(z,id))})} · ${trn('satellites.up_in_n_days',leadDays(O.days))}</div>${why?`<div class="why">${esc(why)}</div>`:''}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue