mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-01-17 17:32:52 +01:00
Almost done with react adoptation
This commit is contained in:
@@ -5,6 +5,10 @@ export default class AppState {
|
||||
this.handlers = [];
|
||||
this.uiTheme = persistData.uiTheme || 'dark';
|
||||
this.debugMode = false;
|
||||
|
||||
this.version = 1;
|
||||
this.persistedVersion = persistData.version || 0.9;
|
||||
this.wasOldVersion = this.version > this.persistedVersion;
|
||||
}
|
||||
|
||||
addCommandResult(result) {
|
||||
@@ -40,7 +44,8 @@ export default class AppState {
|
||||
getPersistData() {
|
||||
return {
|
||||
emphasizeBytes: this.emphasizeBytes,
|
||||
uiTheme: this.uiTheme
|
||||
uiTheme: this.uiTheme,
|
||||
version: this.version
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -12,6 +12,7 @@ export default class HelpResultView extends React.Component {
|
||||
<li><code>23 34</code> — type one or more numbers to see their binary representations</li>
|
||||
<li><code>clear</code> — clear output pane</li>
|
||||
<li><code>help</code> — display this help</li>
|
||||
<li><code>whatsnew</code> — display changelog</li>
|
||||
<li><code>em</code> — turn On/Off Emphasize Bytes</li>
|
||||
<li><code>dark</code> — set Dark theme</li>
|
||||
<li><code>light</code> — set Light theme</li>
|
||||
|
||||
@@ -43,6 +43,10 @@ function executeStartupCommands() {
|
||||
|
||||
var startupCommands = ['help', '1|2&6','1<<0x2a','2 4 8 16 32'];
|
||||
|
||||
if(appState.wasOldVersion) {
|
||||
startupCommands = ["whatsnew"];
|
||||
}
|
||||
|
||||
if(hashArgs.commands.length > 0) {
|
||||
startupCommands = hashArgs.commands;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,11 @@
|
||||
<meta property="og:image" content="http://bitwisecmd.com/img/social-avatar.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="root">Ooops... Something went wrong ¯\_(ツ)_/¯</div>
|
||||
<div id="root">
|
||||
<p>Ooops... Something went wrong.</p>
|
||||
<p>Either you have an old browser or I screwed something up ¯\_(ツ)_/¯</p>
|
||||
<p>No worries! There is a still old version avaliable at <a href="http://bitwisecmd.com/old">http://bitwisecmd.com/old</a>.</p>
|
||||
</div>
|
||||
<script src="bundle.js"></script>
|
||||
<script src="analytics.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user