pull/1/head
yflory 4 years ago
parent c9cec838d9
commit 62df09e48c

@ -1779,7 +1779,7 @@ define([
// Make sure we can only upload files in the Documents tree
var p = ev.path;
if (!Array.isArray(p) || !p.length || p[0] !== ROOT) {
return void UI.warn(Messages.error); // XXX new translation key? "~Can"t upload a file here"
return void UI.warn(Messages.fm_cantUploadHere);
}
APP.FM.onFileDrop(file, ev);

@ -1376,7 +1376,7 @@ define([
var unsaved = APP.unsavedChanges;
delete APP.unsavedChanges;
rtChannel.sendMsg(unsaved, null, function (err, hash) {
if (err) { return void UI.warn(Messages.error); } // XXX Better error message?
if (err) { return void UI.alert(Messages.oo_lostEdits); }
// This is supposed to be a "send" function to tell our OO
// to unlock the cell. We use this to know that the patch was
// correctly sent so that we can apply it to our OO too.

@ -714,7 +714,6 @@ define([
nThen(function (waitFor) {
var content = fi(c, f);
if (typeof(content) === "undefined") {
Messages.importError = "Failed to import (wrong format)"; // XXX
return void UI.warn(Messages.importError);
}
contentUpdate(content, waitFor);

@ -549,7 +549,7 @@ define([
if (obj && obj.error) {
$spinner.hide();
state = false;
if (obj.error === "OFFLINE") { return UI.alert(Messages.disconnected); } // XXX
if (obj.error === "OFFLINE") { return UI.warn(Messages.disconnected); }
console.error(obj.error);
return void UI.warn(Messages.error);
}
@ -963,9 +963,7 @@ define([
teamId: APP.team
}, function (obj) {
if (obj && obj.error) {
if (obj.error === 'OFFLINE') {
return; // XXX show offline message in chat section
}
if (obj.error === 'OFFLINE') { return; }
return void UI.alert(Messages.error);
}
common.setTeamChat(obj.channel);

Loading…
Cancel
Save