From d3a7d08f9de5fee843b6f1c328df4f1febd328ae Mon Sep 17 00:00:00 2001 From: YangFong Date: Mon, 16 Sep 2024 00:01:54 +0800 Subject: [PATCH] style: update dialog (#402) --- src/assets/index.css | 75 ++- src/assets/less/app.less | 3 - src/assets/less/theme.less | 41 +- src/components/CodemirrorEditor/CssEditor.vue | 2 +- .../EditorHeader/AboutDialog.vue | 70 ++- .../EditorHeader/EditDropdown.vue | 42 +- .../EditorHeader/FileDropdown.vue | 54 +- .../EditorHeader/HelpDropdown.vue | 38 +- .../EditorHeader/PostInfo.vue | 97 +-- .../EditorHeader/StyleDropdown.vue | 91 +-- .../EditorHeader/StyleOptionMenu.vue | 58 +- .../CodemirrorEditor/EditorHeader/index.vue | 293 ++++----- .../CodemirrorEditor/InsertFormDialog.vue | 117 ++-- .../CodemirrorEditor/UploadImgDialog.vue | 574 +++++++++++------- src/components/ui/dialog/Dialog.vue | 14 + src/components/ui/dialog/DialogClose.vue | 11 + src/components/ui/dialog/DialogContent.vue | 50 ++ .../ui/dialog/DialogDescription.vue | 24 + src/components/ui/dialog/DialogFooter.vue | 19 + src/components/ui/dialog/DialogHeader.vue | 16 + .../ui/dialog/DialogScrollContent.vue | 59 ++ src/components/ui/dialog/DialogTitle.vue | 29 + src/components/ui/dialog/DialogTrigger.vue | 11 + src/components/ui/dialog/index.ts | 9 + src/components/ui/menubar/Menubar.vue | 35 ++ .../ui/menubar/MenubarCheckboxItem.vue | 40 ++ src/components/ui/menubar/MenubarContent.vue | 43 ++ src/components/ui/menubar/MenubarGroup.vue | 11 + src/components/ui/menubar/MenubarItem.vue | 35 ++ src/components/ui/menubar/MenubarLabel.vue | 13 + src/components/ui/menubar/MenubarMenu.vue | 11 + .../ui/menubar/MenubarRadioGroup.vue | 20 + .../ui/menubar/MenubarRadioItem.vue | 40 ++ .../ui/menubar/MenubarSeparator.vue | 19 + src/components/ui/menubar/MenubarShortcut.vue | 14 + src/components/ui/menubar/MenubarSub.vue | 19 + .../ui/menubar/MenubarSubContent.vue | 39 ++ .../ui/menubar/MenubarSubTrigger.vue | 30 + src/components/ui/menubar/MenubarTrigger.vue | 29 + src/components/ui/menubar/index.ts | 15 + src/main.js | 1 + src/stores/index.js | 11 +- src/views/CodemirrorEditor.vue | 165 +++-- 43 files changed, 1525 insertions(+), 862 deletions(-) create mode 100644 src/components/ui/dialog/Dialog.vue create mode 100644 src/components/ui/dialog/DialogClose.vue create mode 100644 src/components/ui/dialog/DialogContent.vue create mode 100644 src/components/ui/dialog/DialogDescription.vue create mode 100644 src/components/ui/dialog/DialogFooter.vue create mode 100644 src/components/ui/dialog/DialogHeader.vue create mode 100644 src/components/ui/dialog/DialogScrollContent.vue create mode 100644 src/components/ui/dialog/DialogTitle.vue create mode 100644 src/components/ui/dialog/DialogTrigger.vue create mode 100644 src/components/ui/dialog/index.ts create mode 100644 src/components/ui/menubar/Menubar.vue create mode 100644 src/components/ui/menubar/MenubarCheckboxItem.vue create mode 100644 src/components/ui/menubar/MenubarContent.vue create mode 100644 src/components/ui/menubar/MenubarGroup.vue create mode 100644 src/components/ui/menubar/MenubarItem.vue create mode 100644 src/components/ui/menubar/MenubarLabel.vue create mode 100644 src/components/ui/menubar/MenubarMenu.vue create mode 100644 src/components/ui/menubar/MenubarRadioGroup.vue create mode 100644 src/components/ui/menubar/MenubarRadioItem.vue create mode 100644 src/components/ui/menubar/MenubarSeparator.vue create mode 100644 src/components/ui/menubar/MenubarShortcut.vue create mode 100644 src/components/ui/menubar/MenubarSub.vue create mode 100644 src/components/ui/menubar/MenubarSubContent.vue create mode 100644 src/components/ui/menubar/MenubarSubTrigger.vue create mode 100644 src/components/ui/menubar/MenubarTrigger.vue create mode 100644 src/components/ui/menubar/index.ts diff --git a/src/assets/index.css b/src/assets/index.css index 010919c..c041c3c 100644 --- a/src/assets/index.css +++ b/src/assets/index.css @@ -5,66 +5,63 @@ @layer base { :root { --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; - - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; + --foreground: 0 0% 3.9%; --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; + --card-foreground: 0 0% 3.9%; - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; + --popover: 0 0% 100%; + --popover-foreground: 0 0% 3.9%; - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; + --primary: 0 0% 9%; + --primary-foreground: 0 0% 98%; - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; + --secondary: 0 0% 96.1%; + --secondary-foreground: 0 0% 9%; - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; + --muted: 0 0% 96.1%; + --muted-foreground: 0 0% 45.1%; + + --accent: 0 0% 96.1%; + --accent-foreground: 0 0% 9%; --destructive: 0 84.2% 60.2%; - --destructive-foreground: 210 40% 98%; - - --ring: 222.2 84% 4.9%; + --destructive-foreground: 0 0% 98%; + --border:0 0% 89.8%; + --input:0 0% 89.8%; + --ring:0 0% 3.9%; --radius: 0.5rem; } .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; + --background:0 0% 3.9%; + --foreground:0 0% 98%; - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; + --card:0 0% 3.9%; + --card-foreground:0 0% 98%; - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; + --popover:0 0% 3.9%; + --popover-foreground:0 0% 98%; - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; + --primary:0 0% 98%; + --primary-foreground:0 0% 9%; - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; + --secondary:0 0% 14.9%; + --secondary-foreground:0 0% 98%; - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; + --muted:0 0% 14.9%; + --muted-foreground:0 0% 63.9%; - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; + --accent:0 0% 14.9%; + --accent-foreground:0 0% 98%; - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; + --destructive:0 62.8% 30.6%; + --destructive-foreground:0 0% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - - --ring: 212.7 26.8% 83.9%; + --border:0 0% 14.9%; + --input:0 0% 14.9%; + --ring:0 0% 83.1%; } } diff --git a/src/assets/less/app.less b/src/assets/less/app.less index 9eefe1e..a61cbec 100644 --- a/src/assets/less/app.less +++ b/src/assets/less/app.less @@ -71,7 +71,6 @@ section { justify-content: center; padding: 0; overflow-y: scroll; - box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); } .hint { @@ -87,8 +86,6 @@ section { font-size: 14px; box-sizing: border-box; outline: none; - color: var(--el-text-color-regular); - box-shadow: var(--el-box-shadow); } .preview table { diff --git a/src/assets/less/theme.less b/src/assets/less/theme.less index 8592b7e..2fb4adb 100644 --- a/src/assets/less/theme.less +++ b/src/assets/less/theme.less @@ -1,35 +1,13 @@ -@nightBgColor: #333333; -@nightPreviewColor: #1e1e1e; -@nightHeaderColor: #3c3c3c; -@nightCodeMirrorColor: #1e1e1e; +@nightPreviewColor: #191919; +@nightCodeMirrorColor: #191919; @nightActiveCodeMirrorColor: gray; @nightFontColor: gray; @nightLinkColor: #8e9eb9; @nightLinkTextColor: #84868b; -@nightWhiteColor: #f0f0f0; -@nightButtonBg: #1e1e1e; -@nightButtonHoverColor: #84868b; @nightLineColor: #84868b; .dark { .container { - background-color: @nightBgColor; - - .CodeMirror { - caret-color: @nightFontColor; - color: @nightFontColor; - background-color: @nightCodeMirrorColor; - box-shadow: inset 0 0 0 1px rgba(100, 37, 37, 0.102); - - .CodeMirror-cursor { - border-left: 1px solid @nightLineColor; - } - - .CodeMirror-activeline-background { - background-color: #3e3e3e!important; - } - } - .output_night { .preview { background-color: @nightPreviewColor; @@ -46,20 +24,6 @@ } } - .cm-s-xq-light span.cm-variable-2, - - .cm-s-xq-light .CodeMirror-activeline-background { - background-color: transparent; - } - - .cm-s-xq-light span.cm-string { - color: @nightLinkColor; - } - - .cm-s-xq-light span.cm-link { - color: @nightLinkTextColor; - } - ::-webkit-scrollbar { background-color: @nightCodeMirrorColor; } @@ -69,7 +33,6 @@ .CodeMirror { padding-bottom: 0; height: 100% !important; - box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); font-size: 14px; font-family: 'PingFang SC', BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif !important; diff --git a/src/components/CodemirrorEditor/CssEditor.vue b/src/components/CodemirrorEditor/CssEditor.vue index 06e1f52..a75e8c1 100644 --- a/src/components/CodemirrorEditor/CssEditor.vue +++ b/src/components/CodemirrorEditor/CssEditor.vue @@ -67,7 +67,7 @@ function handleTabsEdit(targetName, action) {