From 5140746d34ec50370f92a879e981ae3d44b60b46 Mon Sep 17 00:00:00 2001 From: hackrobot Date: Fri, 28 Mar 2025 10:31:49 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20ui=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/App.tsx | 48 ++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index 8989cba..d878b6e 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -42,12 +42,18 @@ import TextArea from 'antd/es/input/TextArea'; const createDecoratedTitleHTML = (text: any) => { const padding = 2; // 内容左右两边的空格数 + const lineChar = '─'; // 水平线字符 - const edgeChar = '━'; // 边框装饰字符 - const cornerTopLeft = '╔'; - const cornerTopRight = '╗'; - const cornerBottomLeft = '╚'; - const cornerBottomRight = '╝'; + const edgeChar = '─'; // 边框装饰字符 + // const edgeChar = '━'; // 边框装饰字符 + // const cornerTopLeft = '╔'; + // const cornerTopRight = '╗'; + // const cornerBottomLeft = '╚'; + // const cornerBottomRight = '╝'; + const cornerTopLeft = '╭'; // 顶部左角 + const cornerTopRight = '╮'; // 顶部右角 + const cornerBottomLeft = '╰'; // 底部左角 + const cornerBottomRight = '╯'; // 底部右角 // 计算标题长度 const titleLength = text.length + padding * 2; @@ -58,6 +64,8 @@ const createDecoratedTitleHTML = (text: any) => { const topBorder = `${cornerTopLeft}${edgeLength}${cornerTopRight}`; const bottomBorder = `${cornerBottomLeft}${edgeLength}${cornerBottomRight}`; const middleLine = ` 📢 ${text}`; + // const middleLine = ` ⚡ ${text}`; + return `
${topBorder}
${middleLine}
${bottomBorder}
`; // return `
${topBorder}
${middleLine}
${bottomBorder}

`; @@ -131,7 +139,7 @@ renderer.list = function (body, ordered, start) { console.log('value--', value); // 判断是否是任务 let task = false; - if (value.includes('🔸❌') || value.includes('🔸✅')) { + if (value.includes('🔸⬜') || value.includes('🔸✅')) { task = true; } return value.indexOf(listSinbal) !== -1 @@ -166,8 +174,8 @@ renderer.listitem = function (text, task, checked) { // 任务列表 renderer.checkbox = function (checked) { - // ✅❌ - return !!checked ? '✅' : '❌'; + // ✅❌⬜ + return !!checked ? '✅' : '⬜'; return ( '' ); @@ -243,8 +251,8 @@ renderer.blockquote = function (quote) { //   // return `\t 👉${content}
` // return `
\t 📌${content}
\n`; //ok - // ├─ - return `
            └─📌${content}
`; + // ├─⚡ + return `
            └─⚡${content}
`; }; renderer.table = function (header, body) { @@ -285,7 +293,7 @@ renderer.link = function (href, title, text) { return text; } href = cleanHref; - console.log('href-',href) + console.log('href-', href); let out = '"+`(${href})`; // console.log('out-',out) - - return out+`: ${href}`; + return out + `: ${href}`; }; renderer.paragraph = function (text) { @@ -356,15 +363,16 @@ const Index = () => { // │ 🆔 hackrobot // ╰────────────────╯
💬 随时欢迎聊天`; - let contactMe = `
➖➖➖➖➖
💬 欢迎交流
后台私信发送『关键词』: 加群`; - setmarkText(value); + // let contactMe = `
➖➖➖➖➖
💬 欢迎交流
后台私信发送『关键词』: 加群`; + let contactMe = `
➖➖➖➖➖
©️ 本文使用🔗『mdemoji.com』 编辑 `; + // setmarkText(value); // setmarkText(value + contactMe); - // if (value?.length < 10) { - // setmarkText(value); - // } else { - // setmarkText(value + contactMe); - // } + if (value?.length < 10) { + setmarkText(value); + } else { + setmarkText(value + contactMe); + } }; useEffect(() => {}, []);