From f446deb9387e0a14ca48fc9b2808fdf5a281322f Mon Sep 17 00:00:00 2001
From: Sucukdeluxe <259325684+Sucukdeluxe@users.noreply.github.com>
Date: Tue, 29 Sep 2026 11:32:15 +0200
Subject: [PATCH] Improve account storage readability and show used capacity
percentage
---
renderer/account-status.js | 6 +++++-
renderer/app.js | 2 +-
renderer/styles.css | 6 ++++--
scripts/verify-public-release.mjs | 1 +
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/renderer/account-status.js b/renderer/account-status.js
index 33894dc..a317716 100644
--- a/renderer/account-status.js
+++ b/renderer/account-status.js
@@ -62,7 +62,11 @@
const used = formatAmount(storage?.used);
const total = formatAmount(storage?.total);
if (!used || !total || storage.total.value <= 0) return null;
- return `${used} ${String(locale).startsWith('de') ? 'von' : 'of'} ${total}`;
+ const amountInBytes = amount => amount.value * (amount.unit.includes('I') ? 1024 : 1000) ** 'BKMGTPE'.indexOf(amount.unit[0]);
+ const percent = amountInBytes(storage.used) / amountInBytes(storage.total) * 100;
+ if (!Number.isFinite(percent)) return null;
+ const percentage = new Intl.NumberFormat(locale, { maximumFractionDigits: 1 }).format(percent);
+ return `${used} ${String(locale).startsWith('de') ? 'von' : 'of'} ${total} (${percentage}%)`;
}
const accountStatus = {
diff --git a/renderer/app.js b/renderer/app.js
index abe17eb..4eba96e 100644
--- a/renderer/app.js
+++ b/renderer/app.js
@@ -7614,7 +7614,7 @@ function _buildAccountCardHtml(name, account, idx) {
const checkLabel = statusPresentation.requiresOtp ? 'Neuen Code anfordern' : 'Prüfen';
const storageText = name === 'voe.sx' ? window.AccountStatus.formatAccountStorage(st.storage, getUiLocale()) : null;
const storageHtml = storageText
- ? `
${escapeHtml(localizeUiText('Speicher'))}: ${escapeHtml(storageText)}
`
+ ? `${escapeHtml(localizeUiText('Speicher'))}: ${escapeHtml(storageText)} `
: '';
const sessionPauseKey = `${name}:${account.id}`;
diff --git a/renderer/styles.css b/renderer/styles.css
index 4dc3a21..30aba02 100644
--- a/renderer/styles.css
+++ b/renderer/styles.css
@@ -1531,9 +1531,11 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
}
.account-card:hover { background: var(--bg-card-hover); }
.account-card-info { flex: 1; min-width: 0; }
-.account-card-storage { font-size: 12px; color: var(--text-muted); margin-top: 4px; overflow-wrap: anywhere; }
+.account-card-storage { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.5; color: var(--text-muted); margin-top: 4px; overflow-wrap: anywhere; }
+.account-card-storage > span { min-width: 0; }
+.account-storage-icon { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.account-card-title { font-size: 14px; font-weight: 600; }
-.account-card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.account-card-subtitle { font-size: 13px; line-height: 1.5; color: var(--text-muted); margin-top: 3px; overflow-wrap: anywhere; }
.account-otp-action { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.account-otp-input { width: 150px; min-height: 28px; padding: 5px 8px; font-size: 11px; }
.account-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
diff --git a/scripts/verify-public-release.mjs b/scripts/verify-public-release.mjs
index 73cd1ec..bd52280 100644
--- a/scripts/verify-public-release.mjs
+++ b/scripts/verify-public-release.mjs
@@ -69,6 +69,7 @@ const sourceFiles = [
'lib/upload-diagnostics.js',
'lib/upload-manager.js',
'lib/vidmoly-upload.js',
+ 'lib/voe-account-storage.js',
'lib/voe-upload.js',
'lib/webhook-notify.js',
'main.js',