diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index a2d2f5aaf..6d51c999c 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -574,7 +574,7 @@ define([ if (!contains) { var data = makePad(href, name); - getStore().pushData(data, function (e, state) { + getStore().pushData(data, function (e) { if (e) { if (e === 'E_OVER_LIMIT') { common.alert(Messages.pinLimitNotPinned, null, true); @@ -725,6 +725,7 @@ define([ }; var isOverPinLimit = common.isOverPinLimit = function (cb) { + if (!common.isLoggedIn()) { return void cb(null, false); } var usage; var andThen = function (e, limit) { if (e) { return void cb(e); } diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 7dbba925c..f8781d073 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -538,7 +538,7 @@ define([ // User dropdown if (config.displayed.indexOf('useradmin') !== -1) { var userMenuCfg = {}; - if (config.userData) { + if (!config.hideDisplayName) { userMenuCfg = { displayNameCls: USERNAME_CLS, changeNameButtonCls: USERBUTTON_CLS, diff --git a/www/common/userObject.js b/www/common/userObject.js index 0197367a4..adb394678 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -434,7 +434,7 @@ define([ files[FILES_DATA].push(data); cb(); }; - if (!Cryptpad.isLoggedIn() || !AppConfig.enablePinning) { todo(); } + if (!Cryptpad.isLoggedIn() || !AppConfig.enablePinning) { return void todo(); } Cryptpad.pinPads([Cryptpad.hrefToHexChannelId(data.href)], function (e, hash) { if (e) { return void cb(e); } todo(); diff --git a/www/file/main.js b/www/file/main.js index e237d7a63..24ef72f2b 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -115,7 +115,8 @@ define([ share: { secret: secret, channel: hexFileName - } + }, + hideDisplayName: true }; Toolbar.create($bar, null, null, null, null, configTb); var $rightside = $bar.find('.' + Toolbar.constants.rightside);