Skip to content

Commit

Permalink
Update about page to show links
Browse files Browse the repository at this point in the history
  • Loading branch information
jalenng committed Jun 1, 2021
1 parent 364b788 commit 0773fda
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/ipcHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ ipcMain.on('get-about-info', (event) => {
version: app.getVersion()
},
versions: process.versions,
links: [
{ name: 'GitHub', link: 'https://github.com/jalenng/twenty', iconName: 'GitGraph' },
{ name: 'Website', link: 'https://jalenng.github.io/twenty', iconName: 'Globe' }
],
openSourceLibraries: [
{ name: '@fluentui/react', link: 'https://github.com/microsoft/fluentui' },
{ name: 'electron', link: 'https://github.com/electron/electron' },
Expand Down
22 changes: 22 additions & 0 deletions src/preferences/tabs/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default class extends React.Component {
render () {
const appInfo = aboutAppInfo.appInfo
const versions = aboutAppInfo.versions
const links = aboutAppInfo.links
const openSourceLibraries = aboutAppInfo.openSourceLibraries
const licenseParagraphs = this.state.licenseExpanded
? aboutAppInfo.license
Expand Down Expand Up @@ -99,6 +100,27 @@ export default class extends React.Component {

</Stack>

{/* Links */}
<Stack {...level2Props}>
<Text variant='xLarge' block> Links </Text>

<div style={{ display: 'inline' }}>

{links.map(linkElem => {
return (
<DefaultButton
iconProps={{ iconName: linkElem.iconName }}
key={linkElem.name}
style={{ borderRadius: '8px', marginRight: '8px', marginBottom: '8px' }}
text={linkElem.name}
onClick={() => openExternalLink(linkElem.link)}
/>
)
})}

</div>
</Stack>

{/* Attributions to open-source libraries */}
<Stack {...level2Props}>
<Text variant='xLarge' block> Open source libraries </Text>
Expand Down

0 comments on commit 0773fda

Please sign in to comment.