Ability to import local pads on login

This commit is contained in:
yflory
2018-01-12 18:17:32 +01:00
parent a5b75e0164
commit f3d8fd3590
2 changed files with 18 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ define([
], function ($, Cryptpad, Login, UI, Realtime, Feedback, LocalStore, Test) {
$(function () {
var $main = $('#mainBlock');
var $checkImport = $('#import-recent');
var Messages = Cryptpad.Messages;
// main block is hidden in case javascript is disabled
@@ -59,6 +60,7 @@ define([
if (hashing) { return void console.log("hashing is already in progress"); }
hashing = true;
var shouldImport = $checkImport[0].checked;
// setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up
window.setTimeout(function () {
@@ -96,6 +98,9 @@ define([
test.pass();
return;
}
if (shouldImport) {
sessionStorage.migrateAnonDrive = 1;
}
if (sessionStorage.redirectTo) {
var h = sessionStorage.redirectTo;
var parser = document.createElement('a');