feat: Timestamps on announcements

Closes #10453
This commit is contained in:
ThatOneCalculator 2023-07-09 20:46:53 -07:00
parent ba4e96ee1e
commit a5f84ec30b
No known key found for this signature in database
GPG key ID: 8703CACD01000000
2 changed files with 22 additions and 2 deletions

View file

@ -5,6 +5,13 @@
<MkSparkle v-if="isGoodNews">{{ title }}</MkSparkle>
<p v-else>{{ title }}</p>
</div>
<div :class="$style.time">
<MkTime :time="announcement.createdAt" />
<div v-if="announcement.updatedAt">
{{ i18n.ts.updatedAt }}:
<MkTime :time="announcement.createdAt" />
</div>
</div>
<Mfm :text="text" />
<img
v-if="imageUrl != null"
@ -68,6 +75,10 @@ const gotIt = () => {
}
}
.time {
font-size: 0.8rem;
}
.gotIt {
margin: 8px 0 0 0;
}

View file

@ -15,8 +15,13 @@
class="_card announcement"
>
<div class="_title">
<span v-if="$i && !announcement.isRead">🆕 </span
>{{ announcement.title }}
<span v-if="$i && !announcement.isRead">🆕 </span>
<h3>{{ announcement.title }}</h3>
<MkTime :time="announcement.createdAt" />
<div v-if="announcement.updatedAt">
{{ i18n.ts.updatedAt }}:
<MkTime :time="announcement.createdAt" />
</div>
</div>
<div class="_content">
<Mfm :text="announcement.text" />
@ -76,6 +81,10 @@ definePageMetadata({
margin-bottom: var(--margin);
}
> ._title {
padding: 14px 32px !important;
}
> ._content {
> img {
display: block;