The China licence follows quick lead times: about 5 days instead of 45

Change Freeze and Sandbox deliver everything in a tenth of the time, but the licence
still took 45 days and the button said so. It now waits leadDays(45), and the button
shows that number.
This commit is contained in:
Frederic Jung 2026-10-29 07:04:45 +01:00
parent 1692217549
commit 4bb5e07c28
No known key found for this signature in database
9 changed files with 19 additions and 8 deletions

View file

@ -1,5 +1,5 @@
Object.assign(ACT,{
applyCn:()=>{if(S.cnLic.state!=='none')return;if(!spend(CN_LIC))return;S.cnLic={state:'pending',ready:S.day+45};toast(tr('security_and_china.application_filed_your_local_partner'),'goal');after();},
applyCn:()=>{if(S.cnLic.state!=='none')return;if(!spend(CN_LIC))return;S.cnLic={state:'pending',ready:S.day+leadDays(45)};toast(tr('security_and_china.application_filed_your_local_partner'),'goal');after();},
togglePrem:({id})=>{const t=S.transit.find(x=>x.id===id);if(!t||!premCity(NET[t.net],t.city)||premOnlyAt(NET[t.net],t.city))return;t.premium=!t.premium;sfx('click');after();},
buildScrub:({city,tier})=>{if(!S.pops[city]||S.scrubs.some(x=>x.city===city))return;const T=SCRUB_TIERS[tier||0];if(!T)return;if((lvl()||1)<T.lvl){toast(tr('security_and_china.tier_scrubbing_unlocks_at_customer',{tier:T.n,lv:T.lvl}),'bad');sfx('err');return;}if(!spend(T.cost))return;if(!hasScrub())S.scrubMode='always';S.scrubs.push({city,tier:tier||0});toast(tr('security_and_china.tier_scrubbing_center_online_in_city',{tier:T.n,city:CITY[city].name,g:fmtG(T.g)}),'good');after();},
scrubUp:({city,tier})=>{const x=S.scrubs.find(q=>q.city===city);tier=+tier;if(!x||!SCRUB_TIERS[tier]||tier<=(x.tier||0))return;const T=SCRUB_TIERS[tier];if((lvl()||1)<T.lvl){toast(tr('security_and_china.tier_scrubbing_unlocks_at_customer',{tier:T.n,lv:T.lvl}),'bad');sfx('err');return;}if(!spend(Math.round(T.cost*0.6)))return;x.tier=tier;toast(tr('security_and_china.scrubbing_upgraded_to_tier',{tier:T.n}),'good');after();},

View file

@ -83,7 +83,7 @@ function metricSection(l){const key=edgeKey(l),cur=pairMet(key),pl=pairLinks(l.a
return h+`</section>`;}
function chinaSection(c){const st=S.cnLic?S.cnLic.state:'none',loss=S.ev.gfw>S.day?0.35:0.2;
let h=`<section><h3>${tr('link_panels.behind_the_great_firewall')}</h3><p class="lead">${tr('link_panels.mainland_china_plays_by_its_own',{list:CN_BLOCKED.slice(0,4).map(esc).join(', '),pct:pct(loss)})}</p>`;
if(st==='none')h+=`<p class="lead">${tr('link_panels.foreign_networks_need_a_local_joint')}</p>${btn(tr('link_panels.apply_for_a_license_price_mo',{price:fmt$(CN_LIC),mo:fmt$(CN_JV_MO)}),'applyCn',{},'pink',S.cash<CN_LIC)}`;
if(st==='none')h+=`<p class="lead">${tr('link_panels.foreign_networks_need_a_local_joint')}</p>${btn(tr('link_panels.apply_for_a_license_price_mo_n_days',{price:fmt$(CN_LIC),mo:fmt$(CN_JV_MO),n:leadDays(45)}),'applyCn',{},'pink',S.cash<CN_LIC)}`;
else if(st==='pending')h+=`<p class="note">${tr('link_panels.license_paperwork_in_progress_n_days',{n:Math.max(0,S.cnLic.ready-S.day)})}</p>`;
else h+=`<p class="note">${tr('link_panels.your_joint_venture_holds_an')}</p>`;
if(R.gfwCross>0.5)h+=`<div class="kv"><span>${tr('link_panels.your_traffic_crossing_the_border')}</span><b>${fmtG(R.gfwCross)}</b></div><div class="kv"><span>${tr('link_panels.lost_on_the_way')}</span><b style="color:var(--bad)">${fmtG(R.gfwLost)}</b></div>`;

View file

@ -2127,7 +2127,7 @@
"link_panels.add_parallel_link":"Add parallel link",
"link_panels.additional_traffic_lost":"Additional traffic lost",
"link_panels.an_alternate_path_exists_but_current":"An alternate path exists, but current routing and capacity deliver less traffic.",
"link_panels.apply_for_a_license_price_mo":"Apply for a license <small>{price} + {mo}/mo · ~45 days</small>",
"link_panels.apply_for_a_license_price_mo_n_days":"Apply for a license <small>{price} + {mo}/mo · ~{n} days</small>",
"link_panels.back_in_n_days":"Back in {n} days.",
"link_panels.behind_the_great_firewall":"Behind the Great Firewall",
"link_panels.biggest_fabric_money_can_buy":"Biggest fabric money can buy.",