diff --git a/src-tauri/capabilities/SubWindow.json b/src-tauri/capabilities/SubWindow.json index b7b7ef70..a120d0f1 100644 --- a/src-tauri/capabilities/SubWindow.json +++ b/src-tauri/capabilities/SubWindow.json @@ -16,6 +16,8 @@ "log:default", "path:allow-resolve-directory", "path:default", + "shell:allow-open", + "shell:default", "sql:allow-load", "sql:allow-execute", "sql:default", diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json index e16efa5d..c66d4548 100644 --- a/src-tauri/gen/schemas/capabilities.json +++ b/src-tauri/gen/schemas/capabilities.json @@ -69,6 +69,8 @@ "log:default", "path:allow-resolve-directory", "path:default", + "shell:allow-open", + "shell:default", "sql:allow-load", "sql:allow-execute", "sql:default", diff --git a/src/assets/css/anno-parser.css b/src/assets/css/anno-parser.css index 0589b61b..85aab65d 100644 --- a/src/assets/css/anno-parser.css +++ b/src/assets/css/anno-parser.css @@ -1,7 +1,7 @@ /* * @file assets/css/post-parser.css * @description 游戏公告解析 css - * @since Beta v0.4.5 + * @since Beta v0.5.0 */ .anno-body { @@ -37,15 +37,12 @@ line-height: 2; } -.anno-link-icon { - width: 18px; - height: 18px; - color: #00c3ff; -} - .anno-content :deep(a) { color: #00c3ff; - text-decoration: none; + cursor: pointer; + text-decoration: underline solid #00c3ff; + text-underline-position: under; + transform: translateY(2px); } .anno-content :deep(p) { diff --git a/src/web/utils/parseAnno.ts b/src/web/utils/parseAnno.ts index 80f6b472..163fda29 100644 --- a/src/web/utils/parseAnno.ts +++ b/src/web/utils/parseAnno.ts @@ -1,7 +1,7 @@ /** * @file web/utils/parseAnno.ts * @description 解析游戏内公告数据 - * @since Beta v0.4.7 + * @since Beta v0.5.0 */ import { saveImgLocal } from "../../utils/TGShare.js"; @@ -11,14 +11,11 @@ import { decodeRegExp } from "./tools.js"; /** * @description 解析 a - * @since Beta v0.4.4 + * @since Beta v0.5.0 * @param {HTMLAnchorElement} a a 元素 * @returns {HTMLAnchorElement} 解析后的 a 元素 */ function parseAnnoA(a: HTMLAnchorElement): HTMLAnchorElement { - const span = document.createElement("i"); - span.classList.add("mdi", "mdi-link-variant", "anno-link-icon"); - a.prepend(span); const regex = /javascript:miHoYoGameJSSDK.openIn(Browser|Webview)\('(.+)'\);/; if (regex.test(a.getAttribute("href") ?? "")) { const href = a.getAttribute("href")?.match(regex);