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 // Make sure we can only upload files in the Documents tree
var p = ev.path; var p = ev.path;
if (!Array.isArray(p) || !p.length || p[0] !== ROOT) { 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); APP.FM.onFileDrop(file, ev);

@ -1376,7 +1376,7 @@ define([
var unsaved = APP.unsavedChanges; var unsaved = APP.unsavedChanges;
delete APP.unsavedChanges; delete APP.unsavedChanges;
rtChannel.sendMsg(unsaved, null, function (err, hash) { 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 // 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 // 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. // correctly sent so that we can apply it to our OO too.

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

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

Loading…
Cancel
Save