整体UI修改

This commit is contained in:
谢宇宁
2026-10-27 17:39:27 +07:00
parent 8cdbfee08f
commit e289658a28
99 changed files with 1227 additions and 4118 deletions
+2 -2
View File
@@ -45,9 +45,9 @@ test('cache bounds and endpoint policies keep private data and indefinite growth
assert.equal(publicCachePolicy('config/info','0').ttl,0);assert.equal(publicCachePolicy('playlet/home','999999').ttl,30000);
});
test('shared browser snapshot contains visible configuration and footer fields without SDK or unknown secrets',()=>{
test('shared browser snapshot contains visible configuration and footer fields without unknown secrets',()=>{
const data=publicSiteData({reportSdkConfig:'private-sdk-cipher',token:'private-token',config:{officialAppAddr:'https://app.test/download',telegram:'https://t.me/business',apiKey:'private-api-key'},advitise:{dialogList:[{id:'a',title:'广告',images:'https://ad.test/image',link:'https://ad.test',token:'private-ad-token'}],unknown:[{secret:'private-slot'}]}},{footerInfo:{brand:{content:'真实页脚'},contactList:[{name:'服务时间',value:'每天',token:'private-contact-token'}]}});
const text=JSON.stringify(data);for(const secret of ['private-sdk-cipher','private-token','private-api-key','private-ad-token','private-slot','private-contact-token'])assert.ok(!text.includes(secret));
assert.equal(data.trackerConfigured,true);assert.equal(data.config.config.officialAppAddr,'https://app.test/download');assert.equal(data.footer.footerInfo.brand.content,'真实页脚');
assert.ok(!('trackerConfigured' in data));assert.equal(data.config.config.officialAppAddr,'https://app.test/download');assert.equal(data.footer.footerInfo.brand.content,'真实页脚');
assert.doesNotThrow(()=>publicSiteData({config:null,advitise:null},{footerInfo:null}));
});