visual fixes

This commit is contained in:
jhartworks
2026-07-07 10:37:26 +02:00
parent 2c055fcb63
commit 7a1fe401f2
5 changed files with 77306 additions and 24 deletions
+3
View File
@@ -31,6 +31,7 @@ export const DEFAULT_UNIT_DEFINITIONS = [
{ symbol: "V", label: "Volt", isSystem: true },
{ symbol: "A", label: "Ampere", isSystem: true },
{ symbol: "Pa", label: "Pascal", isSystem: true },
{ symbol: "bool", label: "Digital / Bool", isSystem: true },
];
function safeParse(jsonValue) {
@@ -267,6 +268,7 @@ export async function getPreferences(redis, userId) {
theme: "system",
csvDelimiter: ";",
sidebarPinned: true,
trendLineWidth: 1.8,
};
}
@@ -278,6 +280,7 @@ export async function savePreferences(redis, userId, preferences) {
theme: preferences.theme || current.theme || "system",
csvDelimiter: preferences.csvDelimiter || current.csvDelimiter || ";",
sidebarPinned: typeof preferences.sidebarPinned === "boolean" ? preferences.sidebarPinned : current.sidebarPinned,
trendLineWidth: Number.isFinite(Number(preferences.trendLineWidth)) ? Number(preferences.trendLineWidth) : Number(current.trendLineWidth || 1.8),
updatedAt: new Date().toISOString(),
};
await redis.set(`preferences:${userId}`, JSON.stringify(payload));