From 1d110f4b6076be01be223b435abce2faf202d5f4 Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Mon, 11 Dec 2023 13:05:41 +0300 Subject: [PATCH] DEV: Remove decoration for legacy hamburger menu (#160) The `legacy` option has been removed from the `navigation_menu` site setting, so we can remove all the logic that's related to the `legacy` option from this plugin. Internal topic: t/113137. --- .../discourse/initializers/setup-docs.js | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/assets/javascripts/discourse/initializers/setup-docs.js b/assets/javascripts/discourse/initializers/setup-docs.js index 7c848da..911a56e 100644 --- a/assets/javascripts/discourse/initializers/setup-docs.js +++ b/assets/javascripts/discourse/initializers/setup-docs.js @@ -46,22 +46,12 @@ export default { } withPluginApi("1.2.0", (api) => { - if (siteSettings.navigation_menu !== "legacy") { - api.addCommunitySectionLink({ - name: "docs", - route: "docs.index", - title: I18n.t("sidebar.docs_link_title"), - text: I18n.t("sidebar.docs_link_text"), - }); - } else { - api.decorateWidget("hamburger-menu:generalLinks", () => { - return { - route: "docs", - label: "docs.title", - className: "docs-link", - }; - }); - } + api.addCommunitySectionLink({ + name: "docs", + route: "docs.index", + title: I18n.t("sidebar.docs_link_title"), + text: I18n.t("sidebar.docs_link_text"), + }); }); }, };