fix(cv): make profile saves atomic

This commit is contained in:
cesnimda
2026-08-29 23:12:33 +02:00
parent 487c5f59a9
commit 8288923e5d
8 changed files with 127 additions and 27 deletions
+5
View File
@@ -176,6 +176,11 @@ export function getCvPageCount(contentHeightPx: number, pageHeightPx: number): n
return Math.max(1, Math.ceil(Math.max(0, contentHeightPx - 2) / pageHeightPx));
}
export function normalizeCvLanguage(language?: string | null): string {
const normalized = language?.trim().toLowerCase();
return normalized === "no" || normalized === "nb" || normalized === "nb-no" ? "nb-NO" : normalized || "en";
}
export function emptyCvVariantSettings(themeId = "modern"): CvVariantSettings {
return {
themeId,