diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index 00ef6ac3d..d5bbff5e0 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -216,7 +216,7 @@ } .def--mark { - background-color: var(--b3-protyle-inline-mark-background); + background-color: var(--b3-theme-secondary); } span[data-type~="block-ref"], diff --git a/app/src/constants.ts b/app/src/constants.ts index 1aa9378f6..ac164f56d 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -491,6 +491,9 @@ export abstract class Constants { public static readonly SIYUAN_ASSETS_AUDIO: string[] = [".mp3", ".wav", ".ogg", ".m4a"]; public static readonly SIYUAN_ASSETS_VIDEO: string[] = [".mov", ".weba", ".mkv", ".mp4", ".webm"]; public static readonly SIYUAN_ASSETS_EXTS: string[] = [".pdf"].concat(Constants.SIYUAN_ASSETS_IMAGE).concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO); + public static readonly SIYUAN_ASSETS_SEARCH: string[] = [".txt", ".md", ".markdown", ".docx", ".xlsx", ".pptx", ".pdf", ".json", ".log", ".sql", ".html", ".xml", ".java", ".h", ".c", + ".cpp", ".go", ".rs", ".swift", ".kt", ".py", ".php", ".js", ".css", ".ts", ".sh", ".bat", ".cmd", ".ini", ".yaml", + ".rst", ".adoc", ".textile", ".opml", ".org", ".wiki"]; // protyle public static readonly SIYUAN_CONFIG_APPEARANCE_DARK_CODE: string[] = ["a11y-dark", "agate", "an-old-hope", "androidstudio", diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts index 2114532a5..38be59ba7 100644 --- a/app/src/protyle/util/compatibility.ts +++ b/app/src/protyle/util/compatibility.ts @@ -154,16 +154,13 @@ export const getLocalStorage = (cb: () => void) => { row: "", layout: 0, method: 0, - types: { - ".txt": true, - ".md": true, - ".docx": true, - ".xlsx": true, - ".pptx": true, - }, + types: {}, sort: 0, k: "", }; + Constants.SIYUAN_ASSETS_SEARCH.forEach(type => { + defaultStorage[Constants.LOCAL_SEARCHASSET].types[type] = true + }) defaultStorage[Constants.LOCAL_SEARCHKEYS] = { keys: [], replaceKeys: [], diff --git a/app/src/search/assets.ts b/app/src/search/assets.ts index e07703463..1892d8ee0 100644 --- a/app/src/search/assets.ts +++ b/app/src/search/assets.ts @@ -69,7 +69,7 @@ export const openSearchAsset = (element: Element, isStick: boolean) => {
-