feat(react/ribbon): port note info tab

This commit is contained in:
Elian Doran
2025-08-22 18:23:54 +03:00
parent 70728c274e
commit 77551b1fed
10 changed files with 148 additions and 181 deletions

View File

@@ -185,7 +185,11 @@ export function escapeQuotes(value: string) {
return value.replaceAll('"', """);
}
function formatSize(size: number) {
export function formatSize(size: number | null | undefined) {
if (size === null || size === undefined) {
return "";
}
size = Math.max(Math.round(size / 1024), 1);
if (size < 1024) {