diff --git a/app/hyperterm.js b/app/hyperterm.js
index 517b3e9b..c3ea5241 100644
--- a/app/hyperterm.js
+++ b/app/hyperterm.js
@@ -22,7 +22,8 @@ export default class HyperTerm extends Component {
activeMarkers: [],
mac: /Mac/.test(navigator.userAgent),
resizeIndicatorShowing: false,
- updateVersion: null
+ updateVersion: null,
+ updateNote: null
};
// we set this to true when the first tab
@@ -89,7 +90,7 @@ export default class HyperTerm extends Component {
Update available (
{ this.state.updateVersion }).
- {' '}
+ {this.state.updateNote ? ` ${this.state.updateNote}. ` : ' '}
Download
;
@@ -231,8 +232,9 @@ export default class HyperTerm extends Component {
term.clear();
}
- onUpdateAvailable (updateVersion) {
- this.setState({ updateVersion });
+ onUpdateAvailable (updateVersion, updateNote = '') {
+ updateNote = updateNote.replace(/\.$/, '');
+ this.setState({ updateVersion, updateNote });
}
moveTo (n) {
diff --git a/app/update-checker.js b/app/update-checker.js
index 0e8a907b..393ae2ab 100644
--- a/app/update-checker.js
+++ b/app/update-checker.js
@@ -19,7 +19,7 @@ export default class UpdateChecker {
};
console.log('checking for update');
- fetch('https://hyperterm.now.sh/data.json')
+ fetch('https://hyperterm.now.sh/updates.json')
.then((res) => {
if (200 !== res.status) {
console.error('Update check error. Status (%d)', res.status);
@@ -27,13 +27,13 @@ export default class UpdateChecker {
}
res.json()
- .then(({ version }) => {
+ .then(({ version, note }) => {
if (this.lastKnown !== version) {
this.lastKnown = version;
if (1 === compare(version, currentVersion)) {
console.log('update found');
- this.callback(version);
+ this.callback(version, note);
} else {
console.log('no update. latest:', version);
}