chore(client/ts): port some dialogs

This commit is contained in:
Elian Doran
2025-03-15 22:14:21 +02:00
parent 1bf16bfa22
commit 182bccad39
5 changed files with 62 additions and 27 deletions

View File

@@ -6,15 +6,15 @@ import appContext from "../components/app_context.js";
import { t } from "./i18n.js";
interface UploadFilesOptions {
safeImport: boolean;
shrinkImages: boolean;
textImportedAsText: boolean;
codeImportedAsCode: boolean;
explodeArchives: boolean;
replaceUnderscoresWithSpaces: boolean;
safeImport?: boolean;
shrinkImages: "true" | "false";
textImportedAsText?: boolean;
codeImportedAsCode?: boolean;
explodeArchives?: boolean;
replaceUnderscoresWithSpaces?: boolean;
}
export async function uploadFiles(entityType: string, parentNoteId: string, files: string[], options: UploadFilesOptions) {
export async function uploadFiles(entityType: string, parentNoteId: string, files: string[] | File[], options: UploadFilesOptions) {
if (!["notes", "attachments"].includes(entityType)) {
throw new Error(`Unrecognized import entity type '${entityType}'.`);
}