mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
take back button after quote button if combined
This commit is contained in:
parent
e448e11082
commit
ea7094790b
@ -55,6 +55,15 @@ useTooltip(buttonRef, async (showing) => {
|
||||
|
||||
const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||
pleaseLogin();
|
||||
|
||||
const renotes = await os.api('notes/renotes', {
|
||||
noteId: props.note.id,
|
||||
limit: 11,
|
||||
});
|
||||
|
||||
const users = renotes.map(x => x.user.id);
|
||||
const hasRenotedBefore = users.includes($i.id);
|
||||
|
||||
let buttonActions = [{
|
||||
text: i18n.ts.renote,
|
||||
icon: 'ph-repeat-bold ph-lg',
|
||||
@ -73,13 +82,19 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||
}
|
||||
},
|
||||
}];
|
||||
const renotes = await os.api('notes/renotes', {
|
||||
noteId: props.note.id,
|
||||
limit: 11,
|
||||
});
|
||||
|
||||
const users = renotes.map(x => x.user.id);
|
||||
const hasRenotedBefore = users.includes($i.id);
|
||||
if (!defaultStore.state.seperateRenoteQuote) {
|
||||
buttonActions.push({
|
||||
text: i18n.ts.quote,
|
||||
icon: 'ph-quotes-bold ph-lg',
|
||||
danger: false,
|
||||
action: () => {
|
||||
os.post({
|
||||
renote: props.note,
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (hasRenotedBefore) {
|
||||
buttonActions.push({
|
||||
@ -93,18 +108,6 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
||||
},
|
||||
});
|
||||
}
|
||||
if (!defaultStore.state.seperateRenoteQuote) {
|
||||
buttonActions.push({
|
||||
text: i18n.ts.quote,
|
||||
icon: 'ph-quotes-bold ph-lg',
|
||||
danger: false,
|
||||
action: () => {
|
||||
os.post({
|
||||
renote: props.note,
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
os.popupMenu(buttonActions, buttonRef.value, { viaKeyboard });
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user