diff --git a/.gitignore b/.gitignore index d54b7e8faa0..4068836c7ed 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,6 @@ httpse.leveldb # vim swap files *.swp + +# webstrom +.idea diff --git a/js/about/brave.js b/js/about/brave.js index 08965cfbd69..71ecba9286e 100644 --- a/js/about/brave.js +++ b/js/about/brave.js @@ -6,12 +6,17 @@ const React = require('react') const Immutable = require('immutable') const messages = require('../constants/messages') const SortableTable = require('../components/sortableTable') +const aboutActions = require('./aboutActions') const ipc = window.chrome.ipc require('../../less/about/history.less') require('../../node_modules/font-awesome/css/font-awesome.css') +const tranformVersionInfoToString = (versionInformation) => + versionInformation + .reduce((coll, entry) => `${coll} \n${entry.get('name')}: ${entry.get('version')}`, '') + class AboutBrave extends React.Component { constructor () { super() @@ -21,6 +26,11 @@ class AboutBrave extends React.Component { this.setState({versionInformation: Immutable.fromJS(versionInformation)}) } }) + this.onCopy = this.onCopy.bind(this) + } + + onCopy () { + aboutActions.setClipboard(tranformVersionInfoToString(this.state.versionInformation)) } render () { @@ -30,7 +40,10 @@ class AboutBrave extends React.Component {