* Add flag link to profile dropdown view * Add JS for flag button on profile * Only show flag button to trusted users * Quick fix for accidental unflagging This will be more properly addressed in a future refactoring. * Update reaction specs * Update spec * Make flagging togglable * Make CodeClimate happy * Revert accidentally changed file * CodeClimate * Update app/javascript/profileDropdown/flagButton.js Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com> * Add JSDoc * Remove second popup * Refactor and add system spec * CodeClimate * Change send to public_send * Address PR feedback by @aitchiss Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
13 lines
254 B
JavaScript
13 lines
254 B
JavaScript
import { initBlock } from '../profileDropdown/blockButton';
|
|
import { initFlag } from '../profileDropdown/flagButton';
|
|
|
|
function initButtons() {
|
|
initBlock();
|
|
initFlag();
|
|
}
|
|
|
|
window.InstantClick.on('change', () => {
|
|
initButtons();
|
|
});
|
|
|
|
initButtons();
|