mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 15:35:12 +00:00
ノートの詳細ボタンを...に追加 (#9166)
* noteの詳細を追加 * add detail option to note menu * add detailed , fix typo * delete button Co-authored-by: Gray Olson <gray@grayolson.com>
This commit is contained in:
parent
1f3b1e7074
commit
7462a1e816
1 changed files with 13 additions and 3 deletions
|
@ -8,6 +8,7 @@ import * as os from '@/os';
|
||||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||||
import { url } from '@/config';
|
import { url } from '@/config';
|
||||||
import { noteActions } from '@/store';
|
import { noteActions } from '@/store';
|
||||||
|
import { notePage } from '@/filters/note';
|
||||||
|
|
||||||
export function getNoteMenu(props: {
|
export function getNoteMenu(props: {
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
|
@ -172,7 +173,9 @@ export function getNoteMenu(props: {
|
||||||
url: `${url}/notes/${appearNote.id}`,
|
url: `${url}/notes/${appearNote.id}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function notedetails(): void {
|
||||||
|
os.pageWindow(`/notes/${appearNote.id}`);
|
||||||
|
}
|
||||||
async function translate(): Promise<void> {
|
async function translate(): Promise<void> {
|
||||||
if (props.translation.value != null) return;
|
if (props.translation.value != null) return;
|
||||||
props.translating.value = true;
|
props.translating.value = true;
|
||||||
|
@ -198,8 +201,11 @@ export function getNoteMenu(props: {
|
||||||
danger: true,
|
danger: true,
|
||||||
action: unclip,
|
action: unclip,
|
||||||
}, null] : []
|
}, null] : []
|
||||||
),
|
), {
|
||||||
{
|
icon: 'fas fa-external-link-alt',
|
||||||
|
text: i18n.ts.details,
|
||||||
|
action: notedetails,
|
||||||
|
}, {
|
||||||
icon: 'fas fa-copy',
|
icon: 'fas fa-copy',
|
||||||
text: i18n.ts.copyContent,
|
text: i18n.ts.copyContent,
|
||||||
action: copyContent,
|
action: copyContent,
|
||||||
|
@ -300,6 +306,10 @@ export function getNoteMenu(props: {
|
||||||
.filter(x => x !== undefined);
|
.filter(x => x !== undefined);
|
||||||
} else {
|
} else {
|
||||||
menu = [{
|
menu = [{
|
||||||
|
icon: 'fas fa-external-link-alt',
|
||||||
|
text: i18n.ts.detailed,
|
||||||
|
action: openDetail,
|
||||||
|
}, {
|
||||||
icon: 'fas fa-copy',
|
icon: 'fas fa-copy',
|
||||||
text: i18n.ts.copyContent,
|
text: i18n.ts.copyContent,
|
||||||
action: copyContent,
|
action: copyContent,
|
||||||
|
|
Loading…
Reference in a new issue