This commit is contained in:
Vanessa 2023-04-07 23:45:10 +08:00
parent 57bc6db377
commit bc016afea1
6 changed files with 17 additions and 8 deletions

View file

@ -179,7 +179,7 @@ ${unicode2Emoji(childItem.ial.icon, false, "b3-list-item__graphic", true)}
${unicode2Emoji(item.ial.icon, false, "b3-list-item__graphic", true)}
<span class="b3-list-item__text">${item.content}</span>
</div>
<span class="b3-list-item__meta b3-list-item__meta--ellipsis"">${escapeGreat(title)}</span>
<span class="b3-list-item__text b3-list-item__meta" style="margin-top: -4px">${escapeGreat(title)}</span>
</div>`;
}
});
@ -350,7 +350,7 @@ const initSearchEvent = (element: Element, config: ISearchOption) => {
event.stopPropagation();
event.preventDefault();
break;
} else if (type === "include") {
} else if (type === "include" && !target.hasAttribute("disabled")){
target.classList.toggle("toolbar__icon--active");
if (target.classList.contains("toolbar__icon--active")) {
config.idPath.forEach((item, index) => {
@ -486,7 +486,7 @@ export const popSearch = (config = window.siyuan.storage[Constants.LOCAL_SEARCHD
html: `<div class="fn__flex-column" style="height: 100%">
<div class="toolbar toolbar--border${config.hasReplace ? "" : " fn__none"}">
<svg class="toolbar__icon"><use xlink:href="#iconReplace"></use></svg>
<input id="toolbarReplace" class="b3-text-field fn__flex-1">
<input id="toolbarReplace" style="font-size: 17px" class="b3-text-field fn__flex-1">
<svg class="fn__rotate fn__none toolbar__icon"><use xlink:href="#iconRefresh"></use></svg>
<div class="fn__space"></div>
<button data-type="replace-all" class="b3-button b3-button--outline fn__flex-center">${window.siyuan.languages.replaceAll}</button>

View file

@ -258,6 +258,10 @@ export const showKeyboardToolbar = (height: number) => {
return;
}
toolbarElement.classList.remove("fn__none");
const searchPathElement = document.getElementById("searchPath");
if (searchPathElement) {
(searchPathElement.nextElementSibling as HTMLElement).style.marginBottom = "42px"
}
const range = getSelection().getRangeAt(0);
if (!window.siyuan.mobile.editor ||
!window.siyuan.mobile.editor.protyle.wysiwyg.element.contains(range.startContainer)) {
@ -286,6 +290,10 @@ export const hideKeyboardToolbar = () => {
toolbarElement.classList.add("fn__none");
toolbarElement.style.height = "";
window.siyuan.mobile.editor.protyle.element.style.marginBottom = "";
const searchPathElement = document.getElementById("searchPath");
if (searchPathElement) {
(searchPathElement.nextElementSibling as HTMLElement).style.marginBottom = ""
}
};
export const activeBlur = () => {