From 044991a93fbd5be79ec2207f4430f289b88cbadb Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Wed, 29 Jan 2020 06:21:03 -0800 Subject: [PATCH] LogBox - Add build version and open in browser Summary: Adds build version and an onPress for the build info. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D19334440 fbshipit-source-id: b201b630086179faca31a08c62019a2019cedf4f --- Libraries/LogBox/Data/LogBoxData.js | 1 + .../LogBox/UI/LogBoxInspectorCodeFrame.js | 22 ++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Libraries/LogBox/Data/LogBoxData.js b/Libraries/LogBox/Data/LogBoxData.js index 83e64356fac..1076d26661f 100644 --- a/Libraries/LogBox/Data/LogBoxData.js +++ b/Libraries/LogBox/Data/LogBoxData.js @@ -60,6 +60,7 @@ export type WarningFilter = (format: string) => WarningInfo; type AppInfo = $ReadOnly<{| appVersion: string, engine: string, + onPress?: ?() => void, |}>; const observers: Set<{observer: Observer, ...}> = new Set(); diff --git a/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js b/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js index b9e8f483c1d..2c4e1036a17 100644 --- a/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +++ b/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js @@ -87,9 +87,19 @@ function AppInfo() { } return ( - - {appInfo.appVersion} ({appInfo.engine}) - + + + {appInfo.appVersion} ({appInfo.engine}) + + ); } @@ -98,8 +108,14 @@ const appInfoStyles = StyleSheet.create({ color: LogBoxStyle.getTextColor(0.4), fontSize: 12, lineHeight: 12, + }, + buildButton: { flex: 0, flexGrow: 0, + paddingVertical: 4, + paddingHorizontal: 5, + borderRadius: 5, + marginRight: -8, }, });