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',
|
Duration: '24 hours',
|
||||||
Total: 12,
|
Total: 12,
|
||||||
TopProfiles: 'bob, carol',
|
TopProfiles: 'bob, carol',
|
||||||
HasPopular: true,
|
HasLatest: true,
|
||||||
Popular: [
|
Latest: [
|
||||||
{
|
{
|
||||||
Link: 'https://app.flotilla.social/nevent1qqs...',
|
Link: 'https://app.flotilla.social/nevent1qqs...',
|
||||||
Timestamp: 'Aug 25, 2026 at 9:00 AM',
|
Timestamp: 'Aug 25, 2026 at 9:00 AM',
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@ export class Digest {
|
||||||
return {
|
return {
|
||||||
Total: events.length,
|
Total: events.length,
|
||||||
Duration: displayDuration(Math.floor(Date.now() / 1000) - this.since),
|
Duration: displayDuration(Math.floor(Date.now() / 1000) - this.since),
|
||||||
Popular: sorted.map((e) => getEventVariables(e)),
|
Latest: sorted.map((e) => getEventVariables(e)),
|
||||||
HasPopular: sorted.length > 0,
|
HasLatest: sorted.length > 0,
|
||||||
UserName: displayProfile(userProfile, this.sub.email.split('@')[0]),
|
UserName: displayProfile(userProfile, this.sub.email.split('@')[0]),
|
||||||
TopProfiles: displayList(topProfiles.map(([pk]) => displayProfileByPubkey(pk))),
|
TopProfiles: displayList(topProfiles.map(([pk]) => displayProfileByPubkey(pk))),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,11 @@
|
||||||
</mj-column>
|
</mj-column>
|
||||||
</mj-section>
|
</mj-section>
|
||||||
|
|
||||||
{{#HasPopular}}
|
{{#HasLatest}}
|
||||||
<mj-section background-color="#ffffff" padding="0 32px 24px 32px">
|
<mj-section background-color="#ffffff" padding="0 32px 24px 32px">
|
||||||
<mj-column>
|
<mj-column>
|
||||||
<mj-text css-class="section-header">Latest Activity</mj-text>
|
<mj-text css-class="section-header">Latest Activity</mj-text>
|
||||||
{{#Popular}}
|
{{#Latest}}
|
||||||
<mj-text>
|
<mj-text>
|
||||||
<div class="event-item">
|
<div class="event-item">
|
||||||
<div class="event-meta">
|
<div class="event-meta">
|
||||||
|
|
@ -72,10 +72,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mj-text>
|
</mj-text>
|
||||||
{{/Popular}}
|
{{/Latest}}
|
||||||
</mj-column>
|
</mj-column>
|
||||||
</mj-section>
|
</mj-section>
|
||||||
{{/HasPopular}}
|
{{/HasLatest}}
|
||||||
|
|
||||||
<mj-section background-color="#ffffff" padding="0 32px 24px 32px">
|
<mj-section background-color="#ffffff" padding="0 32px 24px 32px">
|
||||||
<mj-column>
|
<mj-column>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue