add alert when send connection fails
This commit is contained in:
parent
bb21456fe3
commit
e9222c1ee2
@ -3,7 +3,8 @@
|
||||
connection.start().then(function () {
|
||||
console.log('Started websocket listener');
|
||||
}).catch(function (err) {
|
||||
return console.error(err.toString());
|
||||
console.error(err.toString());
|
||||
return alert('Connection error. Reload page.');
|
||||
});
|
||||
|
||||
let showToast = function (selector) {
|
||||
@ -24,6 +25,8 @@ let saveContent = function ($textarea) {
|
||||
|
||||
connection.invoke('SaveNote', content).then(function () {
|
||||
showToast('#saved-indicator');
|
||||
}).catch(function (err) {
|
||||
return alert('Connection error. Reload page.');
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user