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) {
|
var init = function (f, Cryptpad) {
|
||||||
if (!Cryptpad) { return; }
|
if (!Cryptpad) { return; }
|
||||||
var hash = localStorage.FS_hash;
|
var hash = Cryptpad.getUserHash() || localStorage.FS_hash;
|
||||||
var secret = Cryptpad.getSecrets(hash);
|
var secret = Cryptpad.getSecrets(hash);
|
||||||
var listmapConfig = {
|
var listmapConfig = {
|
||||||
data: {},
|
data: {},
|
||||||
@ -136,7 +136,9 @@ define([
|
|||||||
var rt = window.rt = Listmap.create(listmapConfig);
|
var rt = window.rt = Listmap.create(listmapConfig);
|
||||||
rt.proxy.on('create', function (info) {
|
rt.proxy.on('create', function (info) {
|
||||||
var realtime = info.realtime;
|
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({
|
window.patchText = TextPatcher.create({
|
||||||
realtime: realtime,
|
realtime: realtime,
|
||||||
logging: true,
|
logging: true,
|
||||||
|
|||||||
@ -1444,7 +1444,7 @@ define([
|
|||||||
APP.homePageIframe = true;
|
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 secret = Cryptpad.getSecrets(hash);
|
||||||
var readOnly = APP.readOnly = secret.keys && !secret.keys.editKeyStr;
|
var readOnly = APP.readOnly = secret.keys && !secret.keys.editKeyStr;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user