summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkNotification.vue
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2023-09-11 14:31:50 +0900
committerGitHub <noreply@github.com>2023-09-11 14:31:50 +0900
commitcd6428715e6780d51e8f6edf93fe7e32bd8f937b (patch)
tree3a1ac5a3f7d01f4fa1fbcb29af7c5bd9df0d6581 /packages/frontend/src/components/MkNotification.vue
parentfix (diff)
downloadmisskey-cd6428715e6780d51e8f6edf93fe7e32bd8f937b.tar.gz
misskey-cd6428715e6780d51e8f6edf93fe7e32bd8f937b.tar.bz2
misskey-cd6428715e6780d51e8f6edf93fe7e32bd8f937b.zip
feat: テスト通知を送信できるようにする (#11810)
* (add) Notification test * Update Changelog * (add) backend, frontend impl * globalEventの名前を明確にする * Run API Extractor
Diffstat (limited to 'packages/frontend/src/components/MkNotification.vue')
-rw-r--r--packages/frontend/src/components/MkNotification.vue4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkNotification.vue b/packages/frontend/src/components/MkNotification.vue
index d46e8de553..ea2b6c1d4b 100644
--- a/packages/frontend/src/components/MkNotification.vue
+++ b/packages/frontend/src/components/MkNotification.vue
@@ -8,6 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="$style.head">
<MkAvatar v-if="notification.type === 'pollEnded'" :class="$style.icon" :user="notification.note.user" link preview/>
<MkAvatar v-else-if="notification.type === 'achievementEarned'" :class="$style.icon" :user="$i" link preview/>
+ <img v-else-if="notification.type === 'test'" :class="$style.icon" :src="infoImageUrl"/>
<MkAvatar v-else-if="notification.user" :class="$style.icon" :user="notification.user" link preview/>
<img v-else-if="notification.icon" :class="$style.icon" :src="notification.icon" alt=""/>
<div
@@ -47,6 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<header :class="$style.header">
<span v-if="notification.type === 'pollEnded'">{{ i18n.ts._notification.pollEnded }}</span>
<span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span>
+ <span v-else-if="notification.type === 'test'">{{ i18n.ts._notification.testNotification }}</span>
<MkA v-else-if="notification.user" v-user-preview="notification.user.id" :class="$style.headerName" :to="userPage(notification.user)"><MkUserName :user="notification.user"/></MkA>
<span v-else>{{ notification.header }}</span>
<MkTime v-if="withTime" :time="notification.createdAt" :class="$style.headerTime"/>
@@ -91,6 +93,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkButton :class="$style.followRequestCommandButton" rounded danger @click="rejectFollowRequest()"><i class="ti ti-x"/> {{ i18n.ts.reject }}</MkButton>
</div>
</template>
+ <span v-else-if="notification.type === 'test'" :class="$style.text">{{ i18n.ts._notification.notificationWillBeDisplayedLikeThis }}</span>
<span v-else-if="notification.type === 'app'" :class="$style.text">
<Mfm :text="notification.body" :nowrap="false"/>
</span>
@@ -113,6 +116,7 @@ import { i18n } from '@/i18n';
import * as os from '@/os';
import { useTooltip } from '@/scripts/use-tooltip';
import { $i } from '@/account';
+import { infoImageUrl } from '@/instance';
const props = withDefaults(defineProps<{
notification: Misskey.entities.Notification;