Disconnect the network when migrating the drive in another tab

This commit is contained in:
yflory
2017-06-09 14:36:35 +02:00
parent d3854b9774
commit 6a96aa6819
3 changed files with 13 additions and 1 deletions

View File

@@ -288,8 +288,16 @@ define([
}
return;
}
})
.on('change', ['drive', 'migrate'], function () {
var path = arguments[2];
var value = arguments[1];
if (path[0] === 'drive' && path[1] === "migrate" && value == 1) {
rt.network.disconnect();
rt.realtime.abort();
Cryptpad.alert(Cryptpad.Messages.fs_migration);
}
});
};
Store.ready = function (f, Cryptpad) {