mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-13 08:22:11 +01:00
add changelog
This commit is contained in:
@@ -3,6 +3,7 @@ import AboutResult from './models/AboutResult';
|
|||||||
import UnknownCommandResult from './models/UnknownCommandResult';
|
import UnknownCommandResult from './models/UnknownCommandResult';
|
||||||
import ExpressionResult from './models/ExpressionResult';
|
import ExpressionResult from './models/ExpressionResult';
|
||||||
import ErrorResult from './models/ErrorResult';
|
import ErrorResult from './models/ErrorResult';
|
||||||
|
import WahtsnewResult from './models/WhatsnewResult';
|
||||||
import * as expression from './expression';
|
import * as expression from './expression';
|
||||||
|
|
||||||
var cmdConfig = {};
|
var cmdConfig = {};
|
||||||
@@ -37,6 +38,9 @@ export default {
|
|||||||
'about': function(c) {
|
'about': function(c) {
|
||||||
appState.addCommandResult(new AboutResult(c.input));
|
appState.addCommandResult(new AboutResult(c.input));
|
||||||
},
|
},
|
||||||
|
'whatsnew': function(c) {
|
||||||
|
appState.addCommandResult(new WahtsnewResult(c.input));
|
||||||
|
},
|
||||||
'-notrack': function () {}
|
'-notrack': function () {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import InputBox from './InputBox';
|
import InputBox from './InputBox';
|
||||||
import DisplayResultView from './results/DisplayResultView';
|
import DisplayResultView from './DisplayResultView';
|
||||||
|
|
||||||
export default class AppRoot extends React.Component {
|
export default class AppRoot extends React.Component {
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import HelpResult from '../../models/HelpResult';
|
import HelpResult from '../models/HelpResult';
|
||||||
import AboutResult from '../../models/AboutResult';
|
import AboutResult from '../models/AboutResult';
|
||||||
import UnknownCommandResult from '../../models/UnknownCommandResult';
|
import UnknownCommandResult from '../models/UnknownCommandResult';
|
||||||
import HelpResultView from './HelpResultView';
|
import HelpResultView from './results/HelpResultView';
|
||||||
import AboutResultView from './AboutResultView';
|
import AboutResultView from './results/AboutResultView';
|
||||||
import ExpressionResult from '../../models/ExpressionResult';
|
import ExpressionResult from '../models/ExpressionResult';
|
||||||
import ExpressionResultView from './ExpressionResultView';
|
import ExpressionResultView from './results/ExpressionResultView';
|
||||||
import ErrorResult from '../../models/ErrorResult';
|
import WhatsnewResult from '../models/WhatsnewResult';
|
||||||
|
import WhatsnewResultView from './results/WhatsnewResultView';
|
||||||
|
import ErrorResult from '../models/ErrorResult';
|
||||||
|
|
||||||
export default class DisplayResult extends React.Component {
|
export default class DisplayResult extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
@@ -29,7 +31,7 @@ export default class DisplayResult extends React.Component {
|
|||||||
|
|
||||||
renderUnknown() {
|
renderUnknown() {
|
||||||
return <div className="result">
|
return <div className="result">
|
||||||
<div className="error">¯\_(ツ)_/¯ Sorry, i don't know what <strong>{this.props.input}</strong> is</div>
|
<div className="error">¯\_(ツ)_/¯ Sorry, i don′t know what <strong>{this.props.input}</strong> is</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,6 +54,10 @@ export default class DisplayResult extends React.Component {
|
|||||||
return <ExpressionResultView result={result} emphasizeBytes={this.props.appState.emphasizeBytes} />
|
return <ExpressionResultView result={result} emphasizeBytes={this.props.appState.emphasizeBytes} />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(result instanceof WhatsnewResult) {
|
||||||
|
return <WhatsnewResultView />
|
||||||
|
}
|
||||||
|
|
||||||
console.warn('Unknown result:', result);
|
console.warn('Unknown result:', result);
|
||||||
return <span>Unknown result: {typeof result}</span>
|
return <span>Unknown result: {typeof result}</span>
|
||||||
}
|
}
|
||||||
13
src/app/components/results/WhatsnewResultView.jsx
Normal file
13
src/app/components/results/WhatsnewResultView.jsx
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
export default class WhatsnewResultView extends React.Component {
|
||||||
|
render() {
|
||||||
|
return <div class="changelog">
|
||||||
|
<h3>BitwiseCmd Changelog</h3>
|
||||||
|
<div class="item">
|
||||||
|
<p><strong>May 16th, 2017</strong> Complete rewrite using React. Old implementation is available at <a href="http://bitwisecmd.com/old">http://bitwisecmd.com/old</a>.</p>
|
||||||
|
<p>Please let me know if you have problems with this release by <a href="https://github.com/BorysLevytskyi/BitwiseCmd/issues">creating issue</a> in Github Repo.</p>
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/app/models/WhatsnewResult.js
Normal file
7
src/app/models/WhatsnewResult.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import CommandResult from './CommandResult';
|
||||||
|
|
||||||
|
export default class WhatsnewResult extends CommandResult {
|
||||||
|
constructor(input) {
|
||||||
|
super(input);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user