fix: show the "Set as default mail app" button only if possible to register the protocol handler - #13416
fix: show the "Set as default mail app" button only if possible to register the protocol handler#13416madbob wants to merge 1 commit into
Conversation
| :open.sync="showSettings"> | ||
| <NcAppSettingsSection id="general" :name="t('mail', 'General')"> | ||
| <NcButton | ||
| v-if="canRegisterProtocolHandler" |
There was a problem hiding this comment.
I'd say we should also have a v-else block explaining why it's not possible to register the app as handler.
There was a problem hiding this comment.
I've added an extra check about the protocol, which is the only case that can be tested.
If window.navigator.registerProtocolHandler is not defined it may also depend by the browser not supporting the registration of apps, ungranted permissions, blocking extensions, or any other untestable condition.
Please check my copy about the warning notices: you know I'm very bad writer!
…gister the protocol handler Signed-off-by: Roberto Guido <info@madbob.org>
ee7c7cb to
03dcd95
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Minor fix: in the Settings panel, display the "Set as default mail app" button only if
registerProtocolHandleris available.Not all browsers support this, and it is required a secure context (HTTPS) to actually register a protocol handler.