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

This commit is contained in:
ansuz 2017-04-28 17:13:18 +02:00
commit cf4dee28f7
4 changed files with 6 additions and 4 deletions

View file

@ -574,7 +574,7 @@ define([
if (!contains) { if (!contains) {
var data = makePad(href, name); var data = makePad(href, name);
getStore().pushData(data, function (e, state) { getStore().pushData(data, function (e) {
if (e) { if (e) {
if (e === 'E_OVER_LIMIT') { if (e === 'E_OVER_LIMIT') {
common.alert(Messages.pinLimitNotPinned, null, true); common.alert(Messages.pinLimitNotPinned, null, true);
@ -725,6 +725,7 @@ define([
}; };
var isOverPinLimit = common.isOverPinLimit = function (cb) { var isOverPinLimit = common.isOverPinLimit = function (cb) {
if (!common.isLoggedIn()) { return void cb(null, false); }
var usage; var usage;
var andThen = function (e, limit) { var andThen = function (e, limit) {
if (e) { return void cb(e); } if (e) { return void cb(e); }

View file

@ -538,7 +538,7 @@ define([
// User dropdown // User dropdown
if (config.displayed.indexOf('useradmin') !== -1) { if (config.displayed.indexOf('useradmin') !== -1) {
var userMenuCfg = {}; var userMenuCfg = {};
if (config.userData) { if (!config.hideDisplayName) {
userMenuCfg = { userMenuCfg = {
displayNameCls: USERNAME_CLS, displayNameCls: USERNAME_CLS,
changeNameButtonCls: USERBUTTON_CLS, changeNameButtonCls: USERBUTTON_CLS,

View file

@ -434,7 +434,7 @@ define([
files[FILES_DATA].push(data); files[FILES_DATA].push(data);
cb(); cb();
}; };
if (!Cryptpad.isLoggedIn() || !AppConfig.enablePinning) { todo(); } if (!Cryptpad.isLoggedIn() || !AppConfig.enablePinning) { return void todo(); }
Cryptpad.pinPads([Cryptpad.hrefToHexChannelId(data.href)], function (e, hash) { Cryptpad.pinPads([Cryptpad.hrefToHexChannelId(data.href)], function (e, hash) {
if (e) { return void cb(e); } if (e) { return void cb(e); }
todo(); todo();

View file

@ -115,7 +115,8 @@ define([
share: { share: {
secret: secret, secret: secret,
channel: hexFileName channel: hexFileName
} },
hideDisplayName: true
}; };
Toolbar.create($bar, null, null, null, null, configTb); Toolbar.create($bar, null, null, null, null, configTb);
var $rightside = $bar.find('.' + Toolbar.constants.rightside); var $rightside = $bar.find('.' + Toolbar.constants.rightside);