FIX: hide emoji toolbar button when emoji are disabled
This commit is contained in:
parent
1055fc0919
commit
a115b4b7f0
|
@ -0,0 +1,17 @@
|
||||||
|
import { showSelector } from "discourse/lib/emoji/emoji-toolbar";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'enable-emoji',
|
||||||
|
after: 'inject-objects',
|
||||||
|
|
||||||
|
initialize: function(container) {
|
||||||
|
var siteSettings = container.lookup('site-settings:main');
|
||||||
|
if (siteSettings.enable_emoji) {
|
||||||
|
window.PagedownCustom.appendButtons.push({
|
||||||
|
id: 'wmd-emoji-button',
|
||||||
|
description: I18n.t("composer.emoji"),
|
||||||
|
execute: showSelector
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -154,8 +154,4 @@ var showSelector = function(){
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
window.PagedownCustom.appendButtons.push({
|
export { showSelector };
|
||||||
id: 'wmd-emoji-button',
|
|
||||||
description: I18n.t("composer.emoji"),
|
|
||||||
execute: showSelector
|
|
||||||
});
|
|
Loading…
Reference in New Issue