From bf6ead52f47dcc2d67d5c221cd9c1a9991ce9163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Mon, 29 Jan 2024 17:53:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A9=20=E8=B0=83=E6=95=B4=E8=83=8C?= =?UTF-8?q?=E6=99=AF=EF=BC=8C=E5=AF=B9=E9=97=B2=E4=BA=91=E5=90=8D=E7=89=87?= =?UTF-8?q?=E6=89=93=E8=A1=A5=E4=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/overlay/to-namecard.vue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/overlay/to-namecard.vue b/src/components/overlay/to-namecard.vue index a5834c4f..c1c09854 100644 --- a/src/components/overlay/to-namecard.vue +++ b/src/components/overlay/to-namecard.vue @@ -128,8 +128,14 @@ function parseNamecard(desc: string): string { function parseDesc(desc: string, inQuote: boolean = false): string[] { let res = desc.replace(/。/g, "。\n"); res = res.replace(/;/g, ";\n"); - res = res.replace(/:/g, ":\n"); - res = res.replace(/?/g, "?\n"); + // todo 正则优化 + if (props?.data?.index !== 187) { + res = res.replace(/:/g, ":\n"); + res = res.replace(/?/g, "?\n"); + } else { + res = res.replace("时候,", "时候,\n"); + res = res.replace("。\n」", "。」"); + } if (!desc.includes("!」")) { res = res.replace(/!/g, "!\n"); } @@ -187,7 +193,6 @@ async function shareNamecard(): Promise { padding: 0 5px; border: 1px solid var(--tgc-white-1); border-radius: 5px; - backdrop-filter: blur(20px); color: var(--tgc-white-1); } @@ -202,10 +207,15 @@ async function shareNamecard(): Promise { align-items: flex-start; justify-content: flex-end; padding: 10px; - background: var(--common-shadow-t-1); + backdrop-filter: blur(5px); + background: rgb(0 0 0 / 25%); color: var(--tgc-white-1); } +.dark .ton-content { + background: rgb(0 0 0/ 50%); +} + .ton-content :first-child { font-family: var(--font-title); font-size: 20px; @@ -229,7 +239,6 @@ async function shareNamecard(): Promise { bottom: 10px; border: 1px solid var(--tgc-white-1); border-radius: 5px; - backdrop-filter: blur(5px); color: var(--tgc-white-1); }