Merge pull request #567 from PR0M3TH3AN/codex/add-is_dev_mode-export-in-config

Expose dev mode flag via instance config
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2025-10-15 10:47:23 -04:00
commit 08d770162b
2 files changed
+17 -1

No files matched your search

+10
View File
@@ -13,6 +13,16 @@
// adjustments are safe. When in doubt, mirror the structure shown here so other
// contributors can follow along.
/**
* Whether the current deployment should enable developer-centric behavior.
*
* When `true`, bitvid surfaces extra logging, debug helpers, and experimental
* UI affordances intended for development environments. Set the value to
* `false` before deploying to production so that end users receive the stable
* experience. Downstream modules read this flag via `js/config.js`.
*/
export const IS_DEV_MODE = true;
/**
* The primary administrator for this bitvid instance.
*
+7 -1
View File
@@ -1,6 +1,7 @@
// js/config.js
import {
IS_DEV_MODE,
ADMIN_SUPER_NPUB,
ADMIN_DM_IMAGE_URL,
BITVID_WEBSITE_URL,
@@ -26,7 +27,12 @@ import {
ENSURE_PRESENCE_REBROADCAST_COOLDOWN_SECONDS,
} from "../config/instance-config.js";
export const isDevMode = true; // Set to false for production
export const isDevMode = Boolean(IS_DEV_MODE);
export { IS_DEV_MODE };
if (typeof window !== "undefined") {
window.__BITVID_DEV_MODE__ = isDevMode;
}
// -----------------------------------------------------------------------------
// Admin governance — production defaults rely on remote Nostr lists