mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-22 05:51:18 +00:00
parent
3829f6e67f
commit
c975303469
@ -6,7 +6,8 @@
|
||||
],
|
||||
"globals": {
|
||||
"LOCAL": true,
|
||||
"COMMITHASH": true
|
||||
"COMMITHASH": true,
|
||||
"VERSION": true
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
|
@ -12,8 +12,6 @@ import colors from 'config/colors';
|
||||
import { FONT_SIZE } from 'config/variables';
|
||||
import * as LogActions from 'actions/LogActions';
|
||||
|
||||
declare var COMMITHASH: string;
|
||||
|
||||
type Props = {
|
||||
opened: boolean,
|
||||
isLanding: boolean,
|
||||
@ -60,7 +58,7 @@ const Right = styled.div`
|
||||
const Footer = ({ opened, toggle, isLanding }: Props) => (
|
||||
<Wrapper>
|
||||
<Left>
|
||||
<Copy title={COMMITHASH}>© {getYear(new Date())}</Copy>
|
||||
<Copy>© {getYear(new Date())}</Copy>
|
||||
<StyledLink href="http://satoshilabs.com" isGreen>SatoshiLabs</StyledLink>
|
||||
<StyledLink href="./assets/tos.pdf" isGreen>Terms</StyledLink>
|
||||
<StyledLink onClick={toggle} isGreen>{ opened ? 'Hide Log' : 'Show Log' }</StyledLink>
|
||||
|
@ -12,6 +12,11 @@ export const routes: Array<Route> = [
|
||||
pattern: '/',
|
||||
fields: [],
|
||||
},
|
||||
{
|
||||
name: 'landing-version',
|
||||
pattern: '/version',
|
||||
fields: ['version'],
|
||||
},
|
||||
{
|
||||
name: 'landing-bridge',
|
||||
pattern: '/bridge',
|
||||
|
33
src/views/Landing/views/Version/index.js
Normal file
33
src/views/Landing/views/Version/index.js
Normal file
@ -0,0 +1,33 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { H3, H2 } from 'components/Heading';
|
||||
import LandingWrapper from 'views/Landing/components/LandingWrapper';
|
||||
import Link from 'components/Link';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
`;
|
||||
|
||||
const Line = styled.div`
|
||||
padding: 20px;
|
||||
`;
|
||||
|
||||
const Version = () => (
|
||||
<LandingWrapper>
|
||||
<Wrapper>
|
||||
<H3>APPLICATION VERSION</H3>
|
||||
<H2>{VERSION}</H2>
|
||||
<Line />
|
||||
<H3>LAST COMMIT HASH</H3>
|
||||
<Link href={`https://github.com/trezor/trezor-wallet/commits/${COMMITHASH}`}>
|
||||
<H2>{COMMITHASH}</H2>
|
||||
</Link>
|
||||
</Wrapper>
|
||||
</LandingWrapper>
|
||||
);
|
||||
|
||||
export default Version;
|
@ -7,6 +7,7 @@ import { ConnectedRouter } from 'connected-react-router';
|
||||
// general
|
||||
import ErrorBoundary from 'support/ErrorBoundary';
|
||||
import ImagesPreloader from 'support/ImagesPreloader';
|
||||
import Version from 'views/Landing/views/Version';
|
||||
import { getPattern } from 'support/routes';
|
||||
|
||||
// landing views
|
||||
@ -38,6 +39,7 @@ const App = () => (
|
||||
<ConnectedRouter history={history}>
|
||||
<Switch>
|
||||
<Route exact path={getPattern('landing-home')} component={RootView} />
|
||||
<Route exact path={getPattern('landing-version')} component={Version} />
|
||||
<Route exact path={getPattern('landing-bridge')} component={InstallBridge} />
|
||||
<Route exact path={getPattern('landing-import')} component={ImportView} />
|
||||
<Route>
|
||||
|
@ -3,14 +3,15 @@ import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin';
|
||||
import WebpackBuildNotifierPlugin from 'webpack-build-notifier';
|
||||
|
||||
// turn on for bundle analyzing
|
||||
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import packageJson from '../package.json';
|
||||
|
||||
import {
|
||||
SRC, BUILD, PORT, PUBLIC,
|
||||
} from './constants';
|
||||
|
||||
// turn on for bundle analyzing
|
||||
// import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
|
||||
const gitRevisionPlugin = new GitRevisionPlugin();
|
||||
|
||||
module.exports = {
|
||||
@ -103,6 +104,7 @@ module.exports = {
|
||||
suppressSuccess: true,
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
VERSION: JSON.stringify(packageJson.version),
|
||||
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
|
@ -3,6 +3,7 @@ import GitRevisionPlugin from 'git-revision-webpack-plugin';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin';
|
||||
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||
import packageJson from '../package.json';
|
||||
import { SRC, BUILD, PUBLIC } from './constants';
|
||||
|
||||
const gitRevisionPlugin = new GitRevisionPlugin();
|
||||
@ -65,6 +66,7 @@ module.exports = {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.BUILD': JSON.stringify(process.env.BUILD),
|
||||
VERSION: JSON.stringify(packageJson.version),
|
||||
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
|
Loading…
Reference in New Issue
Block a user