Merge pull request 'Rename digest keys Popular/HasPopular → Latest/HasLatest' (#7) from mailship-hq0-rename-stale-digest-template-keys-popula-194 into main
Reviewed-on: #7 Reviewed-by: matt <matt@lorentz.is>
This commit is contained in:
commit
f3ccade029
3 changed files with 8 additions and 8 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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))),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue