diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2018-12-19 21:20:25 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-12-19 21:20:25 +0900 |
| commit | c81a94ff7548f22b477ad74ef9abcf31133bcc52 (patch) | |
| tree | 4665847dcc6eec1941b812f873b23dfa8b0ca2e4 /src/client/app/common/scripts | |
| parent | Update remote Emoji (#3680) (diff) | |
| download | sharkey-c81a94ff7548f22b477ad74ef9abcf31133bcc52.tar.gz sharkey-c81a94ff7548f22b477ad74ef9abcf31133bcc52.tar.bz2 sharkey-c81a94ff7548f22b477ad74ef9abcf31133bcc52.zip | |
Resolve #3676 (#3677)
Diffstat (limited to 'src/client/app/common/scripts')
| -rw-r--r-- | src/client/app/common/scripts/compose-notification.ts | 10 | ||||
| -rw-r--r-- | src/client/app/common/scripts/format-uptime.ts | 2 | ||||
| -rw-r--r-- | src/client/app/common/scripts/get-md5.ts | 4 |
3 files changed, 8 insertions, 8 deletions
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 ''; }; |