Skip to content

Commit f57f103

Browse files
author
Matthias Rütten
authored
Merge pull request #51 from codecentric/about-us-page
implement about us page
2 parents 68d2d53 + 350385b commit f57f103

File tree

5 files changed

+77
-27
lines changed

5 files changed

+77
-27
lines changed

package.json

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{
22
"name": "merge-request-notifier",
3-
"version": "0.8.4",
3+
"version": "0.9.0",
44
"description": "This app shows your merge requests grouped by projects and WIP status. It is accessible from the system tray.",
55
"main": "./dist/main.js",
66
"engines": {
77
"yarn": "1.19.1"
88
},
9+
"homepage": "https://github.com/codecentric/merge-request-notifier",
10+
"author": {
11+
"name": "Matthias Rütten",
12+
"email": "[email protected]"
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "[email protected]:codecentric/merge-request-notifier.git"
17+
},
918
"scripts": {
1019
"build-main": "cross-env NODE_ENV=production webpack --config webpack.main.prod.config.js",
1120
"build-renderer": "cross-env NODE_ENV=production webpack --config webpack.renderer.prod.config.js",
@@ -39,23 +48,6 @@
3948
"git add"
4049
]
4150
},
42-
"jest": {
43-
"transform": {
44-
"^.+\\.tsx?$": "ts-jest"
45-
},
46-
"testRegex": "(/test/.+\\.spec)\\.tsx?$",
47-
"moduleFileExtensions": [
48-
"ts",
49-
"tsx",
50-
"js",
51-
"json",
52-
"node"
53-
],
54-
"moduleNameMapper": {
55-
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/mocks/fileMock.js",
56-
"\\.(s?css|sass)$": "<rootDir>/mocks/styleMock.js"
57-
}
58-
},
5951
"build": {
6052
"productName": "Merge Request Notifier",
6153
"appId": "de.codecentric.ruettenm.mergeRequestNotifier",
@@ -82,15 +74,6 @@
8274
"github"
8375
]
8476
},
85-
"repository": {
86-
"type": "git",
87-
"url": "[email protected]:codecentric/merge-request-notifier.git"
88-
},
89-
"author": {
90-
"name": "Matthias Rütten",
91-
"email": "[email protected]"
92-
},
93-
"homepage": "https://github.com/codecentric/merge-request-notifier",
9477
"devDependencies": {
9578
"@babel/core": "^7.4.5",
9679
"@babel/plugin-proposal-class-properties": "^7.4.4",

src/renderer/components/Content.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Box } from 'rebass'
55
import { useConfig } from '../hooks/config'
66
import { MergeRequestsPage } from './merge-requests/MergeRequestsPage'
77
import { SettingsPage } from './settings/SettingsPage'
8+
import { AboutUsPage } from './about-us/AboutUsPage'
89

910
export const Content: React.FunctionComponent = () => {
1011
const { config } = useConfig()
@@ -15,6 +16,9 @@ export const Content: React.FunctionComponent = () => {
1516
<Route path='/config'>
1617
<SettingsPage />
1718
</Route>
19+
<Route path='/about-us'>
20+
<AboutUsPage />
21+
</Route>
1822
{config ? (
1923
<Route path='/'>
2024
<MergeRequestsPage />
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { remote, shell } from 'electron'
2+
import * as React from 'react'
3+
import { Box, Text } from 'rebass'
4+
5+
const openUrl = (url: string): React.MouseEventHandler<HTMLAnchorElement> => event => {
6+
event.preventDefault()
7+
shell.openExternal(url)
8+
}
9+
10+
export const AboutUsPage = () => {
11+
const appVersion = remote.app.getVersion()
12+
13+
return (
14+
<Box p={2}>
15+
<Text fontSize='14px'>
16+
This app was build because our team was searching for a tool to see the number of our current open merge requests and make them easily
17+
accessible. We didn't found such a tool and so we decided to build one by our own ;-)
18+
</Text>
19+
20+
<Text mt={3} fontWeight='bold'>
21+
Thanks
22+
</Text>
23+
<Text fontSize='14px'>
24+
We want to thank our employers (
25+
<a href='#' onClick={openUrl('https://codecentric.de')}>
26+
codecentric
27+
</a>{' '}
28+
and{' '}
29+
<a href='#' onClick={openUrl('https://uxi.de')}>
30+
UX&I
31+
</a>
32+
) to make it possible to develop this app in our +1 time.
33+
</Text>
34+
35+
<Text mt={3} fontWeight='bold'>
36+
Issues / Feedback
37+
</Text>
38+
<Text fontSize='14px'>
39+
You found an issue or missed some feature? We are very keen about your feedback and appreciate any help. Please{' '}
40+
<a href='#' onClick={openUrl('https://github.com/codecentric/merge-request-notifier/issues/new')}>
41+
create an issue
42+
</a>{' '}
43+
on GitHub.
44+
</Text>
45+
46+
<Text mt={3} textAlign='right'>
47+
<small>Version: {appVersion}</small>
48+
</Text>
49+
</Box>
50+
)
51+
}

src/renderer/components/layout/Footer.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ipcRenderer } from 'electron'
33
import { Flex, Box, Link } from 'rebass'
44
import { Link as RouterLink } from 'react-router-dom'
55

6+
import InfoIcon from '@material-ui/icons/Info'
67
import SettingsIcon from '@material-ui/icons/Settings'
78
import ExitToAppIcon from '@material-ui/icons/ExitToApp'
89
import { LoadingIndicator } from '../util/LoadingIndicator'
@@ -20,6 +21,11 @@ export const Footer: React.FunctionComponent = () => {
2021
<Box py={1} flex='1 0 auto'>
2122
<LoadingIndicator visible={isLoading} title='Trying to fetch data' />
2223
</Box>
24+
<RouterLink to='/about-us' title='About Us'>
25+
<Box p={2} color='gray' sx={{ ':hover': { color: 'black' } }}>
26+
<InfoIcon fontSize='small' />
27+
</Box>
28+
</RouterLink>
2329
<RouterLink to='/config' title='Settings'>
2430
<Box p={2} color='gray' sx={{ ':hover': { color: 'black' } }}>
2531
<SettingsIcon fontSize='small' />

src/renderer/components/layout/Header.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ export const Header: React.FunctionComponent = () => {
2525
<Box flex='1 0 auto'>Settings</Box>
2626
</Flex>
2727
</Route>
28+
<Route path='/about-us'>
29+
<Flex sx={{ position: 'relative' }}>
30+
<BackLink />
31+
<Box flex='1 0 auto'>About us</Box>
32+
</Flex>
33+
</Route>
2834
<Route>Merge Requests</Route>
2935
</Switch>
3036
</Text>

0 commit comments

Comments
 (0)