DEV: Remove chat plugin button (#16342)

This commit is contained in:
Penar Musaraj 2022-03-31 09:16:33 -04:00 committed by GitHub
parent 558bc6b746
commit e66933ead4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 22 deletions

View File

@ -87,32 +87,10 @@ function _rangeElements(element) {
function initializeDiscourseLocalDates(api) {
const siteSettings = api.container.lookup("site-settings:main");
const chat = api.container.lookup("service:chat");
const defaultTitle = I18n.t("discourse_local_dates.default_title", {
site_name: siteSettings.title,
});
if (chat) {
chat.addToolbarButton({
title: "discourse_local_dates.title",
id: "local-dates",
icon: "calendar-alt",
action: "insertDiscourseLocalDate",
});
api.modifyClass("component:chat-composer", {
pluginId: "discourse-local-dates",
actions: {
insertDiscourseLocalDate() {
const insertDate = this.addText.bind(this);
showModal("discourse-local-dates-create-modal").setProperties({
insertDate,
});
},
},
});
}
api.decorateCookedElement(
(elem, helper) => {
const dates = elem.querySelectorAll(".discourse-local-date");