feat: show version & add change log link

This commit is contained in:
EnixCoda 2018-06-30 13:38:51 +08:00
parent 5695771fff
commit 4687a33cb2
5 changed files with 30 additions and 4 deletions

View file

@ -35,6 +35,7 @@
"eslint-plugin-class-property": "^1.1.0",
"eslint-plugin-react": "^7.9.1",
"file-loader": "^1.1.5",
"json-loader": "^0.5.7",
"less": "^2.7.3",
"less-loader": "^4.0.5",
"style-loader": "^0.19.0",

View file

@ -1,12 +1,14 @@
import React from 'react'
import PropTypes from 'prop-types'
import { version } from '../../package'
import Icon from './Icon'
import configHelper, { config } from '../utils/configHelper'
import keyHelper from '../utils/keyHelper'
const wikiLinks = {
compressSingletonFolder: 'https://github.com/EnixCoda/Gitako/wiki/Compress-Singleton-Folder',
changeLog: 'https://github.com/EnixCoda/Gitako/wiki/Change-Log',
}
const ACCESS_TOKEN_REGEXP = /^[0-9a-f]{40}$/
@ -232,6 +234,9 @@ export default class SettingsBar extends React.PureComponent {
</div>
)}
<div className={'placeholder-row'}>
<a className={'version'} href={wikiLinks.changeLog} target={'_blank'} title={'Check out new features!'}>
v{version}
</a>
{activated ? (
<Icon
type={'chevron-down'}

View file

@ -348,11 +348,14 @@
.placeholder-row {
flex-shrink: 0;
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
padding: 6px 10px;
border-top: 1px solid #eaecef;
.version {
color: #999999;
}
.show-settings-icon {
width: 20px;
height: 20px;

View file

@ -76,6 +76,11 @@ module.exports = {
loader: ['babel-loader', 'svgr/webpack'],
include: [srcPath],
},
{
test: /\.json$/,
loader: ['json-loader'],
include: [srcPath],
},
],
},
plugins,

View file

@ -555,6 +555,10 @@ babel-plugin-syntax-class-properties@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de"
babel-plugin-syntax-decorators@^6.1.18:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b"
babel-plugin-syntax-exponentiation-operator@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
@ -592,6 +596,14 @@ babel-plugin-transform-class-properties@^6.24.1:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
babel-plugin-transform-decorators-legacy@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators-legacy/-/babel-plugin-transform-decorators-legacy-1.3.5.tgz#0e492dffa0edd70529072887f8aa86d4dd8b40a1"
dependencies:
babel-plugin-syntax-decorators "^6.1.18"
babel-runtime "^6.2.0"
babel-template "^6.3.0"
babel-plugin-transform-es2015-arrow-functions@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
@ -887,14 +899,14 @@ babel-register@^6.26.0:
mkdirp "^0.5.1"
source-map-support "^0.4.15"
babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
babel-runtime@^6.18.0, babel-runtime@^6.2.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.11.0"
babel-template@^6.24.1, babel-template@^6.26.0:
babel-template@^6.24.1, babel-template@^6.26.0, babel-template@^6.3.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
dependencies:
@ -3210,7 +3222,7 @@ jsesc@~0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
json-loader@^0.5.4:
json-loader@^0.5.4, json-loader@^0.5.7:
version "0.5.7"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"