refactor
This commit is contained in:
@@ -19,6 +19,7 @@ import MkContextMenu from '@/components/MkContextMenu.vue';
|
||||
import { MenuItem } from '@/types/menu';
|
||||
import copyToClipboard from './scripts/copy-to-clipboard';
|
||||
import { showMovedDialog } from './scripts/show-moved-dialog';
|
||||
import { DriveFile } from 'misskey-js/built/entities';
|
||||
|
||||
export const openingWindowsCount = ref(0);
|
||||
|
||||
@@ -420,7 +421,7 @@ export async function selectUser(opts: { includeSelf?: boolean } = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function selectDriveFile(multiple: boolean) {
|
||||
export async function selectDriveFile(multiple: boolean): Promise<DriveFile[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), {
|
||||
type: 'file',
|
||||
@@ -428,7 +429,7 @@ export async function selectDriveFile(multiple: boolean) {
|
||||
}, {
|
||||
done: files => {
|
||||
if (files) {
|
||||
resolve(multiple ? files : files[0]);
|
||||
resolve(files);
|
||||
}
|
||||
},
|
||||
}, 'closed');
|
||||
|
Reference in New Issue
Block a user