Commit Graph

14 Commits

Author SHA1 Message Date
Michel Weststrate
91d96774f6 Move files to flipper-common
Summary: Moved Logger, sleep, timeout and server contract types to flipper-common packages.

Reviewed By: passy

Differential Revision: D31475790

fbshipit-source-id: 42d2147698875f9e919ad5250f9953f3bff3ec2d
2021-10-12 16:00:52 -07:00
Pascal Hartig
7dd9cce9f2 Wire up logger
Summary:
Splitting this up into the wiring and the actual usage.
This just ensures we have a logger in place for handling
deeplinks.

Reviewed By: mweststrate

Differential Revision: D31337457

fbshipit-source-id: b088a7396e38554a87502ba7d5669dbef1b398d7
2021-10-01 08:08:36 -07:00
Pascal Hartig
1b8da297e3 Fix Flipper lints #2
Summary: Per title.

Reviewed By: timur-valiev

Differential Revision: D30843077

fbshipit-source-id: 1a3f4757518610b8caf41c62af7e27723d0de8d6
2021-09-13 02:32:07 -07:00
Lorenzo Blasa
977cc7598e RSocket and WebSocket
Summary:
Enable Flipper Desktop to run both RSocket and WebSocket servers.

I've used 'alt' ports and/or server instead of tying the name explicitly to web sockets. This more general approach can be used later on to supply and use an alternative socket pair for other usages.

Reviewed By: fabiomassimo

Differential Revision: D30482531

fbshipit-source-id: a2c5f25b925c731e7970614b5ed987ce00219918
2021-09-10 10:06:05 -07:00
Michel Weststrate
5e8c968222 Move devices to server folder
Summary:
This is the first of many diffs that extracts the connection, device, client detection out of the flipper core, to create a reusable flipper-server library that can be used in e.g. flipper-dump.

To keep diffs a little smaller, the current connection logic is first moved to the `server/` directory, and decoupled manually from the rest of the core, before moving it over to a separate package.

This first diffs moves the `comms/`, `devices/` and certificate utilities to the `server` directory.

Further untangling will follow in next diffs

Reviewed By: timur-valiev

Differential Revision: D30246551

fbshipit-source-id: c84259bfb1239119b3267a51b015e30c3c080866
2021-08-12 05:43:43 -07:00
Michel Weststrate
8d7caa9dd4 Introduce Dialog.alert
Summary: Introduce `Dialog.alert` to show users a FYI message, and be able to wait for it to be handled, as utility around several `Modal` utilities.

Reviewed By: jknoxville

Differential Revision: D29875484

fbshipit-source-id: 5d2ea83e486631ac18a81800b467f97dfaac6d34
2021-08-10 13:24:23 -07:00
Michel Weststrate
860f723521 Make deeplinks manual- and unittestable
Summary: This diff makes sure we can manually & unit tests deeplinks more easily, by introducing a dialog in which a deeplink can be entered manually and extracting deeplink handling logic from the application dispatcher.

Reviewed By: jknoxville

Differential Revision: D29760933

fbshipit-source-id: 0fc8f577204ecdd278716853b87786557a6e2194
2021-07-22 04:17:45 -07:00
Anton Nikolaev
fff489091e Paste oauth token using deeplink
Reviewed By: passy

Differential Revision: D28790868

fbshipit-source-id: 6a22809444462af15915fa4f06e76e64ebb7f590
2021-06-02 11:30:37 -07:00
Anton Nikolaev
eabf0fc340 Fix native window objects leak after refreshes
Summary:
It looks like electron creates new native window object after each window refresh, but we hold previous objects because of listeners attached to them. In dev mode, Electron signalises about that in console log each time when window is focused / blured after refresh:
```
Attempting to call a function in a renderer window that has been closed or released.
Function provided here: init-fast-refresh.bundle?platform=web&dev=true&minify=false:800356:19
```

Reviewed By: passy

Differential Revision: D27619305

fbshipit-source-id: 51d1590903a37dba721fb7a711fdebb9f0034b98
2021-04-07 05:52:27 -07:00
Michel Weststrate
163799cf89 Fix exception that happens on focus change
Summary:
Fixing the previous resulted in a next exception, where blur / focus might be triggered directly as side effect of some running logic. I think this happens when entering a debugger statement causing the window to loose focus in favor of the devtools.

Wrapped the logic in setImmediate to make sure that it runs on its own stack, since this will prevent any potential future issues with programmatically focussing / blurring as well.

Reviewed By: jknoxville

Differential Revision: D26814270

fbshipit-source-id: 5ca430653a219d3c98d8bf925277de67d8a9eb20
2021-03-04 06:01:48 -08:00
Pritesh Nandgaonkar
513414de04 Make integration of new groups simpler
Summary: This diff simplifies the way new groups can be added into the Support form. Users will have to just make an entry in constants folder, thats it. It will automatically be added into the support form.

Reviewed By: jknoxville

Differential Revision: D21257033

fbshipit-source-id: 8823855c7a7732862a964fc17fa7311512b861db
2020-04-29 05:41:46 -07:00
Michel Weststrate
60ddad7e08 Fix deeplink parsing issue and device plugin highlighting
Summary:
This diff fixes an issue where the selected device was not correctly updated when selecting a device plugin, causing the wrong plugin, or none at all, to be highlighted.

This diff fixes an issue where deeplinks were not correctly parsed if formatted as shown in the test plan of D20920587 (it was a different format in the recording, but after looking into it, using `plugin?params` instead of `plugin/?params` is the natural thing to do, so we now support both)

Reviewed By: jknoxville

Differential Revision: D21154190

fbshipit-source-id: c31132aaf7213ee1c3c188a6a1cf2b6bcc7b5b00
2020-04-21 06:33:25 -07:00
Pascal Hartig
fc9ed65762 prettier 2
Summary:
Quick notes:

- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.

Close https://github.com/facebook/flipper/pull/915

Reviewed By: jknoxville

Differential Revision: D20594929

fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
2020-03-24 09:38:11 -07:00
Anton Nikolaev
863f89351e Yarn workspaces
Summary:
1) moved "sonar/desktop/src" to "sonar/desktop/app/src", so "app" is now a separate package containing the core Flipper app code
2) Configured yarn workspaces with the root in "sonar/desktop": app, static, pkg, doctor, headless-tests. Plugins are not included for now, I plan to do this later.

Reviewed By: jknoxville

Differential Revision: D20535782

fbshipit-source-id: 600b2301960f37c7d72166e0d04eba462bec9fc1
2020-03-20 13:37:41 -07:00