Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
commit
43b8873c9e
|
@ -31,7 +31,7 @@
|
|||
"hyperjson": "~1.4.0",
|
||||
"chainpad-crypto": "^0.1.8",
|
||||
"chainpad-listmap": "^0.5.0",
|
||||
"chainpad": "^5.0.0",
|
||||
"chainpad": "^5.1.0",
|
||||
"chainpad-netflux": "^0.7.0",
|
||||
"file-saver": "1.3.1",
|
||||
"alertifyjs": "1.0.11",
|
||||
|
|
|
@ -154,6 +154,7 @@ define([
|
|||
proxy.login_name = uname;
|
||||
proxy[Constants.displayNameKey] = uname;
|
||||
sessionStorage.createReadme = 1;
|
||||
if (!shouldImport) { proxy.version = 5; }
|
||||
Feedback.send('REGISTRATION', true);
|
||||
} else {
|
||||
Feedback.send('LOGIN', true);
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
background-size: contain;
|
||||
height: 50px;
|
||||
width: 250px;
|
||||
margin-right: 0;
|
||||
}
|
||||
a {
|
||||
border: 2px solid transparent;
|
||||
|
@ -169,7 +170,8 @@
|
|||
.nav-link {
|
||||
padding: 0.5em 0.7em;
|
||||
&:hover {
|
||||
transform: scale(1.05);
|
||||
font-size: 1.05em;
|
||||
//transform: scale(1.05);
|
||||
};
|
||||
}
|
||||
.cp-register-btn {
|
||||
|
@ -184,9 +186,18 @@
|
|||
color: #4591C4;
|
||||
}
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
@media (max-width: 1000px) {
|
||||
#menuCollapse {
|
||||
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 {
|
||||
text-align: right !important;
|
||||
|
@ -194,7 +205,7 @@
|
|||
.cp-register-btn {
|
||||
margin-right: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//footer general styles
|
||||
|
|
|
@ -23,11 +23,7 @@
|
|||
}
|
||||
margin-top: 16px;
|
||||
font-size: 1.25em;
|
||||
min-width: 30%; // conflict?
|
||||
width: 30%;
|
||||
@media (max-width: 500px) {
|
||||
width: 45%;
|
||||
}
|
||||
min-width: 30%;
|
||||
}
|
||||
}
|
||||
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>' +
|
||||
'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.errorRedirectToHome = 'Appuyez sur <em>Échap</em> pour retourner vers votre CryptDrive.';
|
||||
|
||||
out.loading = "Chargement...";
|
||||
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>' +
|
||||
'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.errorRedirectToHome = 'Press <em>Esc</em> to be redirected to your CryptDrive.';
|
||||
|
||||
out.loading = "Loading...";
|
||||
out.error = "Error";
|
||||
|
|
|
@ -75,6 +75,12 @@ server {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,6 +123,9 @@ app.get(mainPagePattern, Express.static(__dirname + '/customize.dist'));
|
|||
app.use("/blob", Express.static(Path.join(__dirname, (config.blobPath || './blob')), {
|
||||
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.dist'));
|
||||
|
|
|
@ -650,6 +650,12 @@ define([
|
|||
Cryptpad.getMetadata(waitFor(function (err, m) {
|
||||
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 () {
|
||||
Object.keys(rtConfig).forEach(function (k) {
|
||||
|
|
|
@ -435,6 +435,15 @@ define([
|
|||
Feedback.init(feedback);
|
||||
} 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 () {
|
||||
$(window).on('keyup', function (e) {
|
||||
if (e.keyCode === 27) {
|
||||
|
|
|
@ -227,4 +227,7 @@ define({
|
|||
// This is for sending data out of the iframe when we are in testing mode
|
||||
// The exact protocol is defined in common/test.js
|
||||
'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 $table = $('<table>');
|
||||
var $icon = $('<td>', {'rowspan': '3', 'class': 'cp-app-drive-search-icon'})
|
||||
.append(getFileIcon(href));
|
||||
.append(getFileIcon(r.id));
|
||||
var $title = $('<td>', {
|
||||
'class': 'cp-app-drive-search-col1 cp-app-drive-search-title'
|
||||
}).text(r.data.title)
|
||||
|
|
|
@ -53,7 +53,11 @@ define([
|
|||
return void cb(null, Hash.getSecrets('profile', editHash));
|
||||
}
|
||||
// 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 secret = Hash.getSecrets('profile', hash);
|
||||
Cryptpad.pinPads([secret.channel], function (e) {
|
||||
|
|
Loading…
Reference in New Issue