This commit is contained in:
Vanessa 2022-06-03 16:15:57 +08:00
parent cdb60e86e5
commit ac9c9cb9e0
4 changed files with 8 additions and 1 deletions

View file

@ -70,6 +70,10 @@
} }
} }
&--selected {
color: var(--b3-theme-primary);
}
&--current { &--current {
background-color: var(--b3-list-hover); background-color: var(--b3-list-hover);
} }

View file

@ -109,6 +109,7 @@
background-color: var(--b3-theme-background); background-color: var(--b3-theme-background);
flex-shrink: 0; flex-shrink: 0;
box-sizing: border-box; box-sizing: border-box;
min-height: 30px;
&__bar { &__bar {
align-items: center; align-items: center;

View file

@ -77,7 +77,7 @@ export class MenuItem {
} }
this.element.classList.add("b3-menu__item"); this.element.classList.add("b3-menu__item");
if (options.current) { if (options.current) {
this.element.classList.add("b3-menu__item--current"); this.element.classList.add("b3-menu__item--selected");
} }
if (options.click) { if (options.click) {
this.element.addEventListener(getEventName(), (event) => { this.element.addEventListener(getEventName(), (event) => {

View file

@ -10,6 +10,7 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
protyle.contentElement.classList.add("fn__none"); protyle.contentElement.classList.add("fn__none");
protyle.scroll?.element.classList.add("fn__none"); protyle.scroll?.element.classList.add("fn__none");
protyle.breadcrumb.element.classList.add("fn__none"); protyle.breadcrumb.element.classList.add("fn__none");
protyle.breadcrumb.element.nextElementSibling.classList.add("fn__flex-1");
protyle.preview.render(protyle); protyle.preview.render(protyle);
} else if (type === "wysiwyg") { } else if (type === "wysiwyg") {
@ -22,6 +23,7 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
protyle.contentElement.classList.remove("fn__none"); protyle.contentElement.classList.remove("fn__none");
protyle.scroll?.element.classList.remove("fn__none"); protyle.scroll?.element.classList.remove("fn__none");
protyle.breadcrumb.element.classList.remove("fn__none"); protyle.breadcrumb.element.classList.remove("fn__none");
protyle.breadcrumb.element.nextElementSibling.classList.remove("fn__flex-1");
} }
hideElements( ["gutter", "toolbar", "select", "hint", "util"], protyle); hideElements( ["gutter", "toolbar", "select", "hint", "util"], protyle);