Release v0.1.29: media previews, clean composer, regional profiles and cloud retention
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ class FamilyMap {
|
||||
const byId=new Map(data.people.map(p=>[p.id,p]));
|
||||
this.viewport.querySelectorAll('[data-map-person]').forEach(b=>{
|
||||
const p=byId.get(b.dataset.mapPerson),self=p.id===data.selfId,selected=p.id===data.focusId;
|
||||
const matched=data.term&&[p.name,p.alias,p.birthplace].join(' ').toLowerCase().includes(data.term);
|
||||
const matched=data.term&&personSearch(p).includes(data.term);
|
||||
const relation=p.id===data.reference&&!self?'参照人物':ZhaoKinship.describe(data.people,data.links,data.reference,p.id);
|
||||
b.classList.toggle('self',self);b.classList.toggle('selected',selected);b.classList.toggle('search-hit',!!matched);b.classList.toggle('archived',!!p.archived);
|
||||
b.setAttribute('aria-pressed',String(selected));b.setAttribute('aria-label',p.name+(self?',本人':'')+','+relation+',查看人物档案');
|
||||
|
||||
Reference in New Issue
Block a user