Merge branch 'staging' of github.com:xwiki-labs/cryptpad into login

This commit is contained in:
ansuz
2016-12-22 16:54:51 +01:00
16 changed files with 411 additions and 117 deletions

View File

@@ -10,8 +10,7 @@ define([
var main = function () {
var url = window.location.pathname;
var isHtml = /\.html/.test(url) || url === '/' || url === '';
var isPoll = /\/poll\//.test(url);
if (!isHtml && !isPoll) {
if (!isHtml) {
Messages._applyTranslation();
return;
}

View File

@@ -86,6 +86,14 @@ define([
cb();
};
Store.addTemplate = function (href) {
filesOp.addTemplate(href);
};
Store.listTemplates = function () {
return filesOp.listTemplates();
};
Store.getProxy = function () {
return exp;
};
@@ -146,11 +154,6 @@ define([
if (!Cryptpad.getUserHash()) {
localStorage.FS_hash = Cryptpad.getEditHashFromKeys(info.channel, secret.keys);
}
window.patchText = TextPatcher.create({
realtime: realtime,
logging: true,
});
}).on('ready', function () {
if (!rt.proxy[Cryptpad.storageKey] || !Cryptpad.isArray(rt.proxy[Cryptpad.storageKey])) {
var oldStore = Cryptpad.getStore(true);
@@ -171,7 +174,7 @@ define([
}
return;
}
Cryptpad.alert(Messages.common_connectionLost);
//Cryptpad.alert(Messages.common_connectionLost);
});
};

View File

@@ -315,6 +315,37 @@ tr {
font-family: lato, Helvetica, sans-serif;
font-size: 1.02em;
}
#loading {
position: fixed;
z-index: 9999;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background: #302B28;
text-align: center;
font-size: 1.5em;
}
#loading .loadingContainer {
margin-top: 50vh;
transform: translateY(-50%);
}
#loading .cryptofist {
margin-left: auto;
margin-right: auto;
}
@media screen and (max-height: 450px) {
#loading .cryptofist {
display: none;
}
}
#loading .spinnerContainer {
position: relative;
height: 100px;
}
#loading .spinnerContainer > div {
height: 100px;
}
#main {
width: 70vw;
margin: auto;

View File

@@ -139,6 +139,8 @@ define([
});
};
displayCreateButtons();
Cryptpad.ready(function () {
console.log("ready");
@@ -149,7 +151,6 @@ define([
DecorateToolbar.main($('#bottom-bar'));
Cryptpad.styleAlerts();
displayCreateButtons();
refreshTable();
if (Cryptpad.store && Cryptpad.store.change) {
Cryptpad.store.change(function (data) {

View File

@@ -137,6 +137,36 @@ p, pre, td, a, table, tr {
.lato;
}
#loading {
position: fixed;
z-index: 9999;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background: @bg-loading;
text-align: center;
font-size: 1.5em;
.loadingContainer {
margin-top: 50vh;
transform: translateY(-50%);
}
.cryptofist {
margin-left: auto;
margin-right: auto;
@media screen and (max-height: 450px) {
display: none;
}
}
.spinnerContainer {
position: relative;
height: 100px;
> div {
height: 100px;
}
}
}
#main {
width: 70vw;
margin: auto;

View File

@@ -32,3 +32,4 @@
@alertify-input-bg: @base;
@alertify-input-fg: @fore;
@bg-loading: @base;

View File

@@ -19,6 +19,10 @@ define(function () {
].join('');
out.common_connectionLost = 'Connexion au serveur perdue';
out.websocketError = 'Impossible de se connecter au serveur WebSocket...';
out.loading = "Chargement...";
out.error = "Erreur";
out.disconnected = 'Déconnecté';
out.synchronizing = 'Synchronisation';
@@ -190,6 +194,10 @@ define(function () {
out.fm_unknownFolderError = "Le dossier sélectionné ou le dernier dossier visité n'existe plus. Ouverture du dossier parent...";
out.fm_contextMenuError = "Impossible d'ouvrir le menu contextuel pour cet élément. Si le problème persiste, essayez de rechercher la page.";
out.fm_selectError = "Impossible de sélectionner l'élément ciblé. Si le problème persiste, essayez de recharger la page.";
out.fm_info_root = "Créez ici autant de dossiers que vous le souhaitez pour trier vos fichiers.";
out.fm_info_unsorted = 'Contient tous les documents que vous avez ouvert et qui ne sont pas triés dans "Mes documents" ou déplacés vers la "Corbeille".'; // "My Documents" should match with the "out.fm_rootName" key, and "Trash" with "out.fm_trashName"
out.fm_info_trash = 'Les fichiers supprimés dans la corbeille sont également enlevés de "Tous les fichiers" et il est impossible de les récupérer depuis l\'explorateur de fichiers.'; // Same here for "All files" and "out.fm_filesDataName"
out.fm_info_allFiles = 'Contient tous les fichiers de "Mes documents", "Fichiers non triés" et "Corbeille". Vous ne pouvez pas supprimer ou déplacer des fichiers d\'ici.'; // Same here
// File - Context menu
out.fc_newfolder = "Nouveau dossier";
out.fc_rename = "Renommer";
@@ -208,6 +216,7 @@ define(function () {
out.fo_existingNameError = "Ce nom est déjà utilisé dans ce répertoire. Veuillez en choisir un autre.";
out.fo_moveFolderToChildError = "Vous ne pouvez pas déplacer un dossier dans un de ses descendants";
out.fo_unableToRestore = "Impossible de restaurer ce fichier à son emplacement d'origine. Vous pouvez essayer de le déplacer à un nouvel emplacement.";
out.fo_unavailableName = "Un fichier ou dossier avec le même nom existe déjà au nouvel emplacement. Renommez cet élément avant d'essayer à nouveau.";
// index.html

View File

@@ -23,6 +23,9 @@ define(function () {
out.common_connectionLost = 'Server Connection Lost';
out.websocketError = 'Unable to connect to the websocket server...';
out.loading = "Loading...";
out.error = "Error";
out.disconnected = 'Disconnected';
out.synchronizing = 'Synchronizing';
out.reconnecting = 'Reconnecting...';
@@ -169,6 +172,7 @@ define(function () {
out.fm_trashName = "Trash";
out.fm_unsortedName = "Unsorted files";
out.fm_filesDataName = "All files";
out.fm_templateName = "Templates";
out.fm_newFolder = "New folder";
out.fm_newFolderButton = "NEW FOLDER";
out.fm_folderName = "Folder name";
@@ -189,6 +193,10 @@ define(function () {
out.fm_unknownFolderError = "The selected or last visited directory no longer exist. Opening the parent folder...";
out.fm_contextMenuError = "Unable to open the context menu for that element. If the problem persist, try to reload the page.";
out.fm_selectError = "Unable to select the targetted element. If the problem persist, try to reload the page.";
out.fm_info_root = "Create as many nested folders here as you want to sort your files.";
out.fm_info_unsorted = 'Contains all the files you\'ve visited that are not yet sorted in "My Documents" or moved to the "Trash".'; // "My Documents" should match with the "out.fm_rootName" key, and "Trash" with "out.fm_trashName"
out.fm_info_trash = 'Files deleted from the trash are also removed from "All files" and it is impossible to recover them from the file manager.'; // Same here for "All files" and "out.fm_filesDataName"
out.fm_info_allFiles = 'Contains all the files from "My Documents", "Unsorted" and "Trash". You can\'t move or remove files from here.'; // Same here
// File - Context menu
out.fc_newfolder = "New folder";
out.fc_rename = "Rename";
@@ -207,6 +215,7 @@ define(function () {
out.fo_existingNameError = "Name already used in that directory. Please choose another one.";
out.fo_moveFolderToChildError = "You can't move a folder into one of its descendants";
out.fo_unableToRestore = "Unable to restore that file to its original location. You can try to move it to a new location.";
out.fo_unavailableName = "A file or a folder with the same name already exist at the new location. Rename the element and try again.";
// login
out.login_login = "log in";