mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 19:13:08 +02:00
chore(lint): Add missing semicolons
This commit is contained in:
parent
7231f5ff0b
commit
a3283c71ef
9 changed files with 26 additions and 26 deletions
|
@ -20,7 +20,7 @@ export function createAiScriptEnv(vm, opts) {
|
||||||
title: title.value,
|
title: title.value,
|
||||||
text: text.value,
|
text: text.value,
|
||||||
});
|
});
|
||||||
return confirm.canceled ? values.FALSE : values.TRUE
|
return confirm.canceled ? values.FALSE : values.TRUE;
|
||||||
}),
|
}),
|
||||||
'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => {
|
'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => {
|
||||||
apiRequests++;
|
apiRequests++;
|
||||||
|
|
|
@ -26,23 +26,23 @@ export function initLib(hpml: Hpml) {
|
||||||
const canvas = hpml.canvases[id.value];
|
const canvas = hpml.canvases[id.value];
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
return values.OBJ(new Map([
|
return values.OBJ(new Map([
|
||||||
['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value) })],
|
['clear_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.clearRect(x.value, y.value, width.value, height.value); })],
|
||||||
['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value) })],
|
['fill_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.fillRect(x.value, y.value, width.value, height.value); })],
|
||||||
['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value) })],
|
['stroke_rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.strokeRect(x.value, y.value, width.value, height.value); })],
|
||||||
['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined) })],
|
['fill_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.fillText(text.value, x.value, y.value, width ? width.value : undefined); })],
|
||||||
['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined) })],
|
['stroke_text', values.FN_NATIVE(([text, x, y, width]) => { ctx.strokeText(text.value, x.value, y.value, width ? width.value : undefined); })],
|
||||||
['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value })],
|
['set_line_width', values.FN_NATIVE(([width]) => { ctx.lineWidth = width.value; })],
|
||||||
['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value })],
|
['set_font', values.FN_NATIVE(([font]) => { ctx.font = font.value; })],
|
||||||
['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value })],
|
['set_fill_style', values.FN_NATIVE(([style]) => { ctx.fillStyle = style.value; })],
|
||||||
['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value })],
|
['set_stroke_style', values.FN_NATIVE(([style]) => { ctx.strokeStyle = style.value; })],
|
||||||
['begin_path', values.FN_NATIVE(() => { ctx.beginPath() })],
|
['begin_path', values.FN_NATIVE(() => { ctx.beginPath(); })],
|
||||||
['close_path', values.FN_NATIVE(() => { ctx.closePath() })],
|
['close_path', values.FN_NATIVE(() => { ctx.closePath(); })],
|
||||||
['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value) })],
|
['move_to', values.FN_NATIVE(([x, y]) => { ctx.moveTo(x.value, y.value); })],
|
||||||
['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value) })],
|
['line_to', values.FN_NATIVE(([x, y]) => { ctx.lineTo(x.value, y.value); })],
|
||||||
['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value) })],
|
['arc', values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { ctx.arc(x.value, y.value, radius.value, startAngle.value, endAngle.value); })],
|
||||||
['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value) })],
|
['rect', values.FN_NATIVE(([x, y, width, height]) => { ctx.rect(x.value, y.value, width.value, height.value); })],
|
||||||
['fill', values.FN_NATIVE(() => { ctx.fill() })],
|
['fill', values.FN_NATIVE(() => { ctx.fill(); })],
|
||||||
['stroke', values.FN_NATIVE(() => { ctx.stroke() })],
|
['stroke', values.FN_NATIVE(() => { ctx.stroke(); })],
|
||||||
]));
|
]));
|
||||||
}),
|
}),
|
||||||
'MkPages:chart': values.FN_NATIVE(([id, opts]) => {
|
'MkPages:chart': values.FN_NATIVE(([id, opts]) => {
|
||||||
|
|
|
@ -4,11 +4,11 @@ export async function countSameRenotes(userId: string, renoteId: string, exclude
|
||||||
// 指定したユーザーの指定したノートのリノートがいくつあるか数える
|
// 指定したユーザーの指定したノートのリノートがいくつあるか数える
|
||||||
const query = Notes.createQueryBuilder('note')
|
const query = Notes.createQueryBuilder('note')
|
||||||
.where('note.userId = :userId', { userId })
|
.where('note.userId = :userId', { userId })
|
||||||
.andWhere('note.renoteId = :renoteId', { renoteId })
|
.andWhere('note.renoteId = :renoteId', { renoteId });
|
||||||
|
|
||||||
// 指定した投稿を除く
|
// 指定した投稿を除く
|
||||||
if (excludeNoteId) {
|
if (excludeNoteId) {
|
||||||
query.andWhere('note.id != :excludeNoteId', { excludeNoteId })
|
query.andWhere('note.id != :excludeNoteId', { excludeNoteId });
|
||||||
}
|
}
|
||||||
|
|
||||||
return await query.getCount();
|
return await query.getCount();
|
||||||
|
|
|
@ -78,7 +78,7 @@ export async function toDbReaction(reaction?: string | null, reacterHost?: strin
|
||||||
name,
|
name,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (emoji) return reacterHost ? `:${name}@${reacterHost}:` : `:${name}:`
|
if (emoji) return reacterHost ? `:${name}@${reacterHost}:` : `:${name}:`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return await getFallbackReaction();
|
return await getFallbackReaction();
|
||||||
|
|
|
@ -129,7 +129,7 @@ export default define(meta, async (ps, me) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps.host) {
|
if (ps.host) {
|
||||||
query.andWhere('instance.host like :host', { host: '%' + ps.host.toLowerCase() + '%' })
|
query.andWhere('instance.host like :host', { host: '%' + ps.host.toLowerCase() + '%' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const instances = await query.take(ps.limit!).skip(ps.offset).getMany();
|
const instances = await query.take(ps.limit!).skip(ps.offset).getMany();
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.andWhere('user.host LIKE :host', { host: ps.host.toLowerCase() + '%' });
|
.andWhere('user.host LIKE :host', { host: ps.host.toLowerCase() + '%' });
|
||||||
|
|
||||||
if (ps.username) {
|
if (ps.username) {
|
||||||
q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' })
|
q.andWhere('user.usernameLower like :username', { username: ps.username.toLowerCase() + '%' });
|
||||||
}
|
}
|
||||||
|
|
||||||
q.andWhere('user.updatedAt IS NOT NULL');
|
q.andWhere('user.updatedAt IS NOT NULL');
|
||||||
|
|
|
@ -118,7 +118,7 @@ export default async (user: User, note: Note, reaction?: string) => {
|
||||||
const content = renderActivity(await renderLike(inserted, note));
|
const content = renderActivity(await renderLike(inserted, note));
|
||||||
const dm = new DeliverManager(user, content);
|
const dm = new DeliverManager(user, content);
|
||||||
if (note.userHost !== null) {
|
if (note.userHost !== null) {
|
||||||
const reactee = await Users.findOne(note.userId)
|
const reactee = await Users.findOne(note.userId);
|
||||||
dm.addDirectRecipe(reactee as IRemoteUser);
|
dm.addDirectRecipe(reactee as IRemoteUser);
|
||||||
}
|
}
|
||||||
dm.addFollowersRecipe();
|
dm.addFollowersRecipe();
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default async (user: User, note: Note) => {
|
||||||
const content = renderActivity(renderUndo(await renderLike(exist, note), user));
|
const content = renderActivity(renderUndo(await renderLike(exist, note), user));
|
||||||
const dm = new DeliverManager(user, content);
|
const dm = new DeliverManager(user, content);
|
||||||
if (note.userHost !== null) {
|
if (note.userHost !== null) {
|
||||||
const reactee = await Users.findOne(note.userId)
|
const reactee = await Users.findOne(note.userId);
|
||||||
dm.addDirectRecipe(reactee as IRemoteUser);
|
dm.addDirectRecipe(reactee as IRemoteUser);
|
||||||
}
|
}
|
||||||
dm.addFollowersRecipe();
|
dm.addFollowersRecipe();
|
||||||
|
|
|
@ -68,5 +68,5 @@ export default (
|
||||||
if (!unread) {
|
if (!unread) {
|
||||||
publishMainStream(userId, 'readAllAntennas');
|
publishMainStream(userId, 'readAllAntennas');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue