From 8c0e9369f3ce7fd09cd9c473192503ad5da5a0eb Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 27 Mar 2025 20:31:45 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14414 --- app/src/constants.ts | 2 +- app/src/util/noRelyPCFunction.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/constants.ts b/app/src/constants.ts index 8e9670491..dc2e37fdd 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -232,7 +232,7 @@ export abstract class Constants { public static readonly TIMEOUT_COUNT = 1000; // id - public static readonly HELP_PATH = { + public static readonly HELP_PATH: { [key: string]: string } = { zh_CN: "20210808180117-czj9bvb", zh_CHT: "20211226090932-5lcq56f", ja_JP: "20240530133126-axarxgx", diff --git a/app/src/util/noRelyPCFunction.ts b/app/src/util/noRelyPCFunction.ts index b07576f39..fd08c2587 100644 --- a/app/src/util/noRelyPCFunction.ts +++ b/app/src/util/noRelyPCFunction.ts @@ -61,7 +61,14 @@ export const setLocalShorthandCount = () => { } fileElement = (dockFile.data.file as Files).element; /// #endif + const helpIDs: string[] = []; + Object.keys(Constants.HELP_PATH).forEach((key) => { + helpIDs.push(Constants.HELP_PATH[key]); + }); fileElement.childNodes.forEach((item: Element) => { + if (item.querySelector('[data-type="addLocal"]') || helpIDs.includes(item.getAttribute("data-url"))) { + return; + } item.querySelector('[data-type="more-root"]').insertAdjacentHTML("beforebegin", ` `);