diff --git a/src/app/commands.js b/src/app/commands.js index 818fc4c..b4f3f8e 100644 --- a/src/app/commands.js +++ b/src/app/commands.js @@ -3,6 +3,7 @@ import AboutResult from './models/AboutResult'; import UnknownCommandResult from './models/UnknownCommandResult'; import ExpressionResult from './models/ExpressionResult'; import ErrorResult from './models/ErrorResult'; +import WahtsnewResult from './models/WhatsnewResult'; import * as expression from './expression'; var cmdConfig = {}; @@ -37,6 +38,9 @@ export default { 'about': function(c) { appState.addCommandResult(new AboutResult(c.input)); }, + 'whatsnew': function(c) { + appState.addCommandResult(new WahtsnewResult(c.input)); + }, '-notrack': function () {} }); diff --git a/src/app/components/AppRoot.jsx b/src/app/components/AppRoot.jsx index fd70055..f7d3c55 100644 --- a/src/app/components/AppRoot.jsx +++ b/src/app/components/AppRoot.jsx @@ -1,6 +1,6 @@ import React from 'react'; import InputBox from './InputBox'; -import DisplayResultView from './results/DisplayResultView'; +import DisplayResultView from './DisplayResultView'; export default class AppRoot extends React.Component { componentWillMount() { diff --git a/src/app/components/results/DisplayResultView.jsx b/src/app/components/DisplayResultView.jsx similarity index 69% rename from src/app/components/results/DisplayResultView.jsx rename to src/app/components/DisplayResultView.jsx index e6025ad..c52fc27 100644 --- a/src/app/components/results/DisplayResultView.jsx +++ b/src/app/components/DisplayResultView.jsx @@ -1,12 +1,14 @@ import React from 'react'; -import HelpResult from '../../models/HelpResult'; -import AboutResult from '../../models/AboutResult'; -import UnknownCommandResult from '../../models/UnknownCommandResult'; -import HelpResultView from './HelpResultView'; -import AboutResultView from './AboutResultView'; -import ExpressionResult from '../../models/ExpressionResult'; -import ExpressionResultView from './ExpressionResultView'; -import ErrorResult from '../../models/ErrorResult'; +import HelpResult from '../models/HelpResult'; +import AboutResult from '../models/AboutResult'; +import UnknownCommandResult from '../models/UnknownCommandResult'; +import HelpResultView from './results/HelpResultView'; +import AboutResultView from './results/AboutResultView'; +import ExpressionResult from '../models/ExpressionResult'; +import ExpressionResultView from './results/ExpressionResultView'; +import WhatsnewResult from '../models/WhatsnewResult'; +import WhatsnewResultView from './results/WhatsnewResultView'; +import ErrorResult from '../models/ErrorResult'; export default class DisplayResult extends React.Component { render() { @@ -29,7 +31,7 @@ export default class DisplayResult extends React.Component { renderUnknown() { return
-
¯\_(ツ)_/¯ Sorry, i don't know what {this.props.input} is
+
¯\_(ツ)_/¯ Sorry, i don′t know what {this.props.input} is
} @@ -52,6 +54,10 @@ export default class DisplayResult extends React.Component { return } + if(result instanceof WhatsnewResult) { + return + } + console.warn('Unknown result:', result); return Unknown result: {typeof result} } diff --git a/src/app/components/results/WhatsnewResultView.jsx b/src/app/components/results/WhatsnewResultView.jsx new file mode 100644 index 0000000..666bfdd --- /dev/null +++ b/src/app/components/results/WhatsnewResultView.jsx @@ -0,0 +1,13 @@ +import React from 'react' + +export default class WhatsnewResultView extends React.Component { + render() { + return
+

BitwiseCmd Changelog

+
+

May 16th, 2017 Complete rewrite using React. Old implementation is available at http://bitwisecmd.com/old.

+

Please let me know if you have problems with this release by creating issue in Github Repo.

+
+
; + } +} \ No newline at end of file diff --git a/src/app/models/WhatsnewResult.js b/src/app/models/WhatsnewResult.js new file mode 100644 index 0000000..0b2a7ea --- /dev/null +++ b/src/app/models/WhatsnewResult.js @@ -0,0 +1,7 @@ +import CommandResult from './CommandResult'; + +export default class WhatsnewResult extends CommandResult { + constructor(input) { + super(input); + } +} \ No newline at end of file