add renote-detail menu

This commit is contained in:
FineArchs 2024-11-17 20:09:31 +09:00
parent eed45c7915
commit 5a7865f6c7
3 changed files with 14 additions and 0 deletions

4
locales/index.d.ts vendored
View File

@ -2362,6 +2362,10 @@ export interface Locale extends ILocale {
*
*/
"details": string;
/**
*
*/
"renoteDetails": string;
/**
*
*/

View File

@ -586,6 +586,7 @@ masterVolume: "マスター音量"
notUseSound: "サウンドを出力しない"
useSoundOnlyWhenActive: "Misskeyがアクティブな時のみサウンドを出力する"
details: "詳細"
renoteDetails: "リノートの詳細"
chooseEmoji: "絵文字を選択"
unableToProcess: "操作を完了できません"
recentUsed: "最近使用"

View File

@ -187,6 +187,7 @@ import MkUrlPreview from '@/components/MkUrlPreview.vue';
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
import { pleaseLogin, type OpenOnRemoteOptions } from '@/scripts/please-login.js';
import { checkWordMute } from '@/scripts/check-word-mute.js';
import { notePage } from '@/filters/note.js';
import { userPage } from '@/filters/user.js';
import number from '@/filters/number.js';
import * as os from '@/os.js';
@ -565,16 +566,24 @@ function showRenoteMenu(): void {
},
};
}
const renoteDetailsMenu: MenuItem = {
type: 'link',
text: i18n.ts.renoteDetails,
icon: 'ti ti-info-circle',
to: notePage(note.value),
}
if (isMyRenote) {
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
os.popupMenu([
renoteDetailsMenu,
getCopyNoteLinkMenu(note.value, i18n.ts.copyLinkRenote),
{ type: 'divider' },
getUnrenote(),
], renoteTime.value);
} else {
os.popupMenu([
renoteDetailsMenu,
getCopyNoteLinkMenu(note.value, i18n.ts.copyLinkRenote),
{ type: 'divider' },
getAbuseNoteMenu(note.value, i18n.ts.reportAbuseRenote),