mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 04:43:37 +08:00
DEV: Remove chat plugin button (#16342)
This commit is contained in:
parent
558bc6b746
commit
e66933ead4
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user