Skip to content

Commit

Permalink
feat: add 'contact us' in the menu -> help submenu
Browse files Browse the repository at this point in the history
This PR adds an extra contact method via mail for users who
are not programmers and don't know GitHub.

A sub-menu named 'Contact Us' is added in "Menu -> Help" that
invokes a local mail client to send help request to
"neuron@magickbase.com"
  • Loading branch information
Keith-CY committed Jul 18, 2022
1 parent 9b9287a commit ea3b874
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/neuron-wallet/src/controllers/app/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ enum ExternalURL {
Website = 'https://www.nervos.org/',
Repository = 'https://github.com/nervosnetwork/neuron',
Issues = 'https://github.com/nervosnetwork/neuron/issues',
Doc = 'https://docs.nervos.org/docs/basics/tools#neuron-wallet'
Doc = 'https://docs.nervos.org/docs/basics/tools#neuron-wallet',
MailUs = 'mailto:neuron@magickbase.com'
}

const separator: MenuItemConstructorOptions = {
Expand Down Expand Up @@ -400,6 +401,14 @@ const updateApplicationMenu = (mainWindow: BrowserWindow | null) => {
shell.openExternal(ExternalURL.Issues)
}
},
{
label: t('application-menu.help.contact-us'),
click: () => {
shell.openExternal(
`${ExternalURL.MailUs}?body=${encodeURIComponent(t('application-menu.help.contact-us-message') as string)}`
)
}
},
{
label: t('application-menu.help.export-debug-info'),
click: () => {
Expand Down
3 changes: 3 additions & 0 deletions packages/neuron-wallet/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export default {
'nervos-website': 'Nervos Website',
'source-code': 'Source Code',
'report-issue': 'Report Issue',
'contact-us': 'Contact Us',
'contact-us-message':
'> Please append debug information exported by "Menu" -> "Help" -> "Export Debug Information".',
documentation: 'Documentation',
settings: 'Settings',
'export-debug-info': 'Export Debug Information'
Expand Down
2 changes: 2 additions & 0 deletions packages/neuron-wallet/src/locales/zh-tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export default {
'nervos-website': 'Nervos 官方網站',
'source-code': '原始程式碼',
'report-issue': '回報問題',
'contact-us': '聯繫我們',
'contact-us-message': '> 請通過 "菜單" -> "幫助" -> "導出調試信息" 獲得 Neuron 的調試信息並附在郵件中.',
documentation: '使用說明',
settings: '設定',
'export-debug-info': '導出除錯信息'
Expand Down
2 changes: 2 additions & 0 deletions packages/neuron-wallet/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export default {
'nervos-website': 'Nervos 网站',
'source-code': '源代码',
'report-issue': '报告问题',
'contact-us': '联系我们',
'contact-us-message': '> 请通过 "菜单" -> "帮助" -> "导出调试信息" 获得 Neuron 的调试信息并附在邮件中.',
documentation: '使用文档',
settings: '设置',
'export-debug-info': '导出调试信息'
Expand Down

1 comment on commit ea3b874

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 2689356304

Please sign in to comment.