update deps (#11764)
* update deps
* node16
* wip
* wip
* wip
* Update test-utils.ts
* wip
* Update tsconfig.json
* wip
* Update package.json
* wip
* Update following.vue
* Update followers.vue
* Update index.vue
* Update share.vue
* Update MkUserPopup.vue
* Update MkPostForm.vue
* wip
* Update MkTokenGenerateWindow.vue
* Update MkPagination.vue
* refactor
* update deps
* update deps
* Update sw.ts
* wip
* wip
* wip
* Update FetchInstanceMetadataService.ts
* Update FetchInstanceMetadataService.ts
* update node
* update deps
* 🎨
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
import * as mfm from 'mfm-js';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { extractUrlFromMfm } from './extract-url-from-mfm';
|
||||
|
||||
export function shouldCollapsed(note: misskey.entities.Note): boolean {
|
||||
export function shouldCollapsed(note: Misskey.entities.Note): boolean {
|
||||
const urls = note.text ? extractUrlFromMfm(mfm.parse(note.text)) : null;
|
||||
const collapsed = note.cw == null && note.text != null && (
|
||||
(note.text.includes('$[x2')) ||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { host as localHost } from '@/config';
|
||||
|
||||
export async function genSearchQuery(v: any, q: string) {
|
||||
@@ -18,7 +18,7 @@ export async function genSearchQuery(v: any, q: string) {
|
||||
host = at;
|
||||
}
|
||||
} else {
|
||||
const user = await v.os.api('users/show', Acct.parse(at)).catch(x => null);
|
||||
const user = await v.os.api('users/show', Misskey.acct.parse(at)).catch(x => null);
|
||||
if (user) {
|
||||
userId = user.id;
|
||||
} else {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { defineAsyncComponent, Ref } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { claimAchievement } from './achievements';
|
||||
import { $i } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
@@ -19,9 +19,9 @@ import { clipsCache } from '@/cache';
|
||||
import { MenuItem } from '@/types/menu';
|
||||
|
||||
export async function getNoteClipMenu(props: {
|
||||
note: misskey.entities.Note;
|
||||
note: Misskey.entities.Note;
|
||||
isDeleted: Ref<boolean>;
|
||||
currentClip?: misskey.entities.Clip;
|
||||
currentClip?: Misskey.entities.Clip;
|
||||
}) {
|
||||
const isRenote = (
|
||||
props.note.renote != null &&
|
||||
@@ -30,7 +30,7 @@ export async function getNoteClipMenu(props: {
|
||||
props.note.poll == null
|
||||
);
|
||||
|
||||
const appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note;
|
||||
const appearNote = isRenote ? props.note.renote as Misskey.entities.Note : props.note;
|
||||
|
||||
const clips = await clipsCache.fetch(() => os.api('clips/list'));
|
||||
return [...clips.map(clip => ({
|
||||
@@ -93,12 +93,12 @@ export async function getNoteClipMenu(props: {
|
||||
}
|
||||
|
||||
export function getNoteMenu(props: {
|
||||
note: misskey.entities.Note;
|
||||
note: Misskey.entities.Note;
|
||||
menuButton: Ref<HTMLElement>;
|
||||
translation: Ref<any>;
|
||||
translating: Ref<boolean>;
|
||||
isDeleted: Ref<boolean>;
|
||||
currentClip?: misskey.entities.Clip;
|
||||
currentClip?: Misskey.entities.Clip;
|
||||
}) {
|
||||
const isRenote = (
|
||||
props.note.renote != null &&
|
||||
@@ -107,7 +107,7 @@ export function getNoteMenu(props: {
|
||||
props.note.poll == null
|
||||
);
|
||||
|
||||
const appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note;
|
||||
const appearNote = isRenote ? props.note.renote as Misskey.entities.Note : props.note;
|
||||
|
||||
const cleanups = [] as (() => void)[];
|
||||
|
||||
|
@@ -3,14 +3,14 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n';
|
||||
|
||||
/**
|
||||
* 投稿を表す文字列を取得します。
|
||||
* @param {*} note (packされた)投稿
|
||||
*/
|
||||
export const getNoteSummary = (note: misskey.entities.Note): string => {
|
||||
export const getNoteSummary = (note: Misskey.entities.Note): string => {
|
||||
if (note.deletedAt) {
|
||||
return `(${i18n.ts.deletedNote})`;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
import { toUnicode } from 'punycode';
|
||||
import { defineAsyncComponent, ref, watch } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import { host, url } from '@/config';
|
||||
@@ -16,7 +16,7 @@ import { mainRouter } from '@/router';
|
||||
import { Router } from '@/nirax';
|
||||
import { antennasCache, rolesCache, userListsCache } from '@/cache';
|
||||
|
||||
export function getUserMenu(user: misskey.entities.UserDetailed, router: Router = mainRouter) {
|
||||
export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router = mainRouter) {
|
||||
const meId = $i ? $i.id : null;
|
||||
|
||||
const cleanups = [] as (() => void)[];
|
||||
|
@@ -3,10 +3,10 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { $i } from '@/account';
|
||||
|
||||
export function isFfVisibleForMe(user: misskey.entities.UserDetailed): boolean {
|
||||
export function isFfVisibleForMe(user: Misskey.entities.UserDetailed): boolean {
|
||||
if ($i && $i.id === user.id) return true;
|
||||
|
||||
if (user.ffVisibility === 'private') return false;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as Acct from 'misskey-js/built/acct';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n';
|
||||
import * as os from '@/os';
|
||||
|
||||
@@ -17,7 +17,7 @@ export async function lookupUser() {
|
||||
os.pageWindow(`/admin/user/${user.id}`);
|
||||
};
|
||||
|
||||
const usernamePromise = os.api('users/show', Acct.parse(result));
|
||||
const usernamePromise = os.api('users/show', Misskey.acct.parse(result));
|
||||
const idPromise = os.api('users/show', { userId: result });
|
||||
let _notFound = false;
|
||||
const notFound = () => {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { ComputedRef, inject, isRef, onActivated, onMounted, provide, ref, Ref } from 'vue';
|
||||
|
||||
export const setPageMetadata = Symbol('setPageMetadata');
|
||||
@@ -13,8 +13,8 @@ export type PageMetadata = {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
icon?: string | null;
|
||||
avatar?: misskey.entities.User | null;
|
||||
userName?: misskey.entities.User | null;
|
||||
avatar?: Misskey.entities.User | null;
|
||||
userName?: Misskey.entities.User | null;
|
||||
};
|
||||
|
||||
export function definePageMetadata(metadata: PageMetadata | null | Ref<PageMetadata | null> | ComputedRef<PageMetadata | null>): void {
|
||||
|
@@ -4,14 +4,14 @@
|
||||
*/
|
||||
|
||||
import { ref } from 'vue';
|
||||
import { DriveFile } from 'misskey-js/built/entities';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import * as os from '@/os';
|
||||
import { useStream } from '@/stream';
|
||||
import { i18n } from '@/i18n';
|
||||
import { defaultStore } from '@/store';
|
||||
import { uploadFile } from '@/scripts/upload';
|
||||
|
||||
export function chooseFileFromPc(multiple: boolean, keepOriginal = false): Promise<DriveFile[]> {
|
||||
export function chooseFileFromPc(multiple: boolean, keepOriginal = false): Promise<Misskey.entities.DriveFile[]> {
|
||||
return new Promise((res, rej) => {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
@@ -38,7 +38,7 @@ export function chooseFileFromPc(multiple: boolean, keepOriginal = false): Promi
|
||||
});
|
||||
}
|
||||
|
||||
export function chooseFileFromDrive(multiple: boolean): Promise<DriveFile[]> {
|
||||
export function chooseFileFromDrive(multiple: boolean): Promise<Misskey.entities.DriveFile[]> {
|
||||
return new Promise((res, rej) => {
|
||||
os.selectDriveFile(multiple).then(files => {
|
||||
res(files);
|
||||
@@ -46,7 +46,7 @@ export function chooseFileFromDrive(multiple: boolean): Promise<DriveFile[]> {
|
||||
});
|
||||
}
|
||||
|
||||
export function chooseFileFromUrl(): Promise<DriveFile> {
|
||||
export function chooseFileFromUrl(): Promise<Misskey.entities.DriveFile> {
|
||||
return new Promise((res, rej) => {
|
||||
os.inputText({
|
||||
title: i18n.ts.uploadFromUrl,
|
||||
@@ -79,7 +79,7 @@ export function chooseFileFromUrl(): Promise<DriveFile> {
|
||||
});
|
||||
}
|
||||
|
||||
function select(src: any, label: string | null, multiple: boolean): Promise<DriveFile[]> {
|
||||
function select(src: any, label: string | null, multiple: boolean): Promise<Misskey.entities.DriveFile[]> {
|
||||
return new Promise((res, rej) => {
|
||||
const keepOriginal = ref(defaultStore.state.keepOriginalUploading);
|
||||
|
||||
@@ -106,10 +106,10 @@ function select(src: any, label: string | null, multiple: boolean): Promise<Driv
|
||||
});
|
||||
}
|
||||
|
||||
export function selectFile(src: any, label: string | null = null): Promise<DriveFile> {
|
||||
export function selectFile(src: any, label: string | null = null): Promise<Misskey.entities.DriveFile> {
|
||||
return select(src, label, false).then(files => files[0]);
|
||||
}
|
||||
|
||||
export function selectFiles(src: any, label: string | null = null): Promise<DriveFile[]> {
|
||||
export function selectFiles(src: any, label: string | null = null): Promise<Misskey.entities.DriveFile[]> {
|
||||
return select(src, label, true);
|
||||
}
|
||||
|
@@ -3,8 +3,6 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/// <reference types="@testing-library/jest-dom"/>
|
||||
|
||||
export async function tick(): Promise<void> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
await new Promise((globalThis.requestIdleCallback ?? setTimeout) as never);
|
||||
|
@@ -4,13 +4,13 @@
|
||||
*/
|
||||
|
||||
import { onUnmounted, Ref } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { useStream } from '@/stream';
|
||||
import { $i } from '@/account';
|
||||
|
||||
export function useNoteCapture(props: {
|
||||
rootEl: Ref<HTMLElement>;
|
||||
note: Ref<misskey.entities.Note>;
|
||||
note: Ref<Misskey.entities.Note>;
|
||||
isDeletedRef: Ref<boolean>;
|
||||
}) {
|
||||
const note = props.note;
|
||||
|
Reference in New Issue
Block a user