Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
b630fb95e2
@ -68,5 +68,7 @@ define(function() {
|
|||||||
|
|
||||||
config.displayCreationScreen = false;
|
config.displayCreationScreen = false;
|
||||||
|
|
||||||
|
config.disableAnonymousStore = true;
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
}
|
}
|
||||||
.fa {
|
.fa {
|
||||||
display: block;
|
display: block;
|
||||||
margin: auto;
|
|
||||||
font-size: 64px;
|
font-size: 64px;
|
||||||
margin: 18px 0;
|
margin: 18px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -29,6 +29,8 @@ define(function () {
|
|||||||
out.typeError = "Ce pad n'est pas compatible avec l'application sélectionnée";
|
out.typeError = "Ce pad n'est pas compatible avec l'application sélectionnée";
|
||||||
out.onLogout = 'Vous êtes déconnecté de votre compte utilisateur, <a href="/" target="_blank">cliquez ici</a> pour vous authentifier<br>ou appuyez sur <em>Échap</em> pour accéder au pad en mode lecture seule.';
|
out.onLogout = 'Vous êtes déconnecté de votre compte utilisateur, <a href="/" target="_blank">cliquez ici</a> pour vous authentifier<br>ou appuyez sur <em>Échap</em> pour accéder au pad en mode lecture seule.';
|
||||||
out.wrongApp = "Impossible d'afficher le contenu de ce document temps-réel dans votre navigateur. Vous pouvez essayer de recharger la page.";
|
out.wrongApp = "Impossible d'afficher le contenu de ce document temps-réel dans votre navigateur. Vous pouvez essayer de recharger la page.";
|
||||||
|
out.padNotPinned = 'Ce pad va expirer dans 3 mois, {0}connectez-vous{1} ou {2}enregistrez-vous{3} pour le préserver.';
|
||||||
|
out.anonymousStoreDisabled = "L'administrateur de cette instance de CryptPad a désactivé le drive pour les utilisateurs non enregistrés. Vous devez vous connecter pour pouvoir utiliser CryptDrive.";
|
||||||
|
|
||||||
out.loading = "Chargement...";
|
out.loading = "Chargement...";
|
||||||
out.error = "Erreur";
|
out.error = "Erreur";
|
||||||
|
|||||||
@ -32,6 +32,7 @@ define(function () {
|
|||||||
out.onLogout = 'You are logged out, <a href="/" target="_blank">click here</a> to log in<br>or press <em>Escape</em> to access your pad in read-only mode.';
|
out.onLogout = 'You are logged out, <a href="/" target="_blank">click here</a> to log in<br>or press <em>Escape</em> to access your pad in read-only mode.';
|
||||||
out.wrongApp = "Unable to display the content of that realtime session in your browser. Please try to reload that page.";
|
out.wrongApp = "Unable to display the content of that realtime session in your browser. Please try to reload that page.";
|
||||||
out.padNotPinned = 'This pad will expire in 3 months, {0}login{1} or {2}register{3} to preserve it.';
|
out.padNotPinned = 'This pad will expire in 3 months, {0}login{1} or {2}register{3} to preserve it.';
|
||||||
|
out.anonymousStoreDisabled = "The webmaster of this CryptPad instance has disabled the store for anonymous users. You have to log in to be able to use CryptDrive.";
|
||||||
|
|
||||||
out.loading = "Loading...";
|
out.loading = "Loading...";
|
||||||
out.error = "Error";
|
out.error = "Error";
|
||||||
|
|||||||
@ -10,12 +10,13 @@ define([
|
|||||||
'/common/common-messenger.js',
|
'/common/common-messenger.js',
|
||||||
'/common/outer/chainpad-netflux-worker.js',
|
'/common/outer/chainpad-netflux-worker.js',
|
||||||
'/common/outer/network-config.js',
|
'/common/outer/network-config.js',
|
||||||
|
'/customize/application_config.js',
|
||||||
|
|
||||||
'/bower_components/chainpad-crypto/crypto.js?v=0.1.5',
|
'/bower_components/chainpad-crypto/crypto.js?v=0.1.5',
|
||||||
'/bower_components/chainpad/chainpad.dist.js',
|
'/bower_components/chainpad/chainpad.dist.js',
|
||||||
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
'/bower_components/chainpad-listmap/chainpad-listmap.js',
|
||||||
], function (UserObject, Migrate, Hash, Util, Constants, Feedback, Realtime, Messaging, Messenger,
|
], function (UserObject, Migrate, Hash, Util, Constants, Feedback, Realtime, Messaging, Messenger,
|
||||||
CpNfWorker, NetConfig,
|
CpNfWorker, NetConfig, AppConfig,
|
||||||
Crypto, ChainPad, Listmap) {
|
Crypto, ChainPad, Listmap) {
|
||||||
var Store = {};
|
var Store = {};
|
||||||
|
|
||||||
@ -524,6 +525,8 @@ define([
|
|||||||
var p = Hash.parsePadUrl(href);
|
var p = Hash.parsePadUrl(href);
|
||||||
var h = p.hashData;
|
var h = p.hashData;
|
||||||
|
|
||||||
|
if (AppConfig.disableAnonymousStore && !store.loggedIn) { return void cb(); }
|
||||||
|
|
||||||
var owners;
|
var owners;
|
||||||
if (Store.channel && Store.channel.wc && Util.base64ToHex(h.channel) === Store.channel.wc.id) {
|
if (Store.channel && Store.channel.wc && Util.base64ToHex(h.channel) === Store.channel.wc.id) {
|
||||||
owners = Store.channel.data.owners || undefined;
|
owners = Store.channel.data.owners || undefined;
|
||||||
|
|||||||
@ -578,7 +578,7 @@ define([
|
|||||||
window.location.hash = hash;
|
window.location.hash = hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
var cfg = {
|
var cpNfCfg = {
|
||||||
sframeChan: sframeChan,
|
sframeChan: sframeChan,
|
||||||
channel: secret.channel,
|
channel: secret.channel,
|
||||||
padRpc: Cryptpad.padRpc,
|
padRpc: Cryptpad.padRpc,
|
||||||
@ -599,9 +599,9 @@ define([
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
Object.keys(rtConfig).forEach(function (k) {
|
Object.keys(rtConfig).forEach(function (k) {
|
||||||
cfg[k] = rtConfig[k];
|
cpNfCfg[k] = rtConfig[k];
|
||||||
});
|
});
|
||||||
CpNfOuter.start(cfg);
|
CpNfOuter.start(cpNfCfg);
|
||||||
};
|
};
|
||||||
|
|
||||||
sframeChan.on('Q_CREATE_PAD', function (data, cb) {
|
sframeChan.on('Q_CREATE_PAD', function (data, cb) {
|
||||||
|
|||||||
@ -1922,6 +1922,10 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var displayAllFiles = function ($container) {
|
var displayAllFiles = function ($container) {
|
||||||
|
if (AppConfig.disableAnonymousStore && !APP.loggedIn) {
|
||||||
|
$container.append(Messages.anonymousStoreDisabled);
|
||||||
|
return;
|
||||||
|
}
|
||||||
var allfiles = files[FILES_DATA];
|
var allfiles = files[FILES_DATA];
|
||||||
if (allfiles.length === 0) { return; }
|
if (allfiles.length === 0) { return; }
|
||||||
var $fileHeader = getFileListHeader(false);
|
var $fileHeader = getFileListHeader(false);
|
||||||
|
|||||||
@ -74,7 +74,6 @@ define([
|
|||||||
config.addCommonRpc(sframeChan);
|
config.addCommonRpc(sframeChan);
|
||||||
|
|
||||||
sframeChan.on('Q_GET_FILES_LIST', function (types, cb) {
|
sframeChan.on('Q_GET_FILES_LIST', function (types, cb) {
|
||||||
console.error("TODO: make sure Q_GET_FILES_LIST is only available from filepicker");
|
|
||||||
Cryptpad.getSecureFilesList(types, function (err, data) {
|
Cryptpad.getSecureFilesList(types, function (err, data) {
|
||||||
cb({
|
cb({
|
||||||
error: err,
|
error: err,
|
||||||
|
|||||||
@ -751,7 +751,7 @@ define([
|
|||||||
}).appendTo($msg);
|
}).appendTo($msg);
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
if (!c.profile || c.profile === profile) {
|
if (!APP.readOnly && (!c.profile || c.profile === profile)) {
|
||||||
$('<button>', {
|
$('<button>', {
|
||||||
'class': 'btn btn-secondary fa fa-times',
|
'class': 'btn btn-secondary fa fa-times',
|
||||||
'title': Messages.poll_comment_remove,
|
'title': Messages.poll_comment_remove,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user