Feature: show quota in debug panel

This commit is contained in:
Pieter Vander Vennet 2025-04-06 00:30:59 +02:00
parent c4f0e18b9e
commit 722f7e86cc
2 changed files with 24 additions and 4 deletions

View file

@ -1150,6 +1150,16 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
return hours + ":" + Utils.TwoDigits(minutes) + ":" + Utils.TwoDigits(seconds)
}
public static toHumanByteSize(bytes: number): string {
const scale = ["b", "KB", "MB", "GB", "TB"] as const
let i = 0
while (bytes > 1000) {
bytes = bytes / 1000
i++
}
return Math.round(bytes) + scale[i]
}
public static HomepageLink(): string {
if (typeof window === "undefined") {
return "https://mapcomplete.org"