mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-10 05:06:56 +08:00
Editors: Adjusted new design for mobile and dark mode
Tested new design across FF, Chrome, and Gnome web (webkit)
This commit is contained in:
@ -8,6 +8,7 @@ export class EditorToolbox extends Component {
|
||||
this.buttons = this.$manyRefs.tabButton;
|
||||
this.contentElements = this.$manyRefs.tabContent;
|
||||
this.toggleButton = this.$refs.toggle;
|
||||
this.editorWrapEl = this.container.closest('.page-editor');
|
||||
|
||||
this.setupListeners();
|
||||
|
||||
@ -30,8 +31,9 @@ export class EditorToolbox extends Component {
|
||||
|
||||
toggle() {
|
||||
this.container.classList.toggle('open');
|
||||
const expanded = this.container.classList.contains('open') ? 'true' : 'false';
|
||||
this.toggleButton.setAttribute('aria-expanded', expanded);
|
||||
const isOpen = this.container.classList.contains('open');
|
||||
this.toggleButton.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
|
||||
this.editorWrapEl.classList.toggle('toolbox-open', isOpen);
|
||||
}
|
||||
|
||||
setActiveTab(tabName, openToolbox = false) {
|
||||
|
Reference in New Issue
Block a user