Use the user object in file manager if it exists
This commit is contained in:
parent
6778a7062d
commit
c7e63f63fd
@ -122,7 +122,7 @@ define([
|
||||
|
||||
var init = function (f, Cryptpad) {
|
||||
if (!Cryptpad) { return; }
|
||||
var hash = localStorage.FS_hash;
|
||||
var hash = Cryptpad.getUserHash() || localStorage.FS_hash;
|
||||
var secret = Cryptpad.getSecrets(hash);
|
||||
var listmapConfig = {
|
||||
data: {},
|
||||
@ -136,7 +136,9 @@ define([
|
||||
var rt = window.rt = Listmap.create(listmapConfig);
|
||||
rt.proxy.on('create', function (info) {
|
||||
var realtime = info.realtime;
|
||||
localStorage.FS_hash = Cryptpad.getEditHashFromKeys(info.channel, secret.keys);
|
||||
if (!Cryptpad.getUserHash()) {
|
||||
localStorage.FS_hash = Cryptpad.getEditHashFromKeys(info.channel, secret.keys);
|
||||
}
|
||||
window.patchText = TextPatcher.create({
|
||||
realtime: realtime,
|
||||
logging: true,
|
||||
|
||||
@ -1444,7 +1444,7 @@ define([
|
||||
APP.homePageIframe = true;
|
||||
}
|
||||
|
||||
var hash = window.location.hash.slice(1) || localStorage.FS_hash;
|
||||
var hash = Cryptpad.getUserHash() || window.location.hash.slice(1) || localStorage.FS_hash;
|
||||
var secret = Cryptpad.getSecrets(hash);
|
||||
var readOnly = APP.readOnly = secret.keys && !secret.keys.editKeyStr;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user