Browse Source

Contact Support -> support, Github button -> github issues link

master
Gaëtan Renaudeau 7 years ago
parent
commit
0ca9a368d4
  1. 28
      src/components/RenderError.js
  2. 3
      src/config/urls.js
  3. 3
      static/i18n/en/app.yml

28
src/components/RenderError.js

@ -4,9 +4,9 @@ import React, { PureComponent } from 'react'
import styled from 'styled-components' import styled from 'styled-components'
import { openURL } from 'helpers/linking' import { openURL } from 'helpers/linking'
import { remote } from 'electron' import { remote } from 'electron'
import qs from 'querystring'
import { translate } from 'react-i18next' import { translate } from 'react-i18next'
import { urls } from 'config/urls'
import { i } from 'helpers/staticPath' import { i } from 'helpers/staticPath'
import hardReset from 'helpers/hardReset' import hardReset from 'helpers/hardReset'
@ -47,21 +47,12 @@ class RenderError extends PureComponent<
</IconWrapperCircle> </IconWrapperCircle>
) )
handleCreateIssue = () => { github = () => {
const { error } = this.props openURL(urls.githubIssues)
if (!error) {
return
} }
const q = qs.stringify({
title: `Error: ${error.message}`, contact = () => {
body: `Error was thrown: openURL(urls.contactSupport)
\`\`\`
${error.stack}
\`\`\`
`,
})
openURL(`https://github.com/LedgerHQ/ledger-live-desktop/issues/new?${q}`)
} }
handleRestart = () => { handleRestart = () => {
@ -105,8 +96,11 @@ ${error.stack}
{t('app:crash.restart')} {t('app:crash.restart')}
</Button> </Button>
<ExportLogsBtn withoutAppData={withoutAppData} /> <ExportLogsBtn withoutAppData={withoutAppData} />
<Button small primary onClick={this.handleCreateIssue}> <Button small primary onClick={this.contact}>
{t('app:crash.createTicket')} {t('app:crash.support')}
</Button>
<Button small primary onClick={this.github}>
{t('app:crash.github')}
</Button> </Button>
<Button small danger onClick={this.handleOpenHardResetModal}> <Button small danger onClick={this.handleOpenHardResetModal}>
{t('app:crash.reset')} {t('app:crash.reset')}

3
src/config/urls.js

@ -18,6 +18,9 @@ export const urls = {
recipientAddressInfo: 'https://support.ledgerwallet.com/hc/en-us/articles/360006433934', recipientAddressInfo: 'https://support.ledgerwallet.com/hc/en-us/articles/360006433934',
privacyPolicy: 'https://www.ledgerwallet.com/privacy-policy', privacyPolicy: 'https://www.ledgerwallet.com/privacy-policy',
githubIssues:
'https://github.com/LedgerHQ/ledger-live-desktop/issues?q=is%3Aopen+is%3Aissue+label%3Abug',
// Exchanges // Exchanges
coinbase: 'https://www.coinhouse.com/r/157530', coinbase: 'https://www.coinhouse.com/r/157530',
changelly: 'https://changelly.com/?ref_id=aac789605a01', changelly: 'https://changelly.com/?ref_id=aac789605a01',

3
static/i18n/en/app.yml

@ -426,7 +426,8 @@ crash:
uselessText: You may try again by restarting Ledger Live. Please export your logs and contact Ledger Support if the problem persists. uselessText: You may try again by restarting Ledger Live. Please export your logs and contact Ledger Support if the problem persists.
restart: Restart restart: Restart
reset: Reset reset: Reset
createTicket: Contact us support: Contact Support
github: GitHub
showDetails: Show details showDetails: Show details
showError: Show error showError: Show error
disclaimerModal: disclaimerModal:

Loading…
Cancel
Save