add bitacora page, self-hosted fonts/icons, review fixes for the install package

This commit is contained in:
Roberto Treviño Cervantes
2026-10-30 11:19:34 -06:00
parent 8c63ed83ac
commit f4d2a3e85f
39 changed files with 275 additions and 721 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ export interface ImportSourcePayload extends SourceLocator {
defaults?: Record<string, unknown>;
}
// -- documents -----------------------------------------------------------------
// Clinical documents
export type OcrMode = 'auto' | 'always' | 'never';
+10 -8
View File
@@ -1,10 +1,12 @@
/** Base64 of a File's bytes, for JSON endpoints that carry a file. */
export async function fileToBase64(file: Blob): Promise<string> {
const bytes = new Uint8Array(await file.arrayBuffer());
const chunk = 0x8000;
let binary = '';
for (let i = 0; i < bytes.length; i += chunk) {
binary += String.fromCharCode(...bytes.subarray(i, i + chunk));
}
return btoa(binary);
export function fileToBase64(file: Blob): Promise<string> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = () => {
const dataUrl = reader.result as string;
resolve(dataUrl.slice(dataUrl.indexOf(',') + 1));
};
reader.onerror = () => reject(reader.error);
reader.readAsDataURL(file);
});
}