Replace launcher error bar with titlebar indicator

Summary:
When starting Flipper with `--launcher-msg`, it currently shows a red error bar at the bottom. That's not ideal for various reasons including it looking kinda bad and it only supporting a single error (the last one set).

This instead adds an action that shows an indicator next to the version at the top as we had it before with the previous system.

Reviewed By: danielbuechele

Differential Revision: D14778859

fbshipit-source-id: 28591de6262e090a4e59a7f5a8cd86d7b3abf8fe
This commit is contained in:
Pascal Hartig
2019-04-05 06:44:40 -07:00
committed by Facebook Github Bot
parent c6baeff5ed
commit ad4c2092a5
5 changed files with 85 additions and 7 deletions

View File

@@ -9,11 +9,13 @@ import type {ProcessConfig} from './processConfig.js';
import type {Store} from '../reducers/index.js';
export function initLauncherHooks(config: ProcessConfig, store: Store) {
// TODO(T40488739): This must be replaced with a proper display before launching this.
if (config.launcherMsg) {
store.dispatch({
type: 'SERVER_ERROR',
payload: config.launcherMsg,
type: 'LAUNCHER_MSG',
payload: {
severity: 'warning',
message: config.launcherMsg,
},
});
}
}