Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8744aab9c2 | |||
| 1ed632d6d4 | |||
| f820f767ae | |||
| 7bd341ec9b | |||
| 97adc27d4e | |||
| 8f8b546fe1 | |||
| e949b53f91 | |||
| d857801e03 |
@@ -31,6 +31,7 @@
|
||||
- Enhance: 自分が押したリアクションのデザインを改善
|
||||
- Enhance: ノート検索にローカルのみ検索可能なオプションの追加
|
||||
- Enhance: AiScriptで`LOCALE`として現在の設定言語を取得できるように
|
||||
- Enhance: Renote自体を通報できるように
|
||||
- `$[rainbow ]`記法が、動きのあるMFMが無効になっていても使用できるようになりました
|
||||
- Playの操作を行うAPI TokenをAPIコンソールから発行できるように
|
||||
- Fix: サーバー情報画面(`/instance-info/{domain}`)でブロックができないのを修正
|
||||
|
||||
Vendored
+2
@@ -48,6 +48,7 @@ export interface Locale {
|
||||
"unpin": string;
|
||||
"copyContent": string;
|
||||
"copyLink": string;
|
||||
"copyLinkRenote": string;
|
||||
"delete": string;
|
||||
"deleteAndEdit": string;
|
||||
"deleteAndEditConfirm": string;
|
||||
@@ -657,6 +658,7 @@ export interface Locale {
|
||||
"sample": string;
|
||||
"abuseReports": string;
|
||||
"reportAbuse": string;
|
||||
"reportAbuseRenote": string;
|
||||
"reportAbuseOf": string;
|
||||
"fillAbuseReportDescription": string;
|
||||
"abuseReported": string;
|
||||
|
||||
@@ -45,6 +45,7 @@ pin: "ピン留め"
|
||||
unpin: "ピン留め解除"
|
||||
copyContent: "内容をコピー"
|
||||
copyLink: "リンクをコピー"
|
||||
copyLinkRenote: "Renoteのリンクをコピー"
|
||||
delete: "削除"
|
||||
deleteAndEdit: "削除して編集"
|
||||
deleteAndEditConfirm: "このノートを削除してもう一度編集しますか?このノートへのリアクション、Renote、返信も全て削除されます。"
|
||||
@@ -654,6 +655,7 @@ behavior: "動作"
|
||||
sample: "サンプル"
|
||||
abuseReports: "通報"
|
||||
reportAbuse: "通報"
|
||||
reportAbuseRenote: "Renoteを通報"
|
||||
reportAbuseOf: "{name}を通報する"
|
||||
fillAbuseReportDescription: "通報理由の詳細を記入してください。対象のノートがある場合はそのURLも記入してください。"
|
||||
abuseReported: "内容が送信されました。ご報告ありがとうございました。"
|
||||
|
||||
@@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</I18n>
|
||||
<div :class="$style.renoteInfo">
|
||||
<button ref="renoteTime" :class="$style.renoteTime" class="_button" @click="showRenoteMenu()">
|
||||
<i v-if="isMyRenote" class="ti ti-dots" :class="$style.renoteMenu"></i>
|
||||
<i class="ti ti-dots" :class="$style.renoteMenu"></i>
|
||||
<MkTime :time="note.createdAt"/>
|
||||
</button>
|
||||
<span v-if="note.visibility !== 'public'" style="margin-left: 0.5em;" :title="i18n.ts._visibility[note.visibility]">
|
||||
@@ -161,7 +161,7 @@ import { reactionPicker } from '@/scripts/reaction-picker';
|
||||
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
import { getNoteClipMenu, getNoteMenu } from '@/scripts/get-note-menu';
|
||||
import { getAbuseNoteMenu, getCopyNoteLinkMenu, getNoteClipMenu, getNoteMenu } from '@/scripts/get-note-menu';
|
||||
import { useNoteCapture } from '@/scripts/use-note-capture';
|
||||
import { deepClone } from '@/scripts/clone';
|
||||
import { useTooltip } from '@/scripts/use-tooltip';
|
||||
@@ -425,21 +425,34 @@ async function clip() {
|
||||
}
|
||||
|
||||
function showRenoteMenu(viaKeyboard = false): void {
|
||||
if (!isMyRenote) return;
|
||||
pleaseLogin();
|
||||
os.popupMenu([{
|
||||
text: i18n.ts.unrenote,
|
||||
icon: 'ti ti-trash',
|
||||
danger: true,
|
||||
action: () => {
|
||||
os.api('notes/delete', {
|
||||
noteId: note.id,
|
||||
});
|
||||
isDeleted.value = true;
|
||||
},
|
||||
}], renoteTime.value, {
|
||||
viaKeyboard: viaKeyboard,
|
||||
});
|
||||
if (isMyRenote) {
|
||||
pleaseLogin();
|
||||
os.popupMenu([
|
||||
getCopyNoteLinkMenu(note, i18n.ts.copyLinkRenote),
|
||||
null,
|
||||
{
|
||||
text: i18n.ts.unrenote,
|
||||
icon: 'ti ti-trash',
|
||||
danger: true,
|
||||
action: () => {
|
||||
os.api('notes/delete', {
|
||||
noteId: note.id,
|
||||
});
|
||||
isDeleted.value = true;
|
||||
},
|
||||
},
|
||||
], renoteTime.value, {
|
||||
viaKeyboard: viaKeyboard,
|
||||
});
|
||||
} else {
|
||||
os.popupMenu([
|
||||
getCopyNoteLinkMenu(note, i18n.ts.copyLinkRenote),
|
||||
null,
|
||||
getAbuseNoteMenu(note, i18n.ts.reportAbuseRenote),
|
||||
], renoteTime.value, {
|
||||
viaKeyboard: viaKeyboard,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function focus() {
|
||||
|
||||
@@ -92,6 +92,31 @@ export async function getNoteClipMenu(props: {
|
||||
}];
|
||||
}
|
||||
|
||||
export function getAbuseNoteMenu(note: misskey.entities.Note, text: string): MenuItem {
|
||||
return {
|
||||
icon: 'ti ti-exclamation-circle',
|
||||
text,
|
||||
action: (): void => {
|
||||
const u = note.url ?? note.uri ?? `${url}/notes/${note.id}`;
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
|
||||
user: note.user,
|
||||
initialComment: `Note: ${u}\n-----\n`,
|
||||
}, {}, 'closed');
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function getCopyNoteLinkMenu(note: misskey.entities.Note, text: string): MenuItem {
|
||||
return {
|
||||
icon: 'ti ti-link',
|
||||
text,
|
||||
action: (): void => {
|
||||
copyToClipboard(`${url}/notes/${note.id}`);
|
||||
os.success();
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function getNoteMenu(props: {
|
||||
note: misskey.entities.Note;
|
||||
menuButton: Ref<HTMLElement>;
|
||||
@@ -266,11 +291,9 @@ export function getNoteMenu(props: {
|
||||
icon: 'ti ti-copy',
|
||||
text: i18n.ts.copyContent,
|
||||
action: copyContent,
|
||||
}, {
|
||||
icon: 'ti ti-link',
|
||||
text: i18n.ts.copyLink,
|
||||
action: copyLink,
|
||||
}, (appearNote.url || appearNote.uri) ? {
|
||||
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
|
||||
, (isRenote ? getCopyNoteLinkMenu(props.note, i18n.ts.copyLinkRenote) : undefined)
|
||||
, (appearNote.url || appearNote.uri) ? {
|
||||
icon: 'ti ti-external-link',
|
||||
text: i18n.ts.showOnRemote,
|
||||
action: () => {
|
||||
@@ -342,19 +365,11 @@ export function getNoteMenu(props: {
|
||||
}]
|
||||
: []
|
||||
),*/
|
||||
...(appearNote.userId !== $i.id ? [
|
||||
...(appearNote.userId !== $i.id || (isRenote && props.note.userId !== $i.id) ? [
|
||||
null,
|
||||
{
|
||||
icon: 'ti ti-exclamation-circle',
|
||||
text: i18n.ts.reportAbuse,
|
||||
action: () => {
|
||||
const u = appearNote.url ?? appearNote.uri ?? `${url}/notes/${appearNote.id}`;
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
|
||||
user: appearNote.user,
|
||||
initialComment: `Note: ${u}\n-----\n`,
|
||||
}, {}, 'closed');
|
||||
},
|
||||
}]
|
||||
appearNote.userId !== $i.id ? getAbuseNoteMenu(appearNote, i18n.ts.reportAbuse) : undefined,
|
||||
isRenote && props.note.userId !== $i.id ? getAbuseNoteMenu(props.note, i18n.ts.reportAbuseRenote) : undefined,
|
||||
]
|
||||
: []
|
||||
),
|
||||
...(appearNote.userId === $i.id || $i.isModerator || $i.isAdmin ? [
|
||||
@@ -382,11 +397,9 @@ export function getNoteMenu(props: {
|
||||
icon: 'ti ti-copy',
|
||||
text: i18n.ts.copyContent,
|
||||
action: copyContent,
|
||||
}, {
|
||||
icon: 'ti ti-link',
|
||||
text: i18n.ts.copyLink,
|
||||
action: copyLink,
|
||||
}, (appearNote.url || appearNote.uri) ? {
|
||||
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
|
||||
, (isRenote ? getCopyNoteLinkMenu(props.note, i18n.ts.copyLinkRenote) : undefined)
|
||||
, (appearNote.url || appearNote.uri) ? {
|
||||
icon: 'ti ti-external-link',
|
||||
text: i18n.ts.showOnRemote,
|
||||
action: () => {
|
||||
|
||||
Reference in New Issue
Block a user