From e92fdda1d5fc5d2c8fdf3ea8e081339ac37bbf76 Mon Sep 17 00:00:00 2001 From: Zhilin Liu Date: Sat, 13 Jan 2024 22:01:00 +0800 Subject: [PATCH] refactor: MenuWrapper to ButtonGroup (#59) --- .../{MenuWrapper.vue => ButtonGroup.vue} | 2 +- .../ToolBar/components/Draw/Tools.vue | 6 +++--- .../ToolBar/components/Home/Clipboard.vue | 6 +++--- .../ToolBar/components/Home/Delete.vue | 6 +++--- .../ToolBar/components/Home/Draw.vue | 6 +++--- .../ToolBar/components/Home/Edit.vue | 6 +++--- .../ToolBar/components/Home/FontStyle.vue | 6 +++--- .../ToolBar/components/Home/Paragraph.vue | 6 +++--- .../ToolBar/components/Home/Slides.vue | 6 +++--- .../ToolBar/components/Home/UndoRedo.vue | 6 +++--- .../ToolBar/components/Insert/Comments.vue | 14 ++++++++++---- .../ToolBar/components/Insert/Footer.vue | 18 ++++++++++++------ .../ToolBar/components/Insert/Illustration.vue | 6 +++--- .../ToolBar/components/Insert/Link.vue | 18 ++++++++++++------ .../ToolBar/components/Insert/Media.vue | 12 ++++++------ .../ToolBar/components/Insert/Picture.vue | 6 +++--- .../ToolBar/components/Insert/Slides.vue | 6 +++--- .../ToolBar/components/Insert/Symbol.vue | 12 ++++++------ .../ToolBar/components/Insert/Table.vue | 6 +++--- .../ToolBar/components/Insert/Text.vue | 6 +++--- .../components/SlideShow/StartSlideShow.vue | 6 +++--- 21 files changed, 92 insertions(+), 74 deletions(-) rename src/UserInterface/ToolBar/components/{MenuWrapper.vue => ButtonGroup.vue} (93%) diff --git a/src/UserInterface/ToolBar/components/MenuWrapper.vue b/src/UserInterface/ToolBar/components/ButtonGroup.vue similarity index 93% rename from src/UserInterface/ToolBar/components/MenuWrapper.vue rename to src/UserInterface/ToolBar/components/ButtonGroup.vue index efc8e5e..c9e205c 100644 --- a/src/UserInterface/ToolBar/components/MenuWrapper.vue +++ b/src/UserInterface/ToolBar/components/ButtonGroup.vue @@ -7,6 +7,6 @@ const { name } = defineProps<{ diff --git a/src/UserInterface/ToolBar/components/Draw/Tools.vue b/src/UserInterface/ToolBar/components/Draw/Tools.vue index 7086820..ef16849 100644 --- a/src/UserInterface/ToolBar/components/Draw/Tools.vue +++ b/src/UserInterface/ToolBar/components/Draw/Tools.vue @@ -1,14 +1,14 @@ diff --git a/src/UserInterface/ToolBar/components/Home/Clipboard.vue b/src/UserInterface/ToolBar/components/Home/Clipboard.vue index df7e924..129dbbe 100644 --- a/src/UserInterface/ToolBar/components/Home/Clipboard.vue +++ b/src/UserInterface/ToolBar/components/Home/Clipboard.vue @@ -1,10 +1,10 @@ diff --git a/src/UserInterface/ToolBar/components/Home/Delete.vue b/src/UserInterface/ToolBar/components/Home/Delete.vue index aaf8ad6..c32de32 100644 --- a/src/UserInterface/ToolBar/components/Home/Delete.vue +++ b/src/UserInterface/ToolBar/components/Home/Delete.vue @@ -1,6 +1,6 @@ diff --git a/src/UserInterface/ToolBar/components/Home/Draw.vue b/src/UserInterface/ToolBar/components/Home/Draw.vue index be08a4c..f1d4a81 100644 --- a/src/UserInterface/ToolBar/components/Home/Draw.vue +++ b/src/UserInterface/ToolBar/components/Home/Draw.vue @@ -1,10 +1,10 @@ diff --git a/src/UserInterface/ToolBar/components/Home/Edit.vue b/src/UserInterface/ToolBar/components/Home/Edit.vue index 675781f..bf32e4e 100644 --- a/src/UserInterface/ToolBar/components/Home/Edit.vue +++ b/src/UserInterface/ToolBar/components/Home/Edit.vue @@ -1,10 +1,10 @@ diff --git a/src/UserInterface/ToolBar/components/Home/FontStyle.vue b/src/UserInterface/ToolBar/components/Home/FontStyle.vue index 2fb5282..0ef68a7 100644 --- a/src/UserInterface/ToolBar/components/Home/FontStyle.vue +++ b/src/UserInterface/ToolBar/components/Home/FontStyle.vue @@ -8,7 +8,7 @@ import { TextUnderline, Strikethrough, } from '@icon-park/vue-next' -import MenuWrapper from '../MenuWrapper.vue' +import ButtonGroup from '../ButtonGroup.vue' import { richTextObserver, selectionManager } from '@Kernel/index' import { intersectAttributes } from '@Utils/intersectAttributes' import { ref } from 'vue' @@ -55,7 +55,7 @@ richTextObserver.on(async (newState) => { diff --git a/src/UserInterface/ToolBar/components/Home/Paragraph.vue b/src/UserInterface/ToolBar/components/Home/Paragraph.vue index d3eda88..7d1668c 100644 --- a/src/UserInterface/ToolBar/components/Home/Paragraph.vue +++ b/src/UserInterface/ToolBar/components/Home/Paragraph.vue @@ -10,7 +10,7 @@ import { AlignTextRight, AlignTextCenter, } from '@icon-park/vue-next' -import MenuWrapper from '../MenuWrapper.vue' +import ButtonGroup from '../ButtonGroup.vue' import { AlignType, TextBoxBlock } from '@BlockHub/TextBoxBlock/TextBoxBlock' import { selectionManager } from '@Kernel/index' import { ref, shallowRef } from 'vue' @@ -54,7 +54,7 @@ const updateAlign = (value: AlignType) => { diff --git a/src/UserInterface/ToolBar/components/Home/Slides.vue b/src/UserInterface/ToolBar/components/Home/Slides.vue index 2c6c1da..7a38d5d 100644 --- a/src/UserInterface/ToolBar/components/Home/Slides.vue +++ b/src/UserInterface/ToolBar/components/Home/Slides.vue @@ -1,11 +1,11 @@ diff --git a/src/UserInterface/ToolBar/components/Home/UndoRedo.vue b/src/UserInterface/ToolBar/components/Home/UndoRedo.vue index c2bb6e9..ebc210c 100644 --- a/src/UserInterface/ToolBar/components/Home/UndoRedo.vue +++ b/src/UserInterface/ToolBar/components/Home/UndoRedo.vue @@ -2,7 +2,7 @@ import { ref } from 'vue' import { history } from '@Kernel/index' import { Undo, Redo } from '@icon-park/vue-next' -import MenuWrapper from '../MenuWrapper.vue' +import ButtonGroup from '../ButtonGroup.vue' const canUndo = ref(false) const canRedo = ref(false) @@ -13,7 +13,7 @@ history.events.update.on(() => { diff --git a/src/UserInterface/ToolBar/components/Insert/Comments.vue b/src/UserInterface/ToolBar/components/Insert/Comments.vue index 3d9a747..3403367 100644 --- a/src/UserInterface/ToolBar/components/Insert/Comments.vue +++ b/src/UserInterface/ToolBar/components/Insert/Comments.vue @@ -1,14 +1,20 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Footer.vue b/src/UserInterface/ToolBar/components/Insert/Footer.vue index 22ae869..725c5ef 100644 --- a/src/UserInterface/ToolBar/components/Insert/Footer.vue +++ b/src/UserInterface/ToolBar/components/Insert/Footer.vue @@ -1,14 +1,20 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Illustration.vue b/src/UserInterface/ToolBar/components/Insert/Illustration.vue index 3d0b2ed..4e34afd 100644 --- a/src/UserInterface/ToolBar/components/Insert/Illustration.vue +++ b/src/UserInterface/ToolBar/components/Insert/Illustration.vue @@ -1,10 +1,10 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Link.vue b/src/UserInterface/ToolBar/components/Insert/Link.vue index 08a7b32..9f5fd08 100644 --- a/src/UserInterface/ToolBar/components/Insert/Link.vue +++ b/src/UserInterface/ToolBar/components/Insert/Link.vue @@ -1,14 +1,20 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Media.vue b/src/UserInterface/ToolBar/components/Insert/Media.vue index 3b508a9..55cccc1 100644 --- a/src/UserInterface/ToolBar/components/Insert/Media.vue +++ b/src/UserInterface/ToolBar/components/Insert/Media.vue @@ -1,20 +1,20 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Picture.vue b/src/UserInterface/ToolBar/components/Insert/Picture.vue index c4ae44b..dfaac4d 100644 --- a/src/UserInterface/ToolBar/components/Insert/Picture.vue +++ b/src/UserInterface/ToolBar/components/Insert/Picture.vue @@ -1,6 +1,6 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Slides.vue b/src/UserInterface/ToolBar/components/Insert/Slides.vue index c97ef18..81e5e0c 100644 --- a/src/UserInterface/ToolBar/components/Insert/Slides.vue +++ b/src/UserInterface/ToolBar/components/Insert/Slides.vue @@ -1,14 +1,14 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Symbol.vue b/src/UserInterface/ToolBar/components/Insert/Symbol.vue index 1c7fed9..4faf262 100644 --- a/src/UserInterface/ToolBar/components/Insert/Symbol.vue +++ b/src/UserInterface/ToolBar/components/Insert/Symbol.vue @@ -1,14 +1,14 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Table.vue b/src/UserInterface/ToolBar/components/Insert/Table.vue index fa3d68e..1928d11 100644 --- a/src/UserInterface/ToolBar/components/Insert/Table.vue +++ b/src/UserInterface/ToolBar/components/Insert/Table.vue @@ -1,6 +1,6 @@ diff --git a/src/UserInterface/ToolBar/components/Insert/Text.vue b/src/UserInterface/ToolBar/components/Insert/Text.vue index 1fdc25f..2198a97 100644 --- a/src/UserInterface/ToolBar/components/Insert/Text.vue +++ b/src/UserInterface/ToolBar/components/Insert/Text.vue @@ -1,11 +1,11 @@ diff --git a/src/UserInterface/ToolBar/components/SlideShow/StartSlideShow.vue b/src/UserInterface/ToolBar/components/SlideShow/StartSlideShow.vue index ee674f5..874ffb3 100644 --- a/src/UserInterface/ToolBar/components/SlideShow/StartSlideShow.vue +++ b/src/UserInterface/ToolBar/components/SlideShow/StartSlideShow.vue @@ -1,6 +1,6 @@