joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Desktop: Add Email to note to a new Joplin Cloud tab in the Settings screen

Open pedr opened this issue 1 year ago • 1 comments

Related to feature https://github.com/laurent22/joplin/issues/8459

We are adding a Joplin Cloud new tab in the Settings screen that will allow the Joplin Cloud users to copy their own inbox email addresses.

image

Functionality:

When the Joplin Cloud target is selected for synchronization we will show a new tab in the settings screen that will reference any settings that may involve Joplin Cloud.

For now, we will have only one section called Email to Note where the Joplin Cloud user will be able to copy the inbox email.

Every time the users open the Settings screen and the Joplin Cloud tab is visible we will check if the emailToNote.inboxEmail property was set in the application state, if it was not we will make a request to the server to try to get this information.

Testing:

  • Should only show the Joplin Cloud tab when Joplin Cloud is selected as a synchronization target.
  • Should only make a request if Joplin Cloud tab is visible and the property emailToNote.inboxEmail still is an empty string.
  • The button Copy to clipboard should copy the inbox email to the clipboard.
  • If the user is not able to connect to Joplin Cloud the email field will be empty.

pedr avatar Jul 12 '23 18:07 pedr

Looks good to me. Can you confirm it's ready to merge @pedr?

laurent22 avatar Jul 14 '23 13:07 laurent22

I added all the code to this PR, I just need to update the description.

The 30s for the first request is not really ideal. The problem is that we need the api.userId, but the only way to load the userId is if we already made a request to the session. I'm going to try to look into how to do that.

pedr avatar Jul 14 '23 21:07 pedr