Use numeral.js to format memory, allow use of GiB with an option

numeral.js has a formatter for both kilobyte and kibibyte, so why use a custom formatter that only goes up to exabyte?
Also added a setting to allow people who really want to see GiB to enable that, even if it doesn't make sense.
This commit is contained in:
ErzengelLichtes
2021-12-29 15:51:59 -08:00
parent b578e09986
commit 8f3da16ecf
3 changed files with 30 additions and 5 deletions
+7
View File
@@ -113,6 +113,11 @@ interface IDefaultSettings {
* Theme colors
*/
theme: ITheme;
/*
* Use GiB instead of GB
*/
UseIEC60027_2: boolean;
}
/**
@@ -160,6 +165,7 @@ export const defaultSettings: IDefaultSettings = {
SuppressBladeburnerPopup: false,
SuppressTIXPopup: false,
SuppressSavedGameToast: false,
UseIEC60027_2: false,
theme: defaultTheme,
};
@@ -192,6 +198,7 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = {
SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,
SuppressTIXPopup: defaultSettings.SuppressTIXPopup,
SuppressSavedGameToast: defaultSettings.SuppressSavedGameToast,
UseIEC60027_2: defaultSettings.UseIEC60027_2,
MonacoTheme: "monokai",
MonacoInsertSpaces: false,
MonacoFontSize: 20,