Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 改进斜杠菜单的元素高度 #14000

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/assets/scss/protyle/_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
background-color: var(--b3-menu-background);
z-index: 5;
overflow: auto;
max-height: 402px;
max-height: min(402px, 40vh);
// 不能使用,否则 hint emoji 出现双滚动条 box-sizing: border-box;
padding: 8px 0;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion app/src/dialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class Dialog {
}
this.element.innerHTML = `<div class="b3-dialog" style="z-index: ${++window.siyuan.zIndex};${typeof left === "string" ? "display:block" : ""}">
<div class="b3-dialog__scrim"${options.transparent ? 'style="background-color:transparent"' : ""}></div>
<div class="b3-dialog__container ${options.containerClassName}" style="width:${options.width || "auto"};height:${options.height || "auto"};left:${left};top:${top}">
<div class="b3-dialog__container${options.containerClassName ? ` ${options.containerClassName}` : ""}" style="width:${options.width || "auto"};height:${options.height || "auto"};${left ? `left:${left};` : ""}${top ? `top:${top}` : ""}">
<svg ${(isMobile() && options.title) ? 'style="top:0;right:0;"' : ""} class="b3-dialog__close${(this.disableClose || options.hideCloseIcon) ? " fn__none" : ""}"><use xlink:href="#iconCloseRound"></use></svg>
<div class="resize__move b3-dialog__header${options.title ? "" : " fn__none"}" onselectstart="return false;">${options.title || ""}</div>
<div class="b3-dialog__body">${options.content}</div>
Expand Down
4 changes: 2 additions & 2 deletions app/src/protyle/hint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ ${genHintItemHTML(item)}
}
lazyLoadEmojiImg(panelElement);
} else {
// 402 和 .protyle-hint 保持一致,用户 /emoji
this.element.innerHTML = `<div style="padding: 0;max-height:402px;width:360px" class="emojis">
// /emoji 菜单,min(402px,40vh) 和 .protyle-hint 保持一致,否则不显示底部导航栏
this.element.innerHTML = `<div style="padding:0;max-height:min(402px,40vh);width:368px" class="emojis">
<div class="emojis__panel">${filterEmoji(value, 256)}</div>
<div class="fn__flex${value ? " fn__none" : ""}">
${[
Expand Down