From cfc9ce33d6c7034a13cb0e6d606de6fba38697e0 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 19 Dec 2017 11:58:45 +0100 Subject: [PATCH] Hide the tags button for anonymous users --- www/common/sframe-app-framework.js | 6 ++++-- www/file/inner.js | 6 ++++-- www/poll/inner.js | 6 +++--- www/whiteboard/inner.js | 3 ++- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index fbe872d76..ee91a295e 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -527,8 +527,10 @@ define([ stateChange(STATE.FORGOTTEN); })); - var $tags = common.createButton('hashtag', true); - toolbar.$rightside.append($tags); + if (common.isLoggedIn()) { + var $tags = common.createButton('hashtag', true); + toolbar.$rightside.append($tags); + } createFilePicker(); diff --git a/www/file/inner.js b/www/file/inner.js index 0bc7a2000..30e742528 100644 --- a/www/file/inner.js +++ b/www/file/inner.js @@ -140,8 +140,10 @@ define([ })) .append(common.createButton('forget', true, {}, function () { // not sure what to do here - })) - .append(common.createButton('hashtag', true)); + })); + if (common.isLoggedIn()) { + toolbar.$rightside.append(common.createButton('hashtag', true)); + } rightsideDisplayed = true; } diff --git a/www/poll/inner.js b/www/poll/inner.js index aa1c62a57..471b8ce13 100644 --- a/www/poll/inner.js +++ b/www/poll/inner.js @@ -1164,10 +1164,10 @@ define([ }; common.openFilePicker(pickerCfg); }).appendTo($rightside); - } - var $tags = common.createButton('hashtag', true); - $rightside.append($tags); + var $tags = common.createButton('hashtag', true); + $rightside.append($tags); + } }; diff --git a/www/whiteboard/inner.js b/www/whiteboard/inner.js index 4b9528cb7..ab04032c6 100644 --- a/www/whiteboard/inner.js +++ b/www/whiteboard/inner.js @@ -439,6 +439,8 @@ define([ APP.upload(name); }); }).appendTo($rightside); + + common.createButton('hashtag', true).appendTo($rightside); } var $forget = common.createButton('forget', true, {}, function (err) { @@ -446,7 +448,6 @@ define([ setEditable(false); }); $rightside.append($forget); - common.createButton('hashtag', true).appendTo($rightside); if (!readOnly) { makeColorButton($rightside);