Merge branch 'v26'

This commit is contained in:
evanpelle
2025-11-07 19:54:27 -08:00
14 changed files with 22 additions and 417 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { GameView } from "../../../core/game/GameView";
import { Layer } from "./Layer";
const AD_SHOW_TICKS = 60 * 10; // 1 minute
const AD_SHOW_TICKS = 2 * 60 * 10; // 2 minutes
export class AdTimer implements Layer {
private isHidden: boolean = false;
+4
View File
@@ -225,6 +225,7 @@ export async function postRefresh(): Promise<boolean> {
// Refresh the JWT
const response = await fetch(getApiBase() + "/refresh", {
method: "POST",
credentials: "include",
headers: {
authorization: `Bearer ${token}`,
},
@@ -242,6 +243,9 @@ export async function postRefresh(): Promise<boolean> {
return false;
}
localStorage.setItem("token", result.data.token);
// Clear the cached logged in state
// so that the next call to isLoggedIn() will refresh the token
__isLoggedIn = undefined;
return true;
} catch (e) {
__isLoggedIn = false;