Twake
Twake copied to clipboard
DesktopLink::Open desktop app if Twake link
Related user story: https://www.notion.so/linagora/Message-link-Design-2ab5fe13c41a49b991145ac381ce1981
Additional information about the UI/UX:
-
If the desktop app is installed on the computer, then we'll display a white page with Twake logo in the center and the text "Opened in Twake app"
-
After 5 seconds a link "Open here instead" appear, clicking on it this will enforce opening Twake in the browser
-
In this image:
Text.Title
and a@atom/link
inside aText.Base
no css file is needed, all can be done with tailwindcss. Logo component must be created, image for this logo are available here: https://github.com/linagora/Twake-Desktop/tree/master/static/icons/png
Technical information
-
The desktop app repository is here: https://github.com/linagora/Twake-Desktop
-
Here is a documentation to implement deep link in electron app: https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app
-
[ ] We should take this opportunity to update electron libraries
-
[ ] Once electron app is configured for a specific deep link scheme (we'll use
twake://
) then any browser will be able to open the app from this scheme. Here is an implementation example:
try {
document.location = document.location.replace(/^https?:\/\//, "twake://");
//TODO: show the blank page described in UI/UX section
}catch(err){
//The app is not installed yet
//TODO Twake should open as usual
}
- [ ] We of course need on the electron side to detect deep link opening and redirect the user to the right url.
Notes:
- [ ] The centered components of this white page must all be atoms (logo => to be created, title, link), for each of them, please create the corresponding storybook story
Hi @rezk2ll ! MacOS When you use Safari to follow the link to a message, there is never-ending download of the page and once you switch to a different page and then come back, you instantly see a pop-up from your device and “Open in Web instead” When you use Chrome, there is no blank page suggesting to open the page in Web at all https://images.zenhubusercontent.com/271994210/f10ced9f-108d-412f-b6a8-0863a3f457f6/untitled45.mp4 https://images.zenhubusercontent.com/271994210/2b6c9260-1122-4ee3-8f9f-875230a21b53/vid_20220907_093512_jgzx3kbh.mp4