Vanessa 2024-05-16 17:46:15 +08:00
parent 4bf7b49beb
commit 60f6bf9a64
9 changed files with 203 additions and 139 deletions

View file

@ -393,11 +393,7 @@ export class Background {
/// #if !MOBILE
openGlobalSearch(protyle.app, `#${target.textContent}#`, !window.siyuan.ctrlIsPressed);
/// #else
const searchOption = window.siyuan.storage[Constants.LOCAL_SEARCHDATA];
popSearch(protyle.app, {
removed: searchOption.removed,
sort: searchOption.sort,
group: searchOption.group,
hasReplace: false,
method: 0,
hPath: "",
@ -405,8 +401,6 @@ export class Background {
k: `#${target.textContent}#`,
r: "",
page: 1,
types: Object.assign({}, searchOption.types),
replaceTypes: Object.assign({}, searchOption.replaceTypes)
});
/// #endif
event.preventDefault();

View file

@ -175,20 +175,11 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
notebook: protyle.notebookId,
path: searchPath + ".sy"
});
const localData = window.siyuan.storage[Constants.LOCAL_SEARCHDATA];
popSearch(protyle.app, {
removed: localData.removed,
sort: localData.sort,
group: localData.group,
hasReplace: false,
method: localData.method,
hPath: pathPosix().join(getNotebookName(protyle.notebookId), pathResponse.data),
idPath: [pathPosix().join(protyle.notebookId, searchPath)],
k: localData.k,
r: localData.r,
page: 1,
types: Object.assign({}, localData.types),
replaceTypes: Object.assign({}, localData.replaceTypes)
});
/// #else
openSearch({