mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 07:25:12 +00:00
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/539 Closes #467 and #468 Approved-by: fEmber <acomputerdog@gmail.com> Approved-by: Marie <marie@kaifa.ch>
This commit is contained in:
commit
1063102186
5 changed files with 22 additions and 14 deletions
|
@ -30,8 +30,8 @@ export const meta = {
|
||||||
prohibitMoved: true,
|
prohibitMoved: true,
|
||||||
|
|
||||||
limit: {
|
limit: {
|
||||||
duration: ms('1hour'),
|
duration: ms('1minute'),
|
||||||
max: 300,
|
max: 5,
|
||||||
},
|
},
|
||||||
|
|
||||||
kind: 'write:notes',
|
kind: 'write:notes',
|
||||||
|
|
|
@ -328,10 +328,12 @@ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let renoting = false;
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'r': () => reply(true),
|
'r': () => reply(true),
|
||||||
'e|a|plus': () => react(true),
|
'e|a|plus': () => react(true),
|
||||||
'q': () => renote(appearNote.value.visibility),
|
'(q)': () => { if (canRenote && !renoted.value && !renoting) { renoting = true; renote(appearNote.value.visibility) } },
|
||||||
'up|k|shift+tab': focusBefore,
|
'up|k|shift+tab': focusBefore,
|
||||||
'down|j|tab': focusAfter,
|
'down|j|tab': focusAfter,
|
||||||
'esc': blur,
|
'esc': blur,
|
||||||
|
@ -436,7 +438,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => { renoting = false });
|
||||||
}
|
}
|
||||||
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
||||||
const el = renoteButton.value as HTMLElement | null | undefined;
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
||||||
|
@ -455,7 +457,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => renoting = false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -336,10 +336,12 @@ if ($i) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let renoting = false;
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'r': () => reply(true),
|
'r': () => reply(true),
|
||||||
'e|a|plus': () => react(true),
|
'e|a|plus': () => react(true),
|
||||||
'q': () => renote(appearNote.value.visibility),
|
'(q)': () => { if (canRenote && !renoted.value && !renoting) { renoting = true; renote(appearNote.value.visibility) } },
|
||||||
'esc': blur,
|
'esc': blur,
|
||||||
'm|o': () => showMenu(true),
|
'm|o': () => showMenu(true),
|
||||||
's': () => showContent.value !== showContent.value,
|
's': () => showContent.value !== showContent.value,
|
||||||
|
@ -457,7 +459,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => { renoting = false });
|
||||||
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
||||||
const el = renoteButton.value as HTMLElement | null | undefined;
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
||||||
if (el) {
|
if (el) {
|
||||||
|
@ -474,7 +476,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => { renoting = false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,10 +329,12 @@ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let renoting = false;
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'r': () => reply(true),
|
'r': () => reply(true),
|
||||||
'e|a|plus': () => react(true),
|
'e|a|plus': () => react(true),
|
||||||
'q': () => renote(appearNote.value.visibility),
|
'(q)': () => { if (canRenote && !renoted.value && !renoting) { renoting = true; renote(appearNote.value.visibility) } },
|
||||||
'up|k|shift+tab': focusBefore,
|
'up|k|shift+tab': focusBefore,
|
||||||
'down|j|tab': focusAfter,
|
'down|j|tab': focusAfter,
|
||||||
'esc': blur,
|
'esc': blur,
|
||||||
|
@ -437,7 +439,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => { renoting = false });
|
||||||
}
|
}
|
||||||
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
||||||
const el = renoteButton.value as HTMLElement | null | undefined;
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
||||||
|
@ -456,7 +458,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => { renoting = false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -345,10 +345,12 @@ if ($i) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let renoting = false;
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'r': () => reply(true),
|
'r': () => reply(true),
|
||||||
'e|a|plus': () => react(true),
|
'e|a|plus': () => react(true),
|
||||||
'q': () => renote(appearNote.value.visibility),
|
'(q)': () => { if (canRenote && !renoted.value && !renoting) { renoting = true; renote(appearNote.value.visibility) } },
|
||||||
'esc': blur,
|
'esc': blur,
|
||||||
'm|o': () => showMenu(true),
|
'm|o': () => showMenu(true),
|
||||||
's': () => showContent.value !== showContent.value,
|
's': () => showContent.value !== showContent.value,
|
||||||
|
@ -466,7 +468,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => { renoting = false });
|
||||||
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
} else if (!appearNote.value.channel || appearNote.value.channel.allowRenoteToExternal) {
|
||||||
const el = renoteButton.value as HTMLElement | null | undefined;
|
const el = renoteButton.value as HTMLElement | null | undefined;
|
||||||
if (el) {
|
if (el) {
|
||||||
|
@ -483,7 +485,7 @@ function renote(visibility: Visibility, localOnly: boolean = false) {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
os.toast(i18n.ts.renoted);
|
os.toast(i18n.ts.renoted);
|
||||||
renoted.value = true;
|
renoted.value = true;
|
||||||
});
|
}).finally(() => { renoting = false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue