From 2cd2d1ccfbf8efccfa85b0258835d84b672104b7 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Fri, 20 Oct 2017 00:23:19 -0700 Subject: [PATCH] In Snap, link to instructions instead of showing check for default client --- .../lib/tabs/workspace-section.jsx | 21 ++++++++++++++++++- app/src/default-client-helper.es6 | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/internal_packages/preferences/lib/tabs/workspace-section.jsx b/app/internal_packages/preferences/lib/tabs/workspace-section.jsx index 1d8d98348..d9c3d5754 100644 --- a/app/internal_packages/preferences/lib/tabs/workspace-section.jsx +++ b/app/internal_packages/preferences/lib/tabs/workspace-section.jsx @@ -1,17 +1,21 @@ import React from 'react'; import PropTypes from 'prop-types'; import { DefaultClientHelper, SystemStartService } from 'mailspring-exports'; +import { shell } from 'electron'; + import ConfigSchemaItem from './config-schema-item'; class DefaultMailClientItem extends React.Component { constructor() { super(); - this.state = { defaultClient: false }; this._helper = new DefaultClientHelper(); if (this._helper.available()) { + this.state = { defaultClient: false }; this._helper.isRegisteredForURLScheme('mailto', registered => { if (this._mounted) this.setState({ defaultClient: registered }); }); + } else { + this.state = { defaultClient: 'unknown' }; } } @@ -35,6 +39,21 @@ class DefaultMailClientItem extends React.Component { }; render() { + if (this.state.defaultClient === 'unknown') { + return ( +
+
+ shell.openExternal('https://foundry376.zendesk.com/hc/en-us/articles/115002281851')} + > + Use Mailspring as default mail client +
+
+ ); + } + return (