Display error icon and message on sync attempt if browser is offline
This commit is contained in:
parent
e45ee36117
commit
63c90f2ae7
1 changed files with 7 additions and 0 deletions
|
@ -405,6 +405,13 @@ Zotero.Sync.Runner = new function () {
|
|||
}
|
||||
|
||||
this.sync = function () {
|
||||
if (Zotero.Utilities.HTTP.browserIsOffline()){
|
||||
this.lastSyncError = "Browser is offline"; // TODO: localize
|
||||
this.clearSyncTimeout(); // DEBUG: necessary?
|
||||
this.setSyncIcon('error');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_running) {
|
||||
throw ("Sync already running in Zotero.Sync.Runner.sync()");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue