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.
This commit is contained in:
Osama Sayegh 2023-12-11 13:05:41 +03:00 committed by GitHub
parent 30e32fa59a
commit 1d110f4b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 16 deletions

View File

@ -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"),
});
});
},
};