diff --git a/app/src/assets/scss/component/_chip.scss b/app/src/assets/scss/component/_chip.scss index 0e917a738..4f37755fc 100644 --- a/app/src/assets/scss/component/_chip.scss +++ b/app/src/assets/scss/component/_chip.scss @@ -89,6 +89,7 @@ a.b3-chip:hover { transition: var(--b3-transition); cursor: pointer; opacity: .68; + flex-shrink: 0; &:hover { // 不明原因 https://github.com/siyuan-note/siyuan/issues/7756#issuecomment-1484057954 diff --git a/app/src/constants.ts b/app/src/constants.ts index 5fce363d6..cd2fc43b6 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -67,7 +67,6 @@ export abstract class Constants { public static readonly LOCAL_ZOOM = "local-zoom"; public static readonly LOCAL_SEARCHDATA = "local-searchdata"; public static readonly LOCAL_SEARCHKEYS = "local-searchkeys"; - public static readonly LOCAL_SEARCHKEY = "local-searchkey"; // only mobile public static readonly LOCAL_DOCINFO = "local-docinfo"; // only mobile public static readonly LOCAL_DAILYNOTEID = "local-dailynoteid"; // string public static readonly LOCAL_HISTORYNOTEID = "local-historynoteid"; // string diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.ts index 396b6f785..7598113cb 100644 --- a/app/src/mobile/menu/search.ts +++ b/app/src/mobile/menu/search.ts @@ -4,10 +4,71 @@ import {Constants} from "../../constants"; import {fetchPost} from "../../util/fetch"; import {getIconByType} from "../../editor/getIcon"; import {preventScroll} from "../../protyle/scroll/preventScroll"; -import {setStorageVal} from "../../protyle/util/compatibility"; import {openModel} from "./model"; +import {getNotebookName, movePathTo, pathPosix} from "../../util/pathName"; +import {filterMenu, initCriteriaMenu, moreMenu, queryMenu} from "../../search/menu"; +import {setStorageVal} from "../../protyle/util/compatibility"; +import {escapeHtml} from "../../util/escape"; -const onRecentBlocks = (data: IBlock[], matchedRootCount?:number, matchedBlockCount?:number) => { +const updateConfig = (element: Element, newConfig: ISearchOption, config: ISearchOption) => { + newConfig.hPath = config.hPath; + newConfig.idPath = config.idPath.join(",").split(","); + if (config.hasReplace !== newConfig.hasReplace) { + if (newConfig.hasReplace) { + element.querySelector('[data-type="toggle-replace"]').classList.add("toolbar__icon--active"); + element.querySelector(".toolbar").classList.remove("fn__none"); + } else { + element.querySelector('[data-type="toggle-replace"]').classList.remove("toolbar__icon--active"); + element.querySelector(".toolbar").classList.add("fn__none"); + } + } + const searchPathElement = element.querySelector("#searchPath"); + if (newConfig.hPath) { + searchPathElement.classList.remove("fn__none") + searchPathElement.innerHTML = `