();
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() {
diff --git a/packages/client/src/components/note.vue b/packages/client/src/components/note.vue
index c7594250e..f05acfa92 100644
--- a/packages/client/src/components/note.vue
+++ b/packages/client/src/components/note.vue
@@ -24,7 +24,7 @@
@@ -154,7 +154,6 @@ const renoteButton = ref>();
const renoteTime = ref();
const reactButton = ref();
let appearNote = $computed(() => isRenote ? note.renote as foundkey.entities.Note : note);
-const isMyRenote = $i && ($i.id === note.userId);
const showContent = ref(false);
const isLong = (appearNote.cw == null && appearNote.text != null && (
(appearNote.text.split('\n').length > 9) ||
@@ -244,20 +243,18 @@ 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;
- },
- }], renoteTime.value, {
- viaKeyboard,
- });
+ os.popupMenu(
+ getNoteMenu({
+ note,
+ translating,
+ translation,
+ menuButton: renoteTime,
+ isDeleted,
+ currentClipPage
+ }),
+ renoteTime.value,
+ { viaKeyboard },
+ );
}
function focus() {