Display the error when opening a document with the wrong app

pull/1/head
yflory 8 years ago
parent 6f0d33dc1d
commit 7e7d1f7a16

@ -22,7 +22,9 @@ define(function () {
].join('');
out.common_connectionLost = "<b>Connexion au serveur perdue</b><br>Vous êtes désormais en mode lecture seule jusqu'au retour de la connexion.";
out.websocketError = 'Impossible de se connecter au serveur WebSocket...';
out.typeError = "Ce document temps-réel n'est pas compatible avec l'application sélectionnée";
out.loading = "Chargement...";
out.error = "Erreur";

@ -28,6 +28,7 @@ define(function () {
out.common_connectionLost = out.updated_common_connectionLostAndInfo;
out.websocketError = 'Unable to connect to the websocket server...';
out.typeError = "That realtime document is not compatible with the selected application";
out.loading = "Loading...";
out.error = "Error";

@ -558,7 +558,9 @@ define([
var hjson = JSON.parse(userDoc);
if (typeof (hjson) !== 'object' || Array.isArray(hjson)) {
throw new Error("That realtime document is not compatible with the Code app");
var errorText = Messages.typeError;
Cryptpad.errorLoadingScreen(errorText);
throw new Error(errorText);
}
newDoc = hjson.content;

@ -631,7 +631,9 @@ define([
newDoc = hjson.content;
if (typeof (hjson) !== 'object' || Array.isArray(hjson)) {
throw new Error("That realtime document is not compatible with the Slide app");
var errorText = Messages.typeError;
Cryptpad.errorLoadingScreen(errorText);
throw new Error(errorText);
}
if (hjson.highlightMode) {

Loading…
Cancel
Save