Set the url if there is none
This commit is contained in:
parent
33e73dd5e5
commit
4acd9957a9
@ -40,7 +40,7 @@
|
|||||||
"less": "^2.7.2",
|
"less": "^2.7.2",
|
||||||
"bootstrap": "#v4.0.0-alpha.6",
|
"bootstrap": "#v4.0.0-alpha.6",
|
||||||
"diff-dom": "2.1.1",
|
"diff-dom": "2.1.1",
|
||||||
"nthen": "^0.1.5"
|
"nthen": "^0.1.5",
|
||||||
"open-sans-fontface": "^1.4.2"
|
"open-sans-fontface": "^1.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ define([], function () {
|
|||||||
var readOnly = conf.readOnly || false;
|
var readOnly = conf.readOnly || false;
|
||||||
var network = conf.network;
|
var network = conf.network;
|
||||||
var sframeChan = conf.sframeChan;
|
var sframeChan = conf.sframeChan;
|
||||||
|
var onConnect = conf.onConnect || function () { };
|
||||||
conf = undefined;
|
conf = undefined;
|
||||||
|
|
||||||
var initializing = true;
|
var initializing = true;
|
||||||
@ -40,7 +41,7 @@ define([], function () {
|
|||||||
messageFromInner(message, cb);
|
messageFromInner(message, cb);
|
||||||
});
|
});
|
||||||
|
|
||||||
var onReady = function () {
|
var onReady = function (wc) {
|
||||||
// Trigger onReady only if not ready yet. This is important because the history keeper sends a direct
|
// Trigger onReady only if not ready yet. This is important because the history keeper sends a direct
|
||||||
// message through "network" when it is synced, and it triggers onReady for each channel joined.
|
// message through "network" when it is synced, and it triggers onReady for each channel joined.
|
||||||
if (!initializing) { return; }
|
if (!initializing) { return; }
|
||||||
@ -131,6 +132,9 @@ define([], function () {
|
|||||||
wcObject.wc = wc;
|
wcObject.wc = wc;
|
||||||
channel = wc.id;
|
channel = wc.id;
|
||||||
|
|
||||||
|
onConnect(wc);
|
||||||
|
onConnect = function () { };
|
||||||
|
|
||||||
// Add the existing peers in the userList
|
// Add the existing peers in the userList
|
||||||
sframeChan.event('EV_RT_CONNECT', { myID: wc.myID, members: wc.members, readOnly: readOnly });
|
sframeChan.event('EV_RT_CONNECT', { myID: wc.myID, members: wc.members, readOnly: readOnly });
|
||||||
|
|
||||||
|
|||||||
@ -641,7 +641,7 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Title.updateTitle(Cryptpad.initialName || Title.defaultTitle);
|
//Title.updateTitle(Cryptpad.initialName || Title.defaultTitle);
|
||||||
documentBody.innerHTML = Messages.initialState;
|
documentBody.innerHTML = Messages.initialState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,10 @@ define([
|
|||||||
}));
|
}));
|
||||||
Cryptpad.ready(waitFor());
|
Cryptpad.ready(waitFor());
|
||||||
}).nThen(function (waitFor) {
|
}).nThen(function (waitFor) {
|
||||||
|
var secret = Cryptpad.getSecrets();
|
||||||
|
var readOnly = secret.keys && !secret.keys.editKeyStr;
|
||||||
|
if (!secret.keys) { secret.keys = secret.key; }
|
||||||
|
|
||||||
var parsed = Cryptpad.parsePadUrl(window.location.href);
|
var parsed = Cryptpad.parsePadUrl(window.location.href);
|
||||||
parsed.type = parsed.type.replace('pad2', 'pad');
|
parsed.type = parsed.type.replace('pad2', 'pad');
|
||||||
if (!parsed.type) { throw new Error(); }
|
if (!parsed.type) { throw new Error(); }
|
||||||
@ -55,10 +59,6 @@ define([
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var secret = Cryptpad.getSecrets();
|
|
||||||
var readOnly = secret.keys && !secret.keys.editKeyStr;
|
|
||||||
if (!secret.keys) { secret.keys = secret.key; }
|
|
||||||
|
|
||||||
CpNfOuter.start({
|
CpNfOuter.start({
|
||||||
sframeChan: sframeChan,
|
sframeChan: sframeChan,
|
||||||
channel: secret.channel,
|
channel: secret.channel,
|
||||||
@ -66,6 +66,10 @@ define([
|
|||||||
validateKey: secret.keys.validateKey || undefined,
|
validateKey: secret.keys.validateKey || undefined,
|
||||||
readOnly: readOnly,
|
readOnly: readOnly,
|
||||||
crypto: Crypto.createEncryptor(secret.keys),
|
crypto: Crypto.createEncryptor(secret.keys),
|
||||||
|
onConnect: function (wc) {
|
||||||
|
if (readOnly) { return; }
|
||||||
|
Cryptpad.replaceHash(Cryptpad.getEditHashFromKeys(wc.id, secret.keys));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user