From c81a94ff7548f22b477ad74ef9abcf31133bcc52 Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Wed, 19 Dec 2018 21:20:25 +0900 Subject: Resolve #3676 (#3677) --- src/client/app/common/scripts/compose-notification.ts | 10 +++++----- src/client/app/common/scripts/format-uptime.ts | 2 +- src/client/app/common/scripts/get-md5.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/client/app/common/scripts') diff --git a/src/client/app/common/scripts/compose-notification.ts b/src/client/app/common/scripts/compose-notification.ts index 65087cc98e..f65672ee30 100644 --- a/src/client/app/common/scripts/compose-notification.ts +++ b/src/client/app/common/scripts/compose-notification.ts @@ -22,7 +22,7 @@ export default function(type, data): Notification { case 'unreadMessagingMessage': return { - title: '%i18n:common.notification.message-from%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.message-from%'.split("{}")[1] , + title: '%i18n:common.notification.message-from%'.split('{}')[0] + `${getUserName(data.user)}` + '%i18n:common.notification.message-from%'.split('{}')[1] , body: data.text, // TODO: getMessagingMessageSummary(data), icon: data.user.avatarUrl }; @@ -30,7 +30,7 @@ export default function(type, data): Notification { case 'reversiInvited': return { title: '%i18n:common.notification.reversi-invited%', - body: '%i18n:common.notification.reversi-invited-by%'.split("{}")[0] + `${getUserName(data.parent)}` + '%i18n:common.notification.reversi-invited-by%'.split("{}")[1], + body: '%i18n:common.notification.reversi-invited-by%'.split('{}')[0] + `${getUserName(data.parent)}` + '%i18n:common.notification.reversi-invited-by%'.split('{}')[1], icon: data.parent.avatarUrl }; @@ -38,21 +38,21 @@ export default function(type, data): Notification { switch (data.type) { case 'mention': return { - title: '%i18n:common.notification.notified-by%'.split("{}")[0] + `${getUserName(data.user)}:` + '%i18n:common.notification.notified-by%'.split("{}")[1], + title: '%i18n:common.notification.notified-by%'.split('{}')[0] + `${getUserName(data.user)}:` + '%i18n:common.notification.notified-by%'.split('{}')[1], body: getNoteSummary(data), icon: data.user.avatarUrl }; case 'reply': return { - title: '%i18n:common.notification.reply-from%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.reply-from%'.split("{}")[1], + title: '%i18n:common.notification.reply-from%'.split('{}')[0] + `${getUserName(data.user)}` + '%i18n:common.notification.reply-from%'.split('{}')[1], body: getNoteSummary(data), icon: data.user.avatarUrl }; case 'quote': return { - title: '%i18n:common.notification.quoted-by%'.split("{}")[0] + `${getUserName(data.user)}` + '%i18n:common.notification.quoted-by%'.split("{}")[1], + title: '%i18n:common.notification.quoted-by%'.split('{}')[0] + `${getUserName(data.user)}` + '%i18n:common.notification.quoted-by%'.split('{}')[1], body: getNoteSummary(data), icon: data.user.avatarUrl }; diff --git a/src/client/app/common/scripts/format-uptime.ts b/src/client/app/common/scripts/format-uptime.ts index 6a2718f640..6550e4cc39 100644 --- a/src/client/app/common/scripts/format-uptime.ts +++ b/src/client/app/common/scripts/format-uptime.ts @@ -15,7 +15,7 @@ export default function(sec) { const t = tod < 60 ? `${Math.floor(tod)} sec` : tod < 3600 ? `${Math.floor(tod / 60)} min` - : `${Math.floor(tod / 60 / 60)}:${Math.floor((tod / 60) % 60).toString().padStart(2, "0")}`; + : `${Math.floor(tod / 60 / 60)}:${Math.floor((tod / 60) % 60).toString().padStart(2, '0')}`; let str = ''; if (d) str += `${d}, `; diff --git a/src/client/app/common/scripts/get-md5.ts b/src/client/app/common/scripts/get-md5.ts index 51a45b30d5..b78a598118 100644 --- a/src/client/app/common/scripts/get-md5.ts +++ b/src/client/app/common/scripts/get-md5.ts @@ -3,8 +3,8 @@ export default (data: ArrayBuffer) => { //const buf = new Buffer(data); - //const hash = crypto.createHash("md5"); + //const hash = crypto.createHash('md5'); //hash.update(buf); - //return hash.digest("hex"); + //return hash.digest('hex'); return ''; }; -- cgit v1.2.3-freya