From aff5b91df1506c0e8e837126e6d614dda45db202 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Wed, 22 Nov 2023 22:35:30 +0800 Subject: [PATCH] refactor: update display texT --- .github/workflows/deploy.yml | 2 +- README.md | 2 +- .../editor/intelli/menu/menu-bubble.jsx | 38 +++++++++++-------- components/editor/live-editor.jsx | 4 +- pages/editor.css | 8 +++- styles/global.css | 8 ++-- 6 files changed, 36 insertions(+), 26 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 547e944..eddf3cd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ # # To get started with Next.js see: https://nextjs.org/docs/getting-started # -name: Deploy Next.js site to Pages +name: Deploy on: # Runs on pushes targeting the default branch diff --git a/README.md b/README.md index b189ae6..cd1b95c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 3b -[![Deploy Next.js site to Pages](https://github.com/unit-mesh/3b/actions/workflows/deploy.yml/badge.svg)](https://github.com/unit-mesh/3b/actions/workflows/deploy.yml) +[![Deploy](https://github.com/unit-mesh/3b/actions/workflows/deploy.yml/badge.svg)](https://github.com/unit-mesh/3b/actions/workflows/deploy.yml) > 3b is a sophisticated editor designed for content creation, catering to various formats such as blogs, articles, user > stories, and more. diff --git a/components/editor/intelli/menu/menu-bubble.jsx b/components/editor/intelli/menu/menu-bubble.jsx index 5a37d72..2e14902 100644 --- a/components/editor/intelli/menu/menu-bubble.jsx +++ b/components/editor/intelli/menu/menu-bubble.jsx @@ -8,23 +8,31 @@ export const MenuBubble = ({ editor }) => { // 根据长度优化 return - {selectLength > 20 && + editor.commands.setTrackChangeStatus(false) + }} + value="left" aria-label="Left aligned" + className={editor.isActive('bold') ? 'is-active BubbleMenuItem' : 'BubbleMenuItem'} + > + 优化表达 + + + } } \ No newline at end of file diff --git a/components/editor/live-editor.jsx b/components/editor/live-editor.jsx index da5a5af..ba0519a 100644 --- a/components/editor/live-editor.jsx +++ b/components/editor/live-editor.jsx @@ -33,11 +33,11 @@ const extensions = [ createSlashExtension('ai-slash', { items: [ { - title: '续写', + title: 'AI 续写', command: 'continue', }, { - title: '总结', + title: 'AI 总结', command: 'summarize', } ] diff --git a/pages/editor.css b/pages/editor.css index 676050d..0f9d592 100644 --- a/pages/editor.css +++ b/pages/editor.css @@ -101,13 +101,17 @@ button { box-shadow: 0 0 0 2px var(--violet-11); } +.BubbleMenuGroup { + border-radius: 4px; + box-shadow: 0 2px 2px var(--black-a7); +} + .BubbleMenuItem { padding: 0.5em; background: #fff; - border-radius: 4px; color: #000; - box-shadow: 0 2px 2px var(--black-a7); cursor: pointer; + border: 1px solid var(--violet-6); } .BubbleMenuItem svg { diff --git a/styles/global.css b/styles/global.css index efe4672..d50777c 100644 --- a/styles/global.css +++ b/styles/global.css @@ -85,16 +85,14 @@ input { .DropdownMenuCheckboxItem, .DropdownMenuRadioItem, .DropdownMenuSubTrigger { - font-size: 13px; - line-height: 1; + font-size: 14px; + line-height: 1.4; + padding: 10px 5px; color: var(--violet-11); border-radius: 3px; display: flex; align-items: center; - height: 25px; - padding: 0 5px; position: relative; - padding-left: 25px; user-select: none; outline: none; cursor: pointer;