Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
"hyperjson": "~1.4.0",
|
"hyperjson": "~1.4.0",
|
||||||
"chainpad-crypto": "^0.1.8",
|
"chainpad-crypto": "^0.1.8",
|
||||||
"chainpad-listmap": "^0.5.0",
|
"chainpad-listmap": "^0.5.0",
|
||||||
"chainpad": "^5.0.0",
|
"chainpad": "^5.1.0",
|
||||||
"chainpad-netflux": "^0.7.0",
|
"chainpad-netflux": "^0.7.0",
|
||||||
"file-saver": "1.3.1",
|
"file-saver": "1.3.1",
|
||||||
"alertifyjs": "1.0.11",
|
"alertifyjs": "1.0.11",
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ define([
|
|||||||
proxy.login_name = uname;
|
proxy.login_name = uname;
|
||||||
proxy[Constants.displayNameKey] = uname;
|
proxy[Constants.displayNameKey] = uname;
|
||||||
sessionStorage.createReadme = 1;
|
sessionStorage.createReadme = 1;
|
||||||
|
if (!shouldImport) { proxy.version = 5; }
|
||||||
Feedback.send('REGISTRATION', true);
|
Feedback.send('REGISTRATION', true);
|
||||||
} else {
|
} else {
|
||||||
Feedback.send('LOGIN', true);
|
Feedback.send('LOGIN', true);
|
||||||
|
|||||||
@@ -161,6 +161,7 @@
|
|||||||
background-size: contain;
|
background-size: contain;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 250px;
|
width: 250px;
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
@@ -169,7 +170,8 @@
|
|||||||
.nav-link {
|
.nav-link {
|
||||||
padding: 0.5em 0.7em;
|
padding: 0.5em 0.7em;
|
||||||
&:hover {
|
&:hover {
|
||||||
transform: scale(1.05);
|
font-size: 1.05em;
|
||||||
|
//transform: scale(1.05);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
.cp-register-btn {
|
.cp-register-btn {
|
||||||
@@ -184,9 +186,18 @@
|
|||||||
color: #4591C4;
|
color: #4591C4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: 991px) {
|
@media (max-width: 1000px) {
|
||||||
#menuCollapse {
|
#menuCollapse {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
/* @media (min-width: 576px) {
|
||||||
|
top: 100%;
|
||||||
|
background: rgba(255,255,255,0.8);
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
padding: 0 20px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
.navbar-nav a {
|
.navbar-nav a {
|
||||||
text-align: right !important;
|
text-align: right !important;
|
||||||
@@ -194,7 +205,7 @@
|
|||||||
.cp-register-btn {
|
.cp-register-btn {
|
||||||
margin-right: 13px;
|
margin-right: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//footer general styles
|
//footer general styles
|
||||||
|
|||||||
@@ -23,11 +23,7 @@
|
|||||||
}
|
}
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
min-width: 30%; // conflict?
|
min-width: 30%;
|
||||||
width: 30%;
|
|
||||||
@media (max-width: 500px) {
|
|
||||||
width: 45%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
padding-bottom: 3em;
|
padding-bottom: 3em;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ define(function () {
|
|||||||
out.chainpadError = 'Une erreur critique est survenue lors de la mise à jour du contenu. Le pad est désormais en mode lecture seule afin de s\'assurer que vous ne perdiez pas davantage de données.<br>' +
|
out.chainpadError = 'Une erreur critique est survenue lors de la mise à jour du contenu. Le pad est désormais en mode lecture seule afin de s\'assurer que vous ne perdiez pas davantage de données.<br>' +
|
||||||
'Appuyez sur <em>Échap</em> pour voir le pad ou rechargez la page pour pouvoir le modifier à nouveau.';
|
'Appuyez sur <em>Échap</em> pour voir le pad ou rechargez la page pour pouvoir le modifier à nouveau.';
|
||||||
out.errorCopy = ' Vous pouvez toujours copier son contenu ailleurs en appuyant sur <em>Échap</em>.<br> Dés que vous aurez quitté la page, il sera impossible de le récupérer.';
|
out.errorCopy = ' Vous pouvez toujours copier son contenu ailleurs en appuyant sur <em>Échap</em>.<br> Dés que vous aurez quitté la page, il sera impossible de le récupérer.';
|
||||||
|
out.errorRedirectToHome = 'Appuyez sur <em>Échap</em> pour retourner vers votre CryptDrive.';
|
||||||
|
|
||||||
out.loading = "Chargement...";
|
out.loading = "Chargement...";
|
||||||
out.error = "Erreur";
|
out.error = "Erreur";
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ define(function () {
|
|||||||
out.chainpadError = 'A critical error occurred when updating your content. This page is in read-only mode to make sure you won\'t lose your work.<br>' +
|
out.chainpadError = 'A critical error occurred when updating your content. This page is in read-only mode to make sure you won\'t lose your work.<br>' +
|
||||||
'Hit <em>Esc</em> to continue to view this pad, or reload to try editing again.';
|
'Hit <em>Esc</em> to continue to view this pad, or reload to try editing again.';
|
||||||
out.errorCopy = ' You can still copy the content to another location by pressing <em>Esc</em>.<br>Once you leave this page, it will disappear forever!';
|
out.errorCopy = ' You can still copy the content to another location by pressing <em>Esc</em>.<br>Once you leave this page, it will disappear forever!';
|
||||||
|
out.errorRedirectToHome = 'Press <em>Esc</em> to be redirected to your CryptDrive.';
|
||||||
|
|
||||||
out.loading = "Loading...";
|
out.loading = "Loading...";
|
||||||
out.error = "Error";
|
out.error = "Error";
|
||||||
|
|||||||
@@ -75,6 +75,12 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /blob/ {
|
location ^~ /blob/ {
|
||||||
|
add_header Cache-Control max-age=31536000;
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ^~ /datastore/ {
|
||||||
|
add_header Cache-Control max-age=0;
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,9 @@ app.get(mainPagePattern, Express.static(__dirname + '/customize.dist'));
|
|||||||
app.use("/blob", Express.static(Path.join(__dirname, (config.blobPath || './blob')), {
|
app.use("/blob", Express.static(Path.join(__dirname, (config.blobPath || './blob')), {
|
||||||
maxAge: DEV_MODE? "0d": "365d"
|
maxAge: DEV_MODE? "0d": "365d"
|
||||||
}));
|
}));
|
||||||
|
app.use("/datastore", Express.static(Path.join(__dirname, (config.filePath || './datastore')), {
|
||||||
|
maxAge: "0d"
|
||||||
|
}));
|
||||||
|
|
||||||
app.use("/customize", Express.static(__dirname + '/customize'));
|
app.use("/customize", Express.static(__dirname + '/customize'));
|
||||||
app.use("/customize", Express.static(__dirname + '/customize.dist'));
|
app.use("/customize", Express.static(__dirname + '/customize.dist'));
|
||||||
|
|||||||
@@ -650,6 +650,12 @@ define([
|
|||||||
Cryptpad.getMetadata(waitFor(function (err, m) {
|
Cryptpad.getMetadata(waitFor(function (err, m) {
|
||||||
cpNfCfg.owners = [m.priv.edPublic];
|
cpNfCfg.owners = [m.priv.edPublic];
|
||||||
}));
|
}));
|
||||||
|
} else if (isNewFile && !cfg.useCreationScreen && window.location.hash) {
|
||||||
|
console.log("new file with hash in the address bar in an app without pcs and which requires owners");
|
||||||
|
sframeChan.onReady(function () {
|
||||||
|
sframeChan.query("EV_LOADING_ERROR", "DELETED");
|
||||||
|
});
|
||||||
|
waitFor.abort();
|
||||||
}
|
}
|
||||||
}).nThen(function () {
|
}).nThen(function () {
|
||||||
Object.keys(rtConfig).forEach(function (k) {
|
Object.keys(rtConfig).forEach(function (k) {
|
||||||
|
|||||||
@@ -435,6 +435,15 @@ define([
|
|||||||
Feedback.init(feedback);
|
Feedback.init(feedback);
|
||||||
} catch (e) { Feedback.init(false); }
|
} catch (e) { Feedback.init(false); }
|
||||||
|
|
||||||
|
ctx.sframeChan.on('EV_LOADING_ERROR', function (err) {
|
||||||
|
if (err === 'DELETED') {
|
||||||
|
var msg = Messages.deletedError + '<br>' + Messages.errorRedirectToHome;
|
||||||
|
UI.errorLoadingScreen(msg, false, function () {
|
||||||
|
funcs.gotoURL('/drive/');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ctx.sframeChan.on('EV_LOGOUT', function () {
|
ctx.sframeChan.on('EV_LOGOUT', function () {
|
||||||
$(window).on('keyup', function (e) {
|
$(window).on('keyup', function (e) {
|
||||||
if (e.keyCode === 27) {
|
if (e.keyCode === 27) {
|
||||||
|
|||||||
@@ -227,4 +227,7 @@ define({
|
|||||||
// This is for sending data out of the iframe when we are in testing mode
|
// This is for sending data out of the iframe when we are in testing mode
|
||||||
// The exact protocol is defined in common/test.js
|
// The exact protocol is defined in common/test.js
|
||||||
'EV_TESTDATA': true,
|
'EV_TESTDATA': true,
|
||||||
|
|
||||||
|
// Critical error outside the iframe during loading screen
|
||||||
|
'EV_LOADING_ERROR': true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2096,7 +2096,7 @@ define([
|
|||||||
var parsed = Hash.parsePadUrl(href);
|
var parsed = Hash.parsePadUrl(href);
|
||||||
var $table = $('<table>');
|
var $table = $('<table>');
|
||||||
var $icon = $('<td>', {'rowspan': '3', 'class': 'cp-app-drive-search-icon'})
|
var $icon = $('<td>', {'rowspan': '3', 'class': 'cp-app-drive-search-icon'})
|
||||||
.append(getFileIcon(href));
|
.append(getFileIcon(r.id));
|
||||||
var $title = $('<td>', {
|
var $title = $('<td>', {
|
||||||
'class': 'cp-app-drive-search-col1 cp-app-drive-search-title'
|
'class': 'cp-app-drive-search-col1 cp-app-drive-search-title'
|
||||||
}).text(r.data.title)
|
}).text(r.data.title)
|
||||||
|
|||||||
@@ -53,7 +53,11 @@ define([
|
|||||||
return void cb(null, Hash.getSecrets('profile', editHash));
|
return void cb(null, Hash.getSecrets('profile', editHash));
|
||||||
}
|
}
|
||||||
// 3rd case: profile creation (create a new random hash, store it later if needed)
|
// 3rd case: profile creation (create a new random hash, store it later if needed)
|
||||||
if (!Utils.LocalStore.isLoggedIn()) { return void cb(); }
|
if (!Utils.LocalStore.isLoggedIn()) {
|
||||||
|
// Unregistered users can't create a profile
|
||||||
|
window.location.href = '/drive';
|
||||||
|
return void cb();
|
||||||
|
}
|
||||||
var hash = Hash.createRandomHash();
|
var hash = Hash.createRandomHash();
|
||||||
var secret = Hash.getSecrets('profile', hash);
|
var secret = Hash.getSecrets('profile', hash);
|
||||||
Cryptpad.pinPads([secret.channel], function (e) {
|
Cryptpad.pinPads([secret.channel], function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user