mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
display first line of release notes as update note
This commit is contained in:
parent
08a106312d
commit
f6b0277438
1 changed files with 8 additions and 10 deletions
|
|
@ -51,7 +51,9 @@ export default class HyperTerm extends Component {
|
||||||
this.resetFontSize = this.resetFontSize.bind(this);
|
this.resetFontSize = this.resetFontSize.bind(this);
|
||||||
this.increaseFontSize = this.increaseFontSize.bind(this);
|
this.increaseFontSize = this.increaseFontSize.bind(this);
|
||||||
this.decreaseFontSize = this.decreaseFontSize.bind(this);
|
this.decreaseFontSize = this.decreaseFontSize.bind(this);
|
||||||
|
|
||||||
this.dismissUpdate = this.dismissUpdate.bind(this);
|
this.dismissUpdate = this.dismissUpdate.bind(this);
|
||||||
|
this.onUpdateAvailable = this.onUpdateAvailable.bind(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
|
@ -209,7 +211,6 @@ export default class HyperTerm extends Component {
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
this.rpc = new RPC();
|
this.rpc = new RPC();
|
||||||
this.updateChecker = new UpdateChecker(this.onUpdateAvailable.bind(this));
|
|
||||||
|
|
||||||
// open a new tab upon mounting
|
// open a new tab upon mounting
|
||||||
this.rpc.once('ready', () => this.requestTab());
|
this.rpc.once('ready', () => this.requestTab());
|
||||||
|
|
@ -256,12 +257,7 @@ export default class HyperTerm extends Component {
|
||||||
this.rpc.on('decrease font size', this.decreaseFontSize);
|
this.rpc.on('decrease font size', this.decreaseFontSize);
|
||||||
this.rpc.on('reset font size', this.resetFontSize);
|
this.rpc.on('reset font size', this.resetFontSize);
|
||||||
|
|
||||||
this.rpc.once('update-available', (data) => {
|
this.rpc.on('update available', this.onUpdateAvailable);
|
||||||
// hardcoded data for now
|
|
||||||
const updateVersion = '3.0.1';
|
|
||||||
const updateNote = '';
|
|
||||||
this.setState({ updateVersion, updateNote });
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearCurrentTerm () {
|
clearCurrentTerm () {
|
||||||
|
|
@ -270,9 +266,11 @@ export default class HyperTerm extends Component {
|
||||||
term.clear();
|
term.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
onUpdateAvailable (updateVersion, updateNote = '') {
|
onUpdateAvailable ({ releaseName, releaseNotes = '' }) {
|
||||||
// updateNote = updateNote.replace(/\.$/, '');
|
this.setState({
|
||||||
// this.setState({ updateVersion, updateNote });
|
updateVersion: releaseName,
|
||||||
|
updateNote: releaseNotes.split(/\n/)[0].trim()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
moveTo (n) {
|
moveTo (n) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue