Vanessa 2023-05-14 09:55:50 +08:00
parent 2ae4192392
commit e6923bdebc
2 changed files with 8 additions and 5 deletions

View file

@ -151,7 +151,7 @@ export const keymap = {
if (keymapString === "" || (liElement.querySelector(".b3-text-field") as HTMLInputElement).value.indexOf(updateHotkeyTip(keymapString)) > -1) {
matchedKeymap = true;
}
if ((item.textContent.toLowerCase().indexOf(value.toLowerCase()) > -1 || value === "") && matchedKeymap) {
if ((item.textContent.toLowerCase().indexOf(value.toLowerCase()) > -1 || value.toLowerCase().indexOf(item.textContent.toLowerCase()) > -1 || value === "") && matchedKeymap) {
liElement.classList.remove("fn__none");
liElement.parentElement.classList.remove("fn__none");
liElement.parentElement.parentElement.classList.remove("fn__none");

View file

@ -14,13 +14,13 @@ const getLang = (keys: string[]) => {
export const initConfigSearch = (element: HTMLElement, app: App) => {
const configIndex = [
// 编辑器
getLang(["config", "fullWidth", "md7", "md8",
getLang(["config", "fullWidth", "md7", "md8", "md37", "md38",
"editor", "md2", "md3", "md12", "md16", "md27", "md28", "md29", "md30", "md31", "md32", "md33", "md34",
"md39", "md40", "fontSizeTip", "fontSize", "font", "font1", "generateHistory", "generateHistoryInterval",
"historyRetentionDays", "historyRetentionDaysTip", "clearHistory", "katexMacros", "katexMacrosTip",
"editReadonly", "editReadonlyTip", "embedBlockBreadcrumb", "embedBlockBreadcrumbTip", "outlineOutdentTip",
"outdent", "floatWindowMode", "floatWindowModeTip", "justify", "justifyTip", "rtl", "rtlTip", "spellcheck",
"spellcheckTip", "backlinkExpand", "backlinkExpandTip", "onlySearchForDocTip"
"spellcheckTip", "backlinkExpand", "backlinkExpandTip", "onlySearchForDocTip", "dynamicLoadBlocks", "dynamicLoadBlocksTip",
]),
// 文档树
@ -29,7 +29,9 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
"fileTree16", "fileTree17"]),
// 闪卡
getLang(["riffCard"]),
getLang(["riffCard", "flashcardNewCardLimit", "flashcardNewCardLimitTip", "flashcardReviewCardLimit",
"flashcardNewCardLimit", "flashcardReviewCardLimitTip", "flashcardMark", "flashcardMarkTip", "flashcardList",
"flashcardSuperBlock", "flashcardDeck", "flashcardDeckTip"]),
// AI
["AI"].concat(getLang(["ai", "apiTimeout", "apiTimeoutTip", "apiMaxTokens", "apiMaxTokensTip", "apiKey",
@ -40,7 +42,8 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
// 导出
getLang(["paragraphBeginningSpace", "md4", "export", "export1", "export2", "export5", "export11",
"export13", "export14", "export15", "export19", "export20", "ref", "blockEmbed"]),
"export13", "export14", "export15", "export19", "export20", "ref", "blockEmbed", "export17", "export18",
"export23", "export24"]),
// 外观
getLang(["language", "language1", "appearance", "appearance1", "appearance2",