From c81a94ff7548f22b477ad74ef9abcf31133bcc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Wed, 19 Dec 2018 21:20:25 +0900 Subject: [PATCH] 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 ++-- src/client/app/v.d.ts | 2 +- src/games/reversi/core.ts | 2 +- src/mfm/syntax-highlight.ts | 2 +- src/misc/fetch-meta.ts | 2 +- src/prelude/string.ts | 2 +- src/remote/activitypub/models/tag.ts | 2 +- src/remote/activitypub/renderer/block.ts | 2 +- src/remote/activitypub/renderer/delete.ts | 2 +- src/remote/activitypub/renderer/undo.ts | 2 +- src/tools/add-emoji.ts | 2 +- src/tools/resync-remote-user.ts | 2 +- 14 files changed, 19 insertions(+), 19 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 ''; }; diff --git a/src/client/app/v.d.ts b/src/client/app/v.d.ts index 8f3a240d80..b3a21c6cdb 100644 --- a/src/client/app/v.d.ts +++ b/src/client/app/v.d.ts @@ -1,4 +1,4 @@ -declare module "*.vue" { +declare module '*.vue' { import Vue from 'vue'; export default Vue; } diff --git a/src/games/reversi/core.ts b/src/games/reversi/core.ts index f678e4ec8b..a198e8dd27 100644 --- a/src/games/reversi/core.ts +++ b/src/games/reversi/core.ts @@ -1,4 +1,4 @@ -import { count, concat } from "../../prelude/array"; +import { count, concat } from '../../prelude/array'; // MISSKEY REVERSI ENGINE diff --git a/src/mfm/syntax-highlight.ts b/src/mfm/syntax-highlight.ts index 3a2b90588b..72913f0ad1 100644 --- a/src/mfm/syntax-highlight.ts +++ b/src/mfm/syntax-highlight.ts @@ -1,4 +1,4 @@ -import { capitalize, toUpperCase } from "../prelude/string"; +import { capitalize, toUpperCase } from '../prelude/string'; function escape(text: string) { return text diff --git a/src/misc/fetch-meta.ts b/src/misc/fetch-meta.ts index a2eea83c93..229c00620f 100644 --- a/src/misc/fetch-meta.ts +++ b/src/misc/fetch-meta.ts @@ -17,7 +17,7 @@ const defaultMeta: any = { enableGithubIntegration: false, enableDiscordIntegration: false, enableExternalUserRecommendation: false, - externalUserRecommendationEngine: "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}", + externalUserRecommendationEngine: 'https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}', externalUserRecommendationTimeout: 300000, errorImageUrl: 'https://ai.misskey.xyz/aiart/yubitun.png' }; diff --git a/src/prelude/string.ts b/src/prelude/string.ts index 6149235e47..c2ad8a2e79 100644 --- a/src/prelude/string.ts +++ b/src/prelude/string.ts @@ -1,5 +1,5 @@ export function concat(xs: string[]): string { - return xs.reduce((a, b) => a + b, ""); + return xs.reduce((a, b) => a + b, ''); } export function capitalize(s: string): string { diff --git a/src/remote/activitypub/models/tag.ts b/src/remote/activitypub/models/tag.ts index 7c9b41eb22..347e001aec 100644 --- a/src/remote/activitypub/models/tag.ts +++ b/src/remote/activitypub/models/tag.ts @@ -1,4 +1,4 @@ -import { IIcon } from "./icon"; +import { IIcon } from './icon'; /*** * tag (ActivityPub) diff --git a/src/remote/activitypub/renderer/block.ts b/src/remote/activitypub/renderer/block.ts index 316fc13c05..694f3a1418 100644 --- a/src/remote/activitypub/renderer/block.ts +++ b/src/remote/activitypub/renderer/block.ts @@ -1,5 +1,5 @@ import config from '../../../config'; -import { ILocalUser, IRemoteUser } from "../../../models/user"; +import { ILocalUser, IRemoteUser } from '../../../models/user'; export default (blocker?: ILocalUser, blockee?: IRemoteUser) => ({ type: 'Block', diff --git a/src/remote/activitypub/renderer/delete.ts b/src/remote/activitypub/renderer/delete.ts index 2a4e70e25e..e090e1c886 100644 --- a/src/remote/activitypub/renderer/delete.ts +++ b/src/remote/activitypub/renderer/delete.ts @@ -1,5 +1,5 @@ import config from '../../../config'; -import { ILocalUser } from "../../../models/user"; +import { ILocalUser } from '../../../models/user'; export default (object: any, user: ILocalUser) => ({ type: 'Delete', diff --git a/src/remote/activitypub/renderer/undo.ts b/src/remote/activitypub/renderer/undo.ts index bf90a3f281..dbcf5732be 100644 --- a/src/remote/activitypub/renderer/undo.ts +++ b/src/remote/activitypub/renderer/undo.ts @@ -1,5 +1,5 @@ import config from '../../../config'; -import { ILocalUser, IUser } from "../../../models/user"; +import { ILocalUser, IUser } from '../../../models/user'; export default (object: any, user: ILocalUser | IUser) => ({ type: 'Undo', diff --git a/src/tools/add-emoji.ts b/src/tools/add-emoji.ts index 875af55c14..e40c96b79d 100644 --- a/src/tools/add-emoji.ts +++ b/src/tools/add-emoji.ts @@ -1,5 +1,5 @@ import * as debug from 'debug'; -import Emoji from "../models/emoji"; +import Emoji from '../models/emoji'; debug.enable('*'); diff --git a/src/tools/resync-remote-user.ts b/src/tools/resync-remote-user.ts index 3a63512f45..c013de723f 100644 --- a/src/tools/resync-remote-user.ts +++ b/src/tools/resync-remote-user.ts @@ -1,4 +1,4 @@ -import parseAcct from "../misc/acct/parse"; +import parseAcct from '../misc/acct/parse'; import resolveUser from '../remote/resolve-user'; import * as debug from 'debug';