refactor
This commit is contained in:
parent
5c80d9093b
commit
151586ab60
4 changed files with 79 additions and 72 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue