mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-24 20:54:13 +02:00
enable and fix no-unused-vars and no-async-promise-executor (#17070)
* dev: set --no-bail for lint task * lint: enable no-async-promise-executor lint and fix them * lint: enable no-unused-vars with allowing _ prefix * lint: fix semi
This commit is contained in:
@@ -780,7 +780,7 @@ export function chooseFileFromPc(
|
||||
});
|
||||
}
|
||||
|
||||
export function launchUploader(
|
||||
export async function launchUploader(
|
||||
files: File[],
|
||||
options?: {
|
||||
folderId?: string | null;
|
||||
@@ -788,9 +788,10 @@ export function launchUploader(
|
||||
features?: UploaderFeatures;
|
||||
},
|
||||
): Promise<Misskey.entities.DriveFile[]> {
|
||||
return new Promise(async (res, rej) => {
|
||||
return new Promise((res, rej) => {
|
||||
if (files.length === 0) return rej();
|
||||
const { dispose } = await popupAsyncWithDialog(import('@/components/MkUploaderDialog.vue').then(x => x.default), {
|
||||
let dispose: () => void;
|
||||
popupAsyncWithDialog(import('@/components/MkUploaderDialog.vue').then(x => x.default), {
|
||||
files: markRaw(files),
|
||||
folderId: options?.folderId,
|
||||
multiple: options?.multiple,
|
||||
@@ -801,7 +802,7 @@ export function launchUploader(
|
||||
res(driveFiles);
|
||||
},
|
||||
closed: () => dispose(),
|
||||
});
|
||||
}).then(d => dispose = d.dispose, rej);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user