handle device / client absence for deeplinks
Summary: This diff makes the new deeplink format feature complete, make sure VPN connection, plugin installation, client & device selection are now all handled. See the test plan for examples. Changelog: Flipper now supports a richer protocol for opening deeplinks: https://fbflipper.com/docs/extending/deeplinks#open-plugin Reviewed By: timur-valiev Differential Revision: D30423809 fbshipit-source-id: e6cf4bf852b2c64e9a79a33ef0842eb27f68f840
This commit is contained in:
committed by
Facebook GitHub Bot
parent
846246ffae
commit
a2644b4a2e
@@ -72,7 +72,7 @@ export const Dialog = {
|
||||
}}
|
||||
okButtonProps={{
|
||||
disabled: opts.onValidate
|
||||
? opts.onValidate(currentValue) !== ''
|
||||
? !!opts.onValidate(currentValue) // non-falsy value means validation error
|
||||
: false,
|
||||
}}
|
||||
onCancel={cancel}
|
||||
@@ -175,11 +175,12 @@ export const Dialog = {
|
||||
message: React.ReactNode;
|
||||
options: {label: string; value: string}[];
|
||||
onConfirm?: (value: string) => Promise<string>;
|
||||
}): DialogResult<string> {
|
||||
}): DialogResult<string | false> {
|
||||
return Dialog.show<string>({
|
||||
...rest,
|
||||
defaultValue: '',
|
||||
onValidate: (value) => (value === '' ? 'Please select an option' : ''),
|
||||
defaultValue: undefined as any,
|
||||
onValidate: (value) =>
|
||||
value === undefined ? 'Please select an option' : '',
|
||||
children: (value, onChange) => (
|
||||
<Layout.Container gap style={{maxHeight: '50vh', overflow: 'auto'}}>
|
||||
<Typography.Text>{message}</Typography.Text>
|
||||
|
||||
Reference in New Issue
Block a user