mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-10-23 15:02:28 +00:00
add warning for spacebar users
This commit is contained in:
1 parent
a0f21a47cb
commit
e7071a0cd2
2 files changed
+3
-1
No files matched your search
@@ -50,6 +50,7 @@ import {PromiseLock} from "./utils/promiseLock.js";
|
||||
import {CDNParams} from "./utils/cdnParams.js";
|
||||
import {SnowFlake} from "./snowflake.js";
|
||||
import {trimTrailingSlashes} from "./utils/netUtils.js";
|
||||
import {Versions} from "./versions.js";
|
||||
type traceObj = {
|
||||
micros: number;
|
||||
calls?: (string | traceObj)[];
|
||||
@@ -294,6 +295,7 @@ class Localuser {
|
||||
|
||||
if (this.perminfo.user.disableColors === undefined) this.perminfo.user.disableColors = true;
|
||||
this.updateTranslations();
|
||||
Versions.makeVersion(this.info.api, "start");
|
||||
}
|
||||
favorites!: Favorites;
|
||||
readysup = false;
|
||||
|
||||
@@ -9,7 +9,6 @@ export class Versions {
|
||||
private static warned = false;
|
||||
private showWarn(text: string) {
|
||||
//TODO enable this once the version endpoint is up and running
|
||||
return;
|
||||
if (Versions.warned) return;
|
||||
Versions.warned = true;
|
||||
const d = new Dialog("");
|
||||
@@ -31,6 +30,7 @@ export class Versions {
|
||||
}
|
||||
}
|
||||
static async makeVersion(api: string, place: "regi" | "start"): Promise<Versions> {
|
||||
if (!api.includes("spacebar.chat")) return new Versions();
|
||||
const p = await fetch(api + "/harmony/version");
|
||||
if (!p.ok) {
|
||||
const v = new Versions();
|
||||
|
||||
Reference in new issue
Block a user