Compare commits

..

2 commits

Author SHA1 Message Date
0f5c6b4092
client: more actions for renotes
Also allows to perform most note actions on renotes.

Changelog: Added
2025-02-06 20:24:01 +01:00
ab9c6d46a3
client: better error for already clipped note
Changelog: Fixed
2025-02-06 20:21:37 +01:00
2 changed files with 14 additions and 16 deletions

View file

@ -23,7 +23,7 @@
</I18n>
<div class="info">
<button ref="renoteTime" class="_button time" @click="showRenoteMenu()">
<i v-if="isMyRenote" class="fas fa-ellipsis-h dropdownIcon"></i>
<i class="fas fa-ellipsis-h dropdownIcon"></i>
<MkTime :time="note.createdAt"/>
</button>
<MkVisibility :note="note"/>
@ -171,7 +171,6 @@ const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
const renoteTime = ref<HTMLElement>();
const reactButton = ref<HTMLElement>();
let appearNote = $computed(() => isRenote ? note.renote as foundkey.entities.Note : note);
const isMyRenote = $i && ($i.id === note.userId);
const showContent = ref(false);
const isDeleted = ref(false);
const muted = ref(checkWordMute(appearNote, $i, defaultStore.state.mutedWords));
@ -256,20 +255,19 @@ function menu(viaKeyboard = false): void {
}
function showRenoteMenu(viaKeyboard = false): void {
if (!isMyRenote) return;
os.popupMenu([{
text: i18n.ts.unrenote,
icon: 'fas fa-trash-alt',
danger: true,
action: () => {
os.api('notes/delete', {
noteId: note.id,
});
isDeleted.value = true;
os.popupMenu(
getNoteMenu({
note,
translating,
translation,
menuButton: renoteTime,
isDeleted
}),
renoteTime.value,
{
viaKeyboard,
},
}], renoteTime.value, {
viaKeyboard,
});
);
}
function focus() {

View file

@ -248,7 +248,7 @@ function showRenoteMenu(viaKeyboard = false): void {
note,
translating,
translation,
renoteTime,
menuButton: renoteTime,
isDeleted,
currentClipPage
}),