Appease linter

This commit is contained in:
HellhoundSoftware 2025-05-09 16:43:41 -04:00
parent 7f64a27268
commit 0937779bc2
No known key found for this signature in database

View file

@ -383,7 +383,7 @@ export function getNoteMenu(props: {
icon: 'ti ti-repeat', icon: 'ti ti-repeat',
text: i18n.ts.renote, text: i18n.ts.renote,
children: () => getNewRenoteMenu(appearNote), children: () => getNewRenoteMenu(appearNote),
}) });
menuItems.push({ menuItems.push({
type: 'parent', type: 'parent',
@ -592,7 +592,7 @@ export async function getNewRenoteMenu(appearNote: Misskey.entities.Note): Promi
channelId: channel?.id, channelId: channel?.id,
renoteId: appearNote.id, renoteId: appearNote.id,
}).then(() => { }).then(() => {
os.toast(channel ? i18n.tsx.renotedToX({name: channel.name}) : i18n.ts.renoted); os.toast(channel ? i18n.tsx.renotedToX({ name: channel.name }) : i18n.ts.renoted);
}); });
}; };
@ -608,12 +608,12 @@ export async function getNewRenoteMenu(appearNote: Misskey.entities.Note): Promi
// Notes from channels might not allow renoting outside the channel. // Notes from channels might not allow renoting outside the channel.
if (!appearNote.channel || appearNote.channel.allowRenoteToExternal) { if (!appearNote.channel || appearNote.channel.allowRenoteToExternal) {
if (renoteItems.length > 0) renoteItems.push({type: 'divider'}); if (renoteItems.length > 0) renoteItems.push({ type: 'divider' });
renoteItems.push(...boostMenuItems(ref(appearNote), (v, l) => renoteFunc(v, l, undefined))); renoteItems.push(...boostMenuItems(ref(appearNote), (v, l) => renoteFunc(v, l, undefined)));
// Local-only notes should have the switch visibly forced on. // Local-only notes should have the switch visibly forced on.
if (appearNote.localOnly) { if (appearNote.localOnly) {
for (const item of renoteItems) { for (const item of renoteItems) {
if (item && item['type'] == "switch" && item['text'] == i18n.ts._timelines.local) { if (item && item['type'] === "switch" && item['text'] === i18n.ts._timelines.local) {
item['ref'] = ref(true); item['ref'] = ref(true);
item['disabled'] = true; item['disabled'] = true;
break; break;
@ -633,19 +633,19 @@ export async function getNewRenoteMenu(appearNote: Misskey.entities.Note): Promi
})); }));
if (otherChannelItems.length > 0) { if (otherChannelItems.length > 0) {
renoteItems.push( renoteItems.push(
{type: 'divider'}, { type: 'divider' },
{type: 'label', text: appearNote.channel ? i18n.ts.renoteToOtherChannel : i18n.ts.renoteToChannel}, { type: 'label', text: appearNote.channel ? i18n.ts.renoteToOtherChannel : i18n.ts.renoteToChannel },
...otherChannelItems ...otherChannelItems
); );
} }
const channelQuoteItems: MenuItem[] = channels.map((channel) => ({ const channelQuoteItems: MenuItem[] = channels.map((channel) => ({
type: 'button', type: 'button',
text: channel.name, text: channel.name,
action: () => {os.post({renote: appearNote, channel: channel});}, action: () => {os.post({ renote: appearNote, channel: channel });},
})); }));
if (channelQuoteItems.length > 0) { if (channelQuoteItems.length > 0) {
renoteItems.push( renoteItems.push(
{type: 'divider'}, { type: 'divider' },
{ {
type: 'parent', type: 'parent',
text: i18n.ts.inChannelQuote, text: i18n.ts.inChannelQuote,