mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-18 17:15:13 +01:00
Made failed server launch message more "in your face" to user.
This commit is contained in:
parent
a826e872eb
commit
7d5a7658e2
@ -221,34 +221,13 @@
|
||||
|
||||
if (webSocket) {
|
||||
webSocket.on('send_start_error', function (start_error) {
|
||||
|
||||
var closeEl = document.createElement('span');
|
||||
var strongEL = document.createElement('strong');
|
||||
var msgEl = document.createElement('div');
|
||||
|
||||
closeEl.innerHTML = '×';
|
||||
strongEL.textContent = 'Warning: ';
|
||||
msgEl.append(strongEL, start_error.error);
|
||||
|
||||
|
||||
closeEl.style.marginLeft = '15px';
|
||||
closeEl.style.fontWeight = 'bold';
|
||||
closeEl.style.float = 'right';
|
||||
closeEl.style.fontSize = '22px';
|
||||
closeEl.style.lineHeight = '20px';
|
||||
closeEl.style.cursor = 'pointer';
|
||||
|
||||
closeEl.addEventListener('click', function () {this.parentElement.style.display='none';});
|
||||
|
||||
var parentEl = document.createElement('div');
|
||||
|
||||
parentEl.style.padding = '20px';
|
||||
parentEl.style.backgroundColor = '#f7970f';
|
||||
|
||||
parentEl.appendChild(closeEl);
|
||||
parentEl.appendChild(msgEl);
|
||||
|
||||
document.querySelector('.warnings').appendChild(parentEl);
|
||||
var x = document.querySelector('.bootbox');
|
||||
if(x){
|
||||
x.remove()}
|
||||
var x = document.querySelector('.modal-backdrop');
|
||||
if(x){
|
||||
x.remove()}
|
||||
bootbox.alert(start_error.error);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -23,4 +23,4 @@ termcolor==1.1.0
|
||||
tornado==6.0.4
|
||||
urllib3==1.25.10
|
||||
webencodings==0.5.1
|
||||
|
||||
peewee_migrate==1.4.6
|
||||
|
Loading…
x
Reference in New Issue
Block a user