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 65087cc98..f65672ee3 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 6a2718f64..6550e4cc3 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 51a45b30d..b78a59811 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 8f3a240d8..b3a21c6cd 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 f678e4ec8..a198e8dd2 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 3a2b90588..72913f0ad 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 a2eea83c9..229c00620 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 6149235e4..c2ad8a2e7 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 7c9b41eb2..347e001ae 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 316fc13c0..694f3a141 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 2a4e70e25..e090e1c88 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 bf90a3f28..dbcf5732b 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 875af55c1..e40c96b79 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 3a63512f4..c013de723 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';