mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
Merge pull request 'feat: local only boost' (#10089) from naskya/calckey:feat/local-only-boost-option into develop
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/10089
This commit is contained in:
commit
e3c108eab0
1 changed files with 37 additions and 0 deletions
|
@ -179,6 +179,43 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||
});
|
||||
}
|
||||
|
||||
if (canRenote) {
|
||||
buttonActions.push({
|
||||
text: `${i18n.ts.renote} (${i18n.ts.local})`,
|
||||
icon: "ph-hand-fist ph-bold ph-lg",
|
||||
danger: false,
|
||||
action: () => {
|
||||
os.api(
|
||||
"notes/create",
|
||||
props.note.visibility === "specified"
|
||||
? {
|
||||
renoteId: props.note.id,
|
||||
visibility: props.note.visibility,
|
||||
visibleUserIds: props.note.visibleUserIds,
|
||||
localOnly: true,
|
||||
}
|
||||
: {
|
||||
renoteId: props.note.id,
|
||||
visibility: props.note.visibility,
|
||||
localOnly: true,
|
||||
}
|
||||
);
|
||||
const el =
|
||||
ev &&
|
||||
((ev.currentTarget ?? ev.target) as
|
||||
| HTMLElement
|
||||
| null
|
||||
| undefined);
|
||||
if (el) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + el.offsetWidth / 2;
|
||||
const y = rect.top + el.offsetHeight / 2;
|
||||
os.popup(Ripple, { x, y }, {}, "end");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (!defaultStore.state.seperateRenoteQuote) {
|
||||
buttonActions.push({
|
||||
text: i18n.ts.quote,
|
||||
|
|
Loading…
Reference in a new issue