summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2021-02-06 18:55:53 +0900
committerGitHub <noreply@github.com>2021-02-06 18:55:53 +0900
commit40bfa3ef0407f83484031bfe74dcecb149c202a0 (patch)
tree8128fa49e2041e00f6b130cb150f6571cf2a5ec7 /src/misc
parentResolve #7096 (diff)
downloadsharkey-40bfa3ef0407f83484031bfe74dcecb149c202a0.tar.gz
sharkey-40bfa3ef0407f83484031bfe74dcecb149c202a0.tar.bz2
sharkey-40bfa3ef0407f83484031bfe74dcecb149c202a0.zip
Resurrect Service Worker (#7108)
* Resolve #7106 * fix lint * fix lint * save lang in idb * fix lint * fix * cache locale file * fix lint * :v: * wip * fix [wip] * fix [wip] Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/get-notification-summary.ts29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/misc/get-notification-summary.ts b/src/misc/get-notification-summary.ts
deleted file mode 100644
index aade3f75be..0000000000
--- a/src/misc/get-notification-summary.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import getUserName from './get-user-name';
-import { getNoteSummary } from './get-note-summary';
-import getReactionEmoji from './get-reaction-emoji';
-import locales = require('../../locales');
-
-/**
- * 通知を表す文字列を取得します。
- * @param notification 通知
- */
-export default function(notification: any): string {
- switch (notification.type) {
- case 'follow':
- return `${getUserName(notification.user)}にフォローされました`;
- case 'mention':
- return `言及されました:\n${getUserName(notification.user)}「${getNoteSummary(notification.note, locales['ja-JP'])}」`;
- case 'reply':
- return `返信されました:\n${getUserName(notification.user)}「${getNoteSummary(notification.note, locales['ja-JP'])}」`;
- case 'renote':
- return `Renoteされました:\n${getUserName(notification.user)}「${getNoteSummary(notification.note, locales['ja-JP'])}」`;
- case 'quote':
- return `引用されました:\n${getUserName(notification.user)}「${getNoteSummary(notification.note, locales['ja-JP'])}」`;
- case 'reaction':
- return `リアクションされました:\n${getUserName(notification.user)} <${getReactionEmoji(notification.reaction)}>「${getNoteSummary(notification.note, locales['ja-JP'])}」`;
- case 'pollVote':
- return `投票されました:\n${getUserName(notification.user)}「${getNoteSummary(notification.note, locales['ja-JP'])}」`;
- default:
- return `<不明な通知タイプ: ${notification.type}>`;
- }
-}