Display the error when opening a document with the wrong app
This commit is contained in:
parent
6f0d33dc1d
commit
7e7d1f7a16
@ -22,7 +22,9 @@ define(function () {
|
|||||||
].join('');
|
].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.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.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.loading = "Chargement...";
|
||||||
out.error = "Erreur";
|
out.error = "Erreur";
|
||||||
|
|||||||
@ -28,6 +28,7 @@ define(function () {
|
|||||||
out.common_connectionLost = out.updated_common_connectionLostAndInfo;
|
out.common_connectionLost = out.updated_common_connectionLostAndInfo;
|
||||||
|
|
||||||
out.websocketError = 'Unable to connect to the websocket server...';
|
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.loading = "Loading...";
|
||||||
out.error = "Error";
|
out.error = "Error";
|
||||||
|
|||||||
@ -558,7 +558,9 @@ define([
|
|||||||
var hjson = JSON.parse(userDoc);
|
var hjson = JSON.parse(userDoc);
|
||||||
|
|
||||||
if (typeof (hjson) !== 'object' || Array.isArray(hjson)) {
|
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;
|
newDoc = hjson.content;
|
||||||
|
|||||||
@ -631,7 +631,9 @@ define([
|
|||||||
newDoc = hjson.content;
|
newDoc = hjson.content;
|
||||||
|
|
||||||
if (typeof (hjson) !== 'object' || Array.isArray(hjson)) {
|
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) {
|
if (hjson.highlightMode) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user