Skip to content

Commit

Permalink
Merge pull request #62 from atsu1125/fixannouncements
Browse files Browse the repository at this point in the history
お知らせの表示を改善
  • Loading branch information
atsu1125 authored Feb 25, 2023
2 parents 5305a40 + 1878679 commit b746e99
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ showVoteConfirm: "Show confirmation dialog before voting"
voteConfirm: "Are you sure that you want to vote?"
deleteAccount: "Delete Account"
deleteAccountConfirm: "Are you sure that you want to delete this account?"
createdAt: "Created at"

_template:
edit: "Edit Template..."
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ showVoteConfirm: "投票する前に確認ダイアログを表示する"
voteConfirm: "投票しますか?"
deleteAccount: "アカウント削除"
deleteAccountConfirm: "本当にこのアカウントを削除しますか?"
createdAt: "作成日時"

_template:
edit: "定型文を編集…"
Expand Down
9 changes: 8 additions & 1 deletion src/client/components/announcements-window.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
<mfm :text="currentAnnouncement.text" :once="false"/>
<img v-if="currentAnnouncement.imageUrl" :src="currentAnnouncement.imageUrl"/>
</div>
<div class="time"><MkTime :time="currentAnnouncement.createdAt" mode="detail"/></div>
<div class="footer">
<div>{{ $ts.createdAt }}: <MkTime :time="currentAnnouncement.createdAt" mode="detail"/></div>
</div>
</div>
<template #footer>
<div class="navigation">
Expand Down Expand Up @@ -116,6 +118,11 @@ export default defineComponent({
margin-bottom: 1em;
font-size: 1em;
}
> .footer {
margin: var(--margin) 0 var(--margin) 0;
font-size: 85%;
opacity: 0.75;
}
}
.navigation {
> button.arrow {
Expand Down
8 changes: 8 additions & 0 deletions src/client/pages/announcements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<Mfm :text="announcement.text" :once="false"/>
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
</div>
<div class="footer">
<div>{{ $ts.createdAt }}: <MkTime :time="announcement.createdAt" mode="detail"/></div>
</div>
<div class="_footer" v-if="$i && !announcement.isRead">
<MkButton @click="read(items, announcement, i)" primary><Fa :icon="faCheck"/> {{ $ts.gotIt }}</MkButton>
</div>
Expand Down Expand Up @@ -65,6 +68,11 @@ export default defineComponent({
max-width: 100%;
}
}
> .footer {
margin: var(--margin) 0 var(--margin) 0;
font-size: 85%;
opacity: 0.75;
}
}
}
</style>
2 changes: 2 additions & 0 deletions src/client/ui/visitor/b.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
<transition name="tray">
<div v-if="showMenu" class="menu">
<MkA to="/" class="link" active-class="active"><Fa :icon="faHome" class="icon"/>{{ $ts.home }}</MkA>
<MkA to="/announcements" class="link" active-class="active"><Fa :icon="faBroadcastTower" class="icon"/>{{ $ts.announcements }}</MkA>
<MkA to="/explore" class="link" active-class="active"><Fa :icon="faHashtag" class="icon"/>{{ $ts.explore }}</MkA>
<MkA to="/featured" class="link" active-class="active"><Fa :icon="faFireAlt" class="icon"/>{{ $ts.featured }}</MkA>
<MkA to="/channels" class="link" active-class="active"><Fa :icon="faSatelliteDish" class="icon"/>{{ $ts.channel }}</MkA>
<div class="action">
<button class="_buttonPrimary" @click="signup()">{{ $ts.signup }}</button>
Expand Down
5 changes: 3 additions & 2 deletions src/client/ui/visitor/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div class="wide" v-if="narrow === false">
<div class="content">
<MkA to="/" class="link" active-class="active"><Fa :icon="faHome" class="icon"/>{{ $ts.home }}</MkA>
<MkA to="/announcements" class="link" active-class="active"><Fa :icon="faBroadcastTower" class="icon"/>{{ $ts.announcements }}</MkA>
<MkA to="/explore" class="link" active-class="active"><Fa :icon="faHashtag" class="icon"/>{{ $ts.explore }}</MkA>
<MkA to="/featured" class="link" active-class="active"><Fa :icon="faFireAlt" class="icon"/>{{ $ts.featured }}</MkA>
<MkA to="/channels" class="link" active-class="active"><Fa :icon="faSatelliteDish" class="icon"/>{{ $ts.channel }}</MkA>
Expand Down Expand Up @@ -41,7 +42,7 @@

<script lang="ts">
import { defineComponent } from 'vue';
import { faSearch, faHome, faFireAlt, faHashtag, faSatelliteDish, faBars } from '@fortawesome/free-solid-svg-icons';
import { faSearch, faHome, faFireAlt, faHashtag, faSatelliteDish, faBars, faBroadcastTower } from '@fortawesome/free-solid-svg-icons';
import XSigninDialog from '@/components/signin-dialog.vue';
import XSignupDialog from '@/components/signup-dialog.vue';
import * as os from '@/os';
Expand All @@ -58,7 +59,7 @@ export default defineComponent({
return {
narrow: null,
showMenu: false,
faSearch, faHome, faFireAlt, faHashtag, faSatelliteDish, faBars,
faSearch, faHome, faFireAlt, faHashtag, faSatelliteDish, faBars, faBroadcastTower,
};
},
Expand Down
10 changes: 9 additions & 1 deletion src/client/ui/visitor/kanban.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<Mfm :text="announcement.text"/>
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
</div>
<div class="footer">
<div>{{ $ts.createdAt }}: <MkTime :time="announcement.createdAt" mode="detail"/></div>
</div>
</section>
</MkPagination>
</div>
Expand Down Expand Up @@ -189,7 +192,7 @@ export default defineComponent({
box-sizing: border-box;
text-shadow: 0 0 8px black;
color: #fff;
> .signup-disabled {
color: var(--infoWarnFg);
border: 2px dashed var(--infoWarnBg);
Expand Down Expand Up @@ -255,6 +258,11 @@ export default defineComponent({
}
}
}
> .footer {
margin: var(--margin) 0 var(--margin) 0;
font-size: 85%;
opacity: 0.75;
}
}
> .powered-by {
Expand Down

0 comments on commit b746e99

Please sign in to comment.