Move constants to flipperConfig
Summary: Recently we have added a few constants to be used by our main entry point. This change moves them to a central place: flipperConfig. Reviewed By: aigoncharov Differential Revision: D51307088 fbshipit-source-id: 09f0ef0e69e2067ce5c8501367629eeec7523858
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0889a0e02d
commit
49abb4dd41
@@ -17,12 +17,12 @@ declare global {
|
||||
theme: 'light' | 'dark' | 'system';
|
||||
entryPoint: string;
|
||||
debug: boolean;
|
||||
GRAPH_SECRET: string;
|
||||
FLIPPER_APP_VERSION: string;
|
||||
FLIPPER_SESSION_ID: string;
|
||||
FLIPPER_UNIXNAME: string;
|
||||
FLIPPER_AUTH_TOKEN: string;
|
||||
};
|
||||
GRAPH_SECRET: string;
|
||||
FLIPPER_APP_VERSION: string;
|
||||
FLIPPER_SESSION_ID: string;
|
||||
FLIPPER_UNIXNAME: string;
|
||||
FLIPPER_AUTH_TOKEN: string;
|
||||
|
||||
flipperShowMessage?(message: {title?: string; detail?: string}): void;
|
||||
flipperHideMessage?(): void;
|
||||
|
||||
@@ -56,7 +56,7 @@ async function start() {
|
||||
let token = providerParams.get('token');
|
||||
if (!token) {
|
||||
console.info('[flipper-client][ui-browser] Get token from HTML instead');
|
||||
token = window.FLIPPER_AUTH_TOKEN;
|
||||
token = window.flipperConfig.FLIPPER_AUTH_TOKEN;
|
||||
if (!token || token === 'FLIPPER_AUTH_TOKEN_REPLACE_ME') {
|
||||
console.warn(
|
||||
'[flipper-client][ui-browser] Failed to get token from HTML',
|
||||
|
||||
Reference in New Issue
Block a user