diff --git a/assets/js/components/settings/interface.js b/assets/js/components/settings/interface.js index 9d3223d2..a67f10b6 100644 --- a/assets/js/components/settings/interface.js +++ b/assets/js/components/settings/interface.js @@ -4,7 +4,7 @@ * @author Pierre HUBERT */ -ComunicWeb.components.settings.interface = { +const SettingsInterface = { /** * Get general account settings @@ -175,4 +175,17 @@ ComunicWeb.components.settings.interface = { }) }) }, -} \ No newline at end of file + + /** + * Delete a custom emoji + * + * @param {Number} id The ID of the emoji to delete + */ + deleteEmoji: async function(id) { + await api("settings/delete_custom_emoji", { + emojiID: id + }, true); + }, +} + +ComunicWeb.components.settings.interface = SettingsInterface; \ No newline at end of file diff --git a/assets/js/pages/settings/sections/emojis.js b/assets/js/pages/settings/sections/emojis.js index d72ade0c..6781d73a 100644 --- a/assets/js/pages/settings/sections/emojis.js +++ b/assets/js/pages/settings/sections/emojis.js @@ -72,10 +72,36 @@ class EmojiesSection { line.innerHTML += "