Rename digest keys Popular/HasPopular → Latest/HasLatest #7

Merged
matt merged 1 commit from mailship-hq0-rename-stale-digest-template-keys-popula-194 into main 2026-09-14 17:05:53 +00:00
3 changed files with 8 additions and 8 deletions
Showing only changes of commit e83cd1f7d2 - Show all commits

View file

@ -16,8 +16,8 @@ const sample = {
Duration: '24 hours',
Total: 12,
TopProfiles: 'bob, carol',
HasPopular: true,
Popular: [
HasLatest: true,
Latest: [
{
Link: 'https://app.flotilla.social/nevent1qqs...',
Timestamp: 'Aug 25, 2026 at 9:00 AM',

View file

@ -77,8 +77,8 @@ export class Digest {
return {
Total: events.length,
Duration: displayDuration(Math.floor(Date.now() / 1000) - this.since),
Popular: sorted.map((e) => getEventVariables(e)),
HasPopular: sorted.length > 0,
Latest: sorted.map((e) => getEventVariables(e)),
HasLatest: sorted.length > 0,
UserName: displayProfile(userProfile, this.sub.email.split('@')[0]),
TopProfiles: displayList(topProfiles.map(([pk]) => displayProfileByPubkey(pk))),
}

View file

@ -44,11 +44,11 @@
</mj-column>
</mj-section>
{{#HasPopular}}
{{#HasLatest}}
<mj-section background-color="#ffffff" padding="0 32px 24px 32px">
<mj-column>
<mj-text css-class="section-header">Latest Activity</mj-text>
{{#Popular}}
{{#Latest}}
<mj-text>
<div class="event-item">
<div class="event-meta">
@ -72,10 +72,10 @@
</div>
</div>
</mj-text>
{{/Popular}}
{{/Latest}}
</mj-column>
</mj-section>
{{/HasPopular}}
{{/HasLatest}}
<mj-section background-color="#ffffff" padding="0 32px 24px 32px">
<mj-column>