mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 11:28:13 +03:00
Remove REACT_APP_MANDATE_LOGIN
This commit is contained in:
@@ -20,6 +20,5 @@ pnpm start
|
||||
# .env
|
||||
REACT_APP_TCHIC_MODE="omni" # "btchi" or "ktchi", in prod
|
||||
REACT_APP_API_URL="wherever the related tachi-server is hosted."
|
||||
# REACT_APP_MANDATE_LOGIN="true" # Whether to mandate logins or not. This should be "true" for ktchi, and false for btchi.
|
||||
```
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { StaticConfig } from "tachi-common";
|
||||
export const mode = process.env.REACT_APP_TCHIC_MODE;
|
||||
|
||||
if (!mode) {
|
||||
throw new Error("No TCHIC_MODE set. Cannot boot.");
|
||||
throw new Error("No REACT_APP_TCHIC_MODE set in Process Environment, refusing to boot.");
|
||||
}
|
||||
|
||||
let conf;
|
||||
@@ -25,11 +25,11 @@ if (mode === "ktchi") {
|
||||
primary: "#e61c6e",
|
||||
};
|
||||
} else {
|
||||
throw new Error(`Invalid TCHIC_MODE of ${mode}. Cannot boot.`);
|
||||
throw new Error("Invalid REACT_APP_TCHIC_MODE. Expected ktchi, btchi or omni.");
|
||||
}
|
||||
|
||||
export const TachiConfig = conf;
|
||||
export const ColourConfig = colourConf;
|
||||
export const ClientConfig = {
|
||||
MANDATE_LOGIN: !!process.env.REACT_APP_MANDATE_LOGIN,
|
||||
MANDATE_LOGIN: process.env.REACT_APP_TCHIC_MODE === "ktchi",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user