Skip to content

Commit

Permalink
enhance: ダイアログのお知らせにも画像がある場合見せるように (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid authored Aug 22, 2023
1 parent e1218de commit 001f637
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/frontend/src/components/MkAnnouncementDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ SPDX-License-Identifier: AGPL-3.0-only
</span>
<Mfm :text="announcement.title"/>
</div>
<div :class="$style.content"><Mfm :text="announcement.text"/></div>
<div :class="$style.content">
<Mfm :text="announcement.text"/>
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
</div>
<MkButton :class="$style.gotIt" primary full :disabled="gotItDisabled" @click="gotIt">{{ i18n.ts.gotIt }}<span v-if="secVisible"> ({{ sec }})</span></MkButton>
</div>
</MkModal>
Expand Down Expand Up @@ -109,6 +112,7 @@ onMounted(() => {
}

.header {
font-weight: bold;
font-size: 120%;
}

Expand All @@ -118,5 +122,10 @@ onMounted(() => {

.content {
margin: 1em 0;
> img {
display: block;
max-height: 300px;
max-width: 100%;
}
}
</style>
3 changes: 2 additions & 1 deletion packages/frontend/src/pages/announcements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="$style.content">
<Mfm :text="announcement.text"/>
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
<div style="opacity: 0.7; font-size: 85%;">
<div style="margin-top: 8px; opacity: 0.7; font-size: 85%;">
<MkTime :time="announcement.updatedAt ?? announcement.createdAt" mode="detail"/>
</div>
</div>
Expand Down Expand Up @@ -137,6 +137,7 @@ watch(() => $i?.unreadAnnouncements.length ?? 0, () => {
.header {
margin-bottom: 16px;
font-weight: bold;
font-size: 120%;
}

.content {
Expand Down

0 comments on commit 001f637

Please sign in to comment.