Merge remote-tracking branch 'misskey-original/develop' into develop
# Conflicts: # packages/frontend/src/components/MkChannelFollowButton.vue # packages/frontend/src/components/MkDrive.folder.vue # packages/frontend/src/components/MkDrive.navFolder.vue # packages/frontend/src/components/MkEmojiEditDialog.vue # packages/frontend/src/components/MkFollowButton.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/pages/about.vue # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/admin/instance-block.vue # packages/frontend/src/pages/avatar-decorations.vue # packages/frontend/src/pages/custom-emojis-manager.vue # packages/frontend/src/pages/settings/mute-block.vue # packages/frontend/src/pages/settings/profile.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/pages/user/home.vue
This commit is contained in:
commit
de3f4ce29c
216 changed files with 758 additions and 568 deletions
|
|
@ -10,6 +10,7 @@ import { $i } from '@/account.js';
|
|||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
|
||||
import { url } from '@/config.js';
|
||||
import { defaultStore, noteActions } from '@/store.js';
|
||||
|
|
@ -40,7 +41,7 @@ export async function getNoteClipMenu(props: {
|
|||
action: () => {
|
||||
claimAchievement('noteClipped1');
|
||||
os.promiseDialog(
|
||||
os.api('clips/add-note', { clipId: clip.id, noteId: appearNote.id }),
|
||||
misskeyApi('clips/add-note', { clipId: clip.id, noteId: appearNote.id }),
|
||||
null,
|
||||
async (err) => {
|
||||
if (err.id === '734806c4-542c-463a-9311-15c512803965') {
|
||||
|
|
@ -145,7 +146,7 @@ export function getNoteMenu(props: {
|
|||
}).then(({ canceled }) => {
|
||||
if (canceled) return;
|
||||
|
||||
os.api('notes/delete', {
|
||||
misskeyApi('notes/delete', {
|
||||
noteId: appearNote.id,
|
||||
});
|
||||
|
||||
|
|
@ -162,7 +163,7 @@ export function getNoteMenu(props: {
|
|||
}).then(({ canceled }) => {
|
||||
if (canceled) return;
|
||||
|
||||
os.api('notes/delete', {
|
||||
misskeyApi('notes/delete', {
|
||||
noteId: appearNote.id,
|
||||
});
|
||||
|
||||
|
|
@ -247,7 +248,7 @@ export function getNoteMenu(props: {
|
|||
async function translate(): Promise<void> {
|
||||
if (props.translation.value != null) return;
|
||||
props.translating.value = true;
|
||||
const res = await os.api('notes/translate', {
|
||||
const res = await misskeyApi('notes/translate', {
|
||||
noteId: appearNote.id,
|
||||
targetLang: miLocalStorage.getItem('lang') ?? navigator.language,
|
||||
});
|
||||
|
|
@ -257,7 +258,7 @@ export function getNoteMenu(props: {
|
|||
|
||||
let menu: MenuItem[];
|
||||
if ($i) {
|
||||
const statePromise = os.api('notes/state', {
|
||||
const statePromise = misskeyApi('notes/state', {
|
||||
noteId: appearNote.id,
|
||||
});
|
||||
|
||||
|
|
@ -334,7 +335,7 @@ export function getNoteMenu(props: {
|
|||
icon: 'ti ti-user',
|
||||
text: i18n.ts.user,
|
||||
children: async () => {
|
||||
const user = appearNote.userId === $i?.id ? $i : await os.api('users/show', { userId: appearNote.userId });
|
||||
const user = appearNote.userId === $i?.id ? $i : await misskeyApi('users/show', { userId: appearNote.userId });
|
||||
const { menu, cleanup } = getUserMenu(user);
|
||||
cleanups.push(cleanup);
|
||||
return menu;
|
||||
|
|
@ -365,7 +366,7 @@ export function getNoteMenu(props: {
|
|||
children: async () => {
|
||||
const channelChildMenu = [] as MenuItem[];
|
||||
|
||||
const channel = await os.api('channels/show', { channelId: appearNote.channel!.id });
|
||||
const channel = await misskeyApi('channels/show', { channelId: appearNote.channel!.id });
|
||||
|
||||
if (channel.pinnedNoteIds.includes(appearNote.id)) {
|
||||
channelChildMenu.push({
|
||||
|
|
@ -434,7 +435,7 @@ export function getNoteMenu(props: {
|
|||
}
|
||||
|
||||
if (noteActions.length > 0) {
|
||||
menu = menu.concat([{ type: "divider" }, ...noteActions.map(action => ({
|
||||
menu = menu.concat([{ type: 'divider' }, ...noteActions.map(action => ({
|
||||
icon: 'ti ti-plug',
|
||||
text: action.title,
|
||||
action: () => {
|
||||
|
|
@ -444,7 +445,7 @@ export function getNoteMenu(props: {
|
|||
}
|
||||
|
||||
if (defaultStore.state.devMode) {
|
||||
menu = menu.concat([{ type: "divider" }, {
|
||||
menu = menu.concat([{ type: 'divider' }, {
|
||||
icon: 'ti ti-id',
|
||||
text: i18n.ts.copyNoteId,
|
||||
action: () => {
|
||||
|
|
@ -508,7 +509,7 @@ export function getRenoteMenu(props: {
|
|||
}
|
||||
|
||||
if (!props.mock) {
|
||||
os.api('notes/create', {
|
||||
misskeyApi('notes/create', {
|
||||
renoteId: appearNote.id,
|
||||
channelId: appearNote.channelId,
|
||||
}).then(() => {
|
||||
|
|
@ -553,7 +554,7 @@ export function getRenoteMenu(props: {
|
|||
}
|
||||
|
||||
if (!props.mock) {
|
||||
os.api('notes/create', {
|
||||
misskeyApi('notes/create', {
|
||||
localOnly,
|
||||
visibility,
|
||||
renoteId: appearNote.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue