This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 9fcf1836537597eee425361f99fa5ce7345a238e
Author: robin <[email protected]>
AuthorDate: Tue Dec 3 15:41:19 2024 +0800

    refactor: remove unused heading options and clean up icon styles
---
 ui/src/components/Editor/ToolBars/heading.tsx |  7 +--
 ui/src/components/Editor/index.scss           | 75 ---------------------------
 2 files changed, 1 insertion(+), 81 deletions(-)

diff --git a/ui/src/components/Editor/ToolBars/heading.tsx 
b/ui/src/components/Editor/ToolBars/heading.tsx
index 123b5579..8b0cb604 100644
--- a/ui/src/components/Editor/ToolBars/heading.tsx
+++ b/ui/src/components/Editor/ToolBars/heading.tsx
@@ -28,11 +28,6 @@ let context: IEditorContext;
 const Heading = () => {
   const { t } = useTranslation('translation', { keyPrefix: 'editor' });
   const headerList = [
-    {
-      text: `<h1 class="mb-0 h3">${t('heading.options.h1')}</h1>`,
-      level: 1,
-      label: t('heading.options.h1'),
-    },
     {
       text: `<h2 class="mb-0 h4">${t('heading.options.h2')}</h2>`,
       level: 2,
@@ -60,7 +55,7 @@ const Heading = () => {
     },
   ];
   const item = {
-    label: 'type',
+    label: 'type-h2',
     keyMap: ['Ctrl-h'],
     tip: `${t('heading.text')} (Ctrl+h)`,
   };
diff --git a/ui/src/components/Editor/index.scss 
b/ui/src/components/Editor/index.scss
index 6cdc4b8c..afd15871 100644
--- a/ui/src/components/Editor/index.scss
+++ b/ui/src/components/Editor/index.scss
@@ -69,81 +69,6 @@
       &:focus {
         background-color: var(--ans-editor-toolbar-focus);
       }
-      &.icon-heading {
-        background-position: 0px -144px;
-      }
-      &.icon-bold {
-        background-position: -24px -144px;
-      }
-      &.icon-italic {
-        background-position: -48px -144px;
-      }
-
-      &.icon-code {
-        background-position: -72px -144px;
-      }
-
-      &.icon-link {
-        background-position: -120px -144px;
-      }
-      &.icon-blockquote {
-        background-position: -144px -144px;
-      }
-      &.icon-image {
-        background-position: -168px -144px;
-      }
-      &.icon-video {
-        background-position: -192px -144px;
-      }
-      &.icon-table {
-        background-position: -216px -144px;
-        &.disabled {
-          background-position: -216px -168px !important;
-        }
-      }
-
-      &.icon-formula {
-        background-position: -528px -144px;
-      }
-      &.icon-indent {
-        background-position: -288px -144px;
-      }
-      &.icon-outdent {
-        background-position: -312px -144px;
-      }
-      &.icon-orderedList {
-        background-position: -240px -144px;
-      }
-      &.icon-unorderedList {
-        background-position: -264px -144px;
-      }
-      &.icon-hr {
-        background-position: -336px -144px;
-      }
-      &.icon-help {
-        background-position: -360px -144px;
-      }
-      &.icon-full {
-        background-position: -456px -144px;
-      }
-      &.icon-exit-sync-scroll {
-        background-position: -432px -144px;
-      }
-      &.icon-sync-scroll {
-        background-position: -432px -192px;
-      }
-      &.icon-exit-preview {
-        background-position: -408px -144px;
-      }
-      &.icon-preview {
-        background-position: -408px -192px;
-      }
-      &.icon-exit-full {
-        background-position: -480px -144px;
-      }
-      &.icon-chart {
-        background-position: -552px -144px;
-      }
     }
     .popup-wrap {
       position: absolute;

Reply via email to