diff --git a/app/src/mobile/menu/getRecentDocs.ts b/app/src/mobile/menu/getRecentDocs.ts
index 43227044a..d3308c8d3 100644
--- a/app/src/mobile/menu/getRecentDocs.ts
+++ b/app/src/mobile/menu/getRecentDocs.ts
@@ -12,7 +12,7 @@ export const getRecentDocs = (app: App) => {
let html = "";
response.data.forEach((item: any, index: number) => {
html += `
-${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, "b3-list-item__graphic", true)}
+${unicode2Emoji(item.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file, "b3-list-item__graphic", true)}
${escapeHtml(item.title)}
`;
});
diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.ts
index 97513139d..2eede267e 100644
--- a/app/src/mobile/menu/search.ts
+++ b/app/src/mobile/menu/search.ts
@@ -172,7 +172,7 @@ const onRecentBlocks = (data: IBlock[], config: Config.IUILayoutTabSearchConfig,
-${unicode2Emoji(getNotebookIcon(item.box) || Constants.SIYUAN_IMAGE_NOTE, "b3-list-item__graphic", true)}
+${unicode2Emoji(getNotebookIcon(item.box) || window.siyuan.storage[Constants.LOCAL_IMAGES].note, "b3-list-item__graphic", true)}
${escapeGreat(title)}
`;
item.children.forEach((childItem, childIndex) => {
diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts
index 345412167..6d63a0583 100644
--- a/app/src/protyle/util/compatibility.ts
+++ b/app/src/protyle/util/compatibility.ts
@@ -206,7 +206,12 @@ export const getLocalStorage = (cb: () => void) => {
defaultStorage[Constants.LOCAL_FILEPOSITION] = {}; // {id: IScrollAttr}
defaultStorage[Constants.LOCAL_DIALOGPOSITION] = {}; // {id: IPosition}
defaultStorage[Constants.LOCAL_HISTORY] = {
- notebookId: "%", type: 0, operation: "all", sideWidth: "256px", sideDocWidth: "256px", sideDiffWidth: "256px",
+ notebookId: "%",
+ type: 0,
+ operation: "all",
+ sideWidth: "256px",
+ sideDocWidth: "256px",
+ sideDiffWidth: "256px",
};
defaultStorage[Constants.LOCAL_FLASHCARD] = {
fullscreen: false
@@ -235,6 +240,11 @@ export const getLocalStorage = (cb: () => void) => {
defaultStorage[Constants.LOCAL_DOCINFO] = {
id: "",
};
+ defaultStorage[Constants.LOCAL_IMAGES] = {
+ file: "1f4c4",
+ note: "1f5c3",
+ folder: "1f4d1"
+ };
defaultStorage[Constants.LOCAL_FONTSTYLES] = [];
defaultStorage[Constants.LOCAL_FILESPATHS] = []; // filesPath[]
defaultStorage[Constants.LOCAL_SEARCHDATA] = {
@@ -271,7 +281,7 @@ export const getLocalStorage = (cb: () => void) => {
Constants.LOCAL_SEARCHDATA, Constants.LOCAL_ZOOM, Constants.LOCAL_LAYOUTS, Constants.LOCAL_AI,
Constants.LOCAL_PLUGINTOPUNPIN, Constants.LOCAL_SEARCHASSET, Constants.LOCAL_FLASHCARD,
Constants.LOCAL_DIALOGPOSITION, Constants.LOCAL_SEARCHUNREF, Constants.LOCAL_HISTORY,
- Constants.LOCAL_OUTLINE, Constants.LOCAL_FILEPOSITION, Constants.LOCAL_FILESPATHS,
+ Constants.LOCAL_OUTLINE, Constants.LOCAL_FILEPOSITION, Constants.LOCAL_FILESPATHS, Constants.LOCAL_IMAGES,
Constants.LOCAL_PLUGIN_DOCKS].forEach((key) => {
if (typeof response.data[key] === "string") {
try {
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index 0dde8a218..15672fdaa 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -1400,7 +1400,7 @@ const onSearch = (data: IBlock[], edit: Protyle, element: Element, config: Confi
-${unicode2Emoji(getNotebookIcon(item.box) || Constants.SIYUAN_IMAGE_NOTE, "b3-list-item__graphic", true)}
+${unicode2Emoji(getNotebookIcon(item.box) || window.siyuan.storage[Constants.LOCAL_IMAGES].note, "b3-list-item__graphic", true)}
${escapeGreat(title)}
`;
item.children.forEach((childItem, childIndex) => {
diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts
index f1b7c87bf..a469b07c5 100644
--- a/app/src/util/Tree.ts
+++ b/app/src/util/Tree.ts
@@ -129,7 +129,7 @@ ${item.label ? "data-label='" + item.label + "'" : ""}>
iconHTML = ``;
} else {
if (item.type === "NodeDocument") {
- iconHTML = `${unicode2Emoji(item.ial.icon || Constants.SIYUAN_IMAGE_FILE)}`;
+ iconHTML = `${unicode2Emoji(item.ial.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}`;
} else {
iconHTML = ``;
}
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts
index fb67d163f..dad5f4272 100644
--- a/app/src/util/pathName.ts
+++ b/app/src/util/pathName.ts
@@ -195,7 +195,7 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,
- ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_NOTE, "b3-list-item__graphic", true)}
+ ${unicode2Emoji(item.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].note, "b3-list-item__graphic", true)}
${escapeHtml(item.name)}
${countHTML}
`;
@@ -242,7 +242,7 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,
${item.flashcardCount}`;
}
fileHTML += `
- ${unicode2Emoji(item.boxIcon || Constants.SIYUAN_IMAGE_NOTE, "b3-list-item__graphic", true)}
+ ${unicode2Emoji(item.boxIcon || window.siyuan.storage[Constants.LOCAL_IMAGES].note, "b3-list-item__graphic", true)}
${escapeHtml(item.hPath)}
${countHTML}
`;
@@ -516,7 +516,7 @@ const getLeaf = (liElement: HTMLElement, flashcard: boolean) => {
- ${unicode2Emoji(item.icon || (item.subFileCount === 0 ? Constants.SIYUAN_IMAGE_FILE : Constants.SIYUAN_IMAGE_FOLDER), "b3-list-item__graphic", true)}
+ ${unicode2Emoji(item.icon || (item.subFileCount === 0 ? window.siyuan.storage[Constants.LOCAL_IMAGES].file : window.siyuan.storage[Constants.LOCAL_IMAGES].folder), "b3-list-item__graphic", true)}
" + window.siyuan.languages.bookmark + " " + item.bookmark : ""}${item.name1 ? "
" + window.siyuan.languages.name + " " + item.name1 : ""}${item.alias ? "
" + window.siyuan.languages.alias + " " + item.alias : ""}${item.memo ? "
" + window.siyuan.languages.memo + " " + item.memo : ""}${item.subFileCount !== 0 ? window.siyuan.languages.includeSubFile.replace("x", item.subFileCount) : ""}
${window.siyuan.languages.modifiedAt} ${item.hMtime}
${window.siyuan.languages.createdAt} ${item.hCtime}">${getDisplayName(item.name, true, true)}
${countHTML}
`;