Skip to content

Commit 9746fc1

Browse files
author
Christopher Willis-Ford
committed
add content to "about" window
1 parent 3cba6fe commit 9746fc1

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

src/renderer/about.jsx

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,42 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3+
import {author, productName, version} from '../../package.json';
34

5+
import logo from '../icon/ScratchDesktop.svg';
6+
7+
// TODO: localization?
48
const AboutElement = () => (
5-
<h1>About</h1>
9+
<div
10+
style={{
11+
color: 'white',
12+
fontFamily: '"Helvetica Neue", Helvetica, Arial, sans-serif',
13+
fontWeight: 'bolder',
14+
margin: 0,
15+
position: 'absolute',
16+
top: '50%',
17+
left: '50%',
18+
transform: 'translate(-50%, -50%)'
19+
}}
20+
>
21+
<div><img
22+
alt={`${productName} icon`}
23+
src={logo}
24+
style={{
25+
maxWidth: '10rem',
26+
maxHeight: '10rem'
27+
}}
28+
/></div>
29+
<h2>{productName}</h2>
30+
<div>Version {version}</div>
31+
<table style={{fontSize: 'x-small'}}>
32+
{
33+
['Electron', 'Chrome'].map(component => {
34+
const componentVersion = process.versions[component.toLowerCase()];
35+
return <tr key={component}><td>{component}</td><td>{componentVersion}</td></tr>;
36+
})
37+
}
38+
</table>
39+
</div>
640
);
741

842
const appTarget = document.getElementById('app');

0 commit comments

Comments
 (0)