feat(client): display different icon to toggle sidebar on horizontal layout

This commit is contained in:
Elian Doran 2024-11-30 01:23:54 +02:00
parent ca6687208b
commit 4ecf49b175
No known key found for this signature in database

View File

@ -9,9 +9,13 @@ export default class LeftPaneToggleWidget extends CommandButtonWidget {
this.class(isHorizontalLayout ? "toggle-button" : "launcher-button");
this.settings.icon = () => options.is('leftPaneVisible')
? "bx-chevrons-left"
: "bx-chevrons-right";
this.settings.icon = () => {
if (options.get("layoutOrientation") === "horizontal") {
return "bx-sidebar";
}
return (options.is('leftPaneVisible') ? "bx-chevrons-left" : "bx-chevrons-right");
};
this.settings.title = () => options.is('leftPaneVisible')
? t("left_pane_toggle.hide_panel")