Merge branch 'develop' into fix-7311

This commit is contained in:
かっこかり 2024-11-05 15:15:52 +09:00 committed by GitHub
commit 0f7ee33201
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
877 changed files with 33614 additions and 11918 deletions

View file

@ -88,7 +88,7 @@ export function chooseFileFromUrl(): Promise<Misskey.entities.DriveFile> {
});
}
function select(src: any, label: string | null, options?: SelectFileOptions): Promise<Misskey.entities.DriveFile[]> {
function select(src: HTMLElement | EventTarget | null, label: string | null, options?: SelectFileOptions): Promise<Misskey.entities.DriveFile[]> {
const _options = deepMerge(options ?? {}, {
multiple: false,
@ -124,10 +124,10 @@ function select(src: any, label: string | null, options?: SelectFileOptions): Pr
});
}
export function selectFile(src: any, label: string | null = null, options?: { excludeSensitive?: boolean; additionalMenu?: MenuItem[]; }): Promise<Misskey.entities.DriveFile> {
export function selectFile(src: HTMLElement | EventTarget | null, label: string | null = null, options?: { excludeSensitive?: boolean; additionalMenu?: MenuItem[]; }): Promise<Misskey.entities.DriveFile> {
return select(src, label, { ...(options ? options : {}), multiple: false }).then(files => files[0]);
}
export function selectFiles(src: any, label: string | null = null, options?: { excludeSensitive?: boolean; additionalMenu?: MenuItem[]; }): Promise<Misskey.entities.DriveFile[]> {
export function selectFiles(src: HTMLElement | EventTarget | null, label: string | null = null, options?: { excludeSensitive?: boolean; additionalMenu?: MenuItem[]; }): Promise<Misskey.entities.DriveFile[]> {
return select(src, label, { ...(options ? options : {}), multiple: true });
}