error handling, launcher ui, read-only mode, rm plot/smooth

This commit is contained in:
bordun 2020-03-09 19:12:43 +01:00
parent cee4cb81b7
commit 4f31985930
59 changed files with 1299 additions and 781 deletions

27
src/launcher/main.js Normal file
View file

@ -0,0 +1,27 @@
var terminal = require('./terminal')
settings = require('./settings'),
contextmenu = require('./context-menu'),
toolbar = require('./toolbar'),
html = require('nanohtml')
DOM.get(document, '#osc-greeting-header')[0].appendChild(html`${window.PACKAGE.productName} <span class="version">v${window.PACKAGE.version}</span>`)
if (navigator.onLine) {
var request = new XMLHttpRequest()
request.open('GET', 'https://api.github.com/repos/jean-emmanuel/open-stage-control/tags', true)
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
var data = JSON.parse(request.responseText)
if (data[0].name != 'v' + window.PACKAGE.version) {
terminal.log(`(INFO) A new version is available : <a target="_blank" href="https://github.com/jean-emmanuel/open-stage-control/releases">${data[0].name}</a>`, 'info')
}
}
}
request.send()
}