Merge remote-tracking branch 'misskey-original/develop' into develop
# Conflicts: # package.json # packages/backend/src/server/api/endpoints.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFoldableSection.vue # packages/frontend/src/components/MkInput.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.button.vue # packages/frontend/src/components/MkTab.vue # packages/frontend/src/components/MkTimeline.vue # packages/frontend/src/components/MkUserSelectDialog.vue # packages/frontend/src/components/global/MkCustomEmoji.vue # packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts # packages/frontend/src/os.ts # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/ui/universal.vue
This commit is contained in:
commit
942b7f1b3c
250 changed files with 2788 additions and 1788 deletions
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { defineAsyncComponent, Ref } from 'vue';
|
||||
import { defineAsyncComponent, Ref, ShallowRef } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { claimAchievement } from './achievements.js';
|
||||
import { $i } from '@/account.js';
|
||||
|
|
@ -36,7 +36,7 @@ export async function getNoteClipMenu(props: {
|
|||
const appearNote = isRenote ? props.note.renote as Misskey.entities.Note : props.note;
|
||||
|
||||
const clips = await clipsCache.fetch();
|
||||
return [...clips.map(clip => ({
|
||||
const menu: MenuItem[] = [...clips.map(clip => ({
|
||||
text: clip.name,
|
||||
action: () => {
|
||||
claimAchievement('noteClipped1');
|
||||
|
|
@ -93,6 +93,8 @@ export async function getNoteClipMenu(props: {
|
|||
os.apiWithDialog('clips/add-note', { clipId: clip.id, noteId: appearNote.id });
|
||||
},
|
||||
}];
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
export function getAbuseNoteMenu(note: Misskey.entities.Note, text: string): MenuItem {
|
||||
|
|
@ -122,7 +124,6 @@ export function getCopyNoteLinkMenu(note: Misskey.entities.Note, text: string):
|
|||
|
||||
export function getNoteMenu(props: {
|
||||
note: Misskey.entities.Note;
|
||||
menuButton: Ref<HTMLElement>;
|
||||
translation: Ref<Misskey.entities.NotesTranslateResponse | null>;
|
||||
translating: Ref<boolean>;
|
||||
isDeleted: Ref<boolean>;
|
||||
|
|
@ -480,7 +481,7 @@ function smallerVisibility(a: Visibility | string, b: Visibility | string): Visi
|
|||
|
||||
export function getRenoteMenu(props: {
|
||||
note: Misskey.entities.Note;
|
||||
renoteButton: Ref<HTMLElement>;
|
||||
renoteButton: ShallowRef<HTMLElement | undefined>;
|
||||
mock?: boolean;
|
||||
}) {
|
||||
const isRenote = (
|
||||
|
|
@ -500,7 +501,7 @@ export function getRenoteMenu(props: {
|
|||
text: i18n.ts.inChannelRenote,
|
||||
icon: 'ti ti-repeat',
|
||||
action: () => {
|
||||
const el = props.renoteButton.value as HTMLElement | null | undefined;
|
||||
const el = props.renoteButton.value;
|
||||
if (el) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + (el.offsetWidth / 2);
|
||||
|
|
@ -536,7 +537,7 @@ export function getRenoteMenu(props: {
|
|||
text: i18n.ts.renote,
|
||||
icon: 'ti ti-repeat',
|
||||
action: () => {
|
||||
const el = props.renoteButton.value as HTMLElement | null | undefined;
|
||||
const el = props.renoteButton.value;
|
||||
if (el) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + (el.offsetWidth / 2);
|
||||
|
|
@ -576,7 +577,7 @@ export function getRenoteMenu(props: {
|
|||
|
||||
const renoteItems = [
|
||||
...normalRenoteItems,
|
||||
...(channelRenoteItems.length > 0 && normalRenoteItems.length > 0) ? [{ type: 'divider' }] : [],
|
||||
...(channelRenoteItems.length > 0 && normalRenoteItems.length > 0) ? [{ type: 'divider' }] as MenuItem[] : [],
|
||||
...channelRenoteItems,
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue