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,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user