UX: prevent anons from clearing pins in topic view
This commit is contained in:
parent
8c91d418dd
commit
826584b9c1
|
@ -8,15 +8,10 @@ export default Ember.Component.extend(bufferedRender({
|
|||
rerenderTriggers: ['topic.archived', 'topic.closed', 'topic.pinned', 'topic.visible', 'topic.unpinned', 'topic.is_warning'],
|
||||
|
||||
click(e) {
|
||||
if ($(e.target).hasClass('d-icon-thumb-tack')) {
|
||||
const topic = this.get('topic');
|
||||
|
||||
// only pin unpin for now
|
||||
if (topic.get('pinned')) {
|
||||
topic.clearPin();
|
||||
} else {
|
||||
topic.rePin();
|
||||
}
|
||||
if (this.get("canAct") && $(e.target).hasClass('d-icon-thumb-tack')) {
|
||||
const topic = this.get('topic');
|
||||
topic.get('pinned') ? topic.clearPin() : topic.rePin();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue