diff --git a/README.md b/README.md index d73b900..9108434 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ |------|------| | 三栏联动 | 左编辑 / 中 Emoji 纯文本 / 右长文富文本;滚动按比例同步,语法与渲染对应 | | Markdown 实时预览 | 基于 `marked`:中间栏自定义 Emoji Renderer,右侧栏 GFM 富文本 | -| 四套 + A2 主题 | 经典 / **A2 商务**(B 式线框 H1 + 📋📌🔹1️⃣ 职场 emoji;表格全角 `-|`)/ 青简 / 精简 / 聚焦 | +| 四套 + A2 主题 | 经典 / **A2 商务**(B 式线框 H1 + 📋📌🔸1️⃣;表格全角 `-|`)/ 青简 / 精简 / 聚焦 | | Emoji 装饰排版 | 标题边框、列表符号、任务勾选、引用、分隔线等用 Unicode/Emoji 呈现;纯文本栏禁止 CSS 画框 | | 一键复制 | 中间栏复制纯文本(所见即粘贴);右侧栏复制富文本 HTML | | 可视化表格 | MarkText 风格插入/编辑表格,插入前可填单元格 | @@ -46,11 +46,12 @@ ### 主题 A2 · 商务(纯文本栏) -- **H1**:主题 B 同款 `┌─┐│└─┘` 线框 + `📋` -- **H2**:`📌` + 细横线;**H3**:`📎`;列表 `🔹` / `1️⃣…` -- **行内代码**:`『…』`;代码块:`┌─┐` 线框 +- **H1**:主题 B 同款 `┌─┐│└─┘` 线框 + `📋`(最短宽约原 2/3,超长自适应) +- **H2**:`📌`;**H3**:`📎`;列表 `🔸` / `1️⃣…` +- **行内代码**:`『…』`;代码块:`┌─┐` 线框(最短宽与 H1 对齐,超长自适应) - **表格**:全角 `-|` 线框(与微信/雅黑对齐);图片在纯文本栏不输出 - **任务**:`✅` / `⬜`(无额外列表符) +- **分隔线**:与 H1 最短框同宽虚线 `· · · …` ## 技术栈 diff --git a/assets/icon.ico b/assets/icon.ico new file mode 100644 index 0000000..e1f76a3 Binary files /dev/null and b/assets/icon.ico differ diff --git a/package.json b/package.json index f6dcfb1..745c79d 100644 --- a/package.json +++ b/package.json @@ -220,7 +220,20 @@ "win": { "target": [ "nsis" - ] + ], + "icon": "assets/icon.ico" + }, + "nsis": { + "oneClick": true, + "perMachine": false, + "allowToChangeInstallationDirectory": false, + "createDesktopShortcut": true, + "createStartMenuShortcut": true, + "shortcutName": "emojiTool", + "installerIcon": "assets/icon.ico", + "uninstallerIcon": "assets/icon.ico", + "installerHeaderIcon": "assets/icon.ico", + "deleteAppDataOnUninstall": false }, "linux": { "target": [ diff --git a/src/renderer/App.module.scss b/src/renderer/App.module.scss index 2e87f56..d5fe76f 100644 --- a/src/renderer/App.module.scss +++ b/src/renderer/App.module.scss @@ -953,6 +953,8 @@ margin: 1.1em 0; text-align: left; color: inherit; + white-space: pre; + overflow-x: auto; } :global(.emoji-quote) { diff --git a/src/renderer/lib/themes.ts b/src/renderer/lib/themes.ts index 6c520c0..1f50689 100644 --- a/src/renderer/lib/themes.ts +++ b/src/renderer/lib/themes.ts @@ -65,28 +65,23 @@ function frameTitleB(text: string): string { /** * A2 一级标题:沿用主题 B 线框 ┌─┐│└─┘,emoji 用 📋。 + * 最短固定宽度为原 28 的 2/3;标题更长时框线随字数加长。 */ +const A2_FRAME_MIN_WIDTH = Math.round(28 * (2 / 3)); // 19 + function frameTitleA2(text: string): string { const body = `📋 ${text}`; - const width = Math.max(displayWidth(body), 10); + const width = Math.max(displayWidth(body), A2_FRAME_MIN_WIDTH); const line = '─'.repeat(width); - return `
┌${edge}┐
│ ${head}
├${edge}┤
@@ -174,7 +170,7 @@ export const THEME_A2: EmojiTheme = {
shortName: 'A2 商务',
description:
'正式商务 + 职场 emoji 色彩:B 式线框、钉选/清单符号、彩色序号',
- listSymbol: '🔹',
+ listSymbol: '🔸',
orderedNumbers: [
'1️⃣',
'2️⃣',
@@ -191,10 +187,7 @@ export const THEME_A2: EmojiTheme = {
taskChecked: '✅',
taskUnchecked: '⬜',
heading1: frameTitleA2,
- heading2: (text) => {
- const title = `📌 ${text}`;
- return `${title}
${a2Line('title')}\n`;
- },
+ heading2: (text) => `📌 ${text}\n`,
heading3: (text) => `📎 ${text}\n`,
heading4: (text) => `▪️ ${text}\n`,
hr: businessHr(),