border test 9000

This commit is contained in:
scamiv
2026-05-26 20:21:58 +02:00
parent 99e7d36464
commit 06eb82b1cf
9 changed files with 186 additions and 10 deletions
+18
View File
@@ -123,6 +123,20 @@ export class UserSettings {
this.setCached(key, value.toString());
}
getInt(key: string, defaultValue: number): number {
const value = localStorage.getItem(key);
if (!value) return defaultValue;
const intValue = parseInt(value, 10);
if (!Number.isFinite(intValue)) return defaultValue;
return intValue;
}
setInt(key: string, value: number): void {
localStorage.setItem(key, Math.trunc(value).toString());
}
emojis() {
return this.getBool("settings.emojis", true);
}
@@ -174,6 +188,10 @@ export class UserSettings {
);
}
territoryBorderMode(): number {
return this.getInt("settings.territoryBorderMode", 1);
}
cursorCostLabel() {
const legacy = this.getBool("settings.ghostPricePill", true);
return this.getBool("settings.cursorCostLabel", legacy);