From 13c472e1415e0056e7c3f10ccde30b7e2d9f532a Mon Sep 17 00:00:00 2001 From: "haitao(lj)" Date: Fri, 16 Dec 2022 17:59:11 +0800 Subject: [PATCH 1/2] fix(navbar): Restore the gradient background of the navbar --- ui/src/components/Header/index.scss | 6 ++++++ ui/src/components/Header/index.tsx | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/src/components/Header/index.scss b/ui/src/components/Header/index.scss index bbcb74f8..e8c1c436 100644 --- a/ui/src/components/Header/index.scss +++ b/ui/src/components/Header/index.scss @@ -2,6 +2,7 @@ @import 'bootstrap/scss/variables'; #header { --bs-navbar-padding-y: 0.75rem; + background: linear-gradient(180deg, rgb(var(--bs-primary-rgb)) 0%, rgba(var(--bs-primary-rgb), 0.95) 100%); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 0.125rem 0.25rem rgb(0 0 0 / 8%); .logo { max-height: 1.75rem; @@ -49,6 +50,11 @@ } } } + + // style for colored navbar + &.theme-light { + background: linear-gradient(180deg, rgb(var(--bs-light-rgb)) 0%, rgba(var(--bs-light-rgb), 0.95) 100%); + } } diff --git a/ui/src/components/Header/index.tsx b/ui/src/components/Header/index.tsx index c5daf7db..6f286651 100644 --- a/ui/src/components/Header/index.tsx +++ b/ui/src/components/Header/index.tsx @@ -82,10 +82,7 @@ const Header: FC = () => { Date: Fri, 16 Dec 2022 18:03:13 +0800 Subject: [PATCH 2/2] refactor(ui): solve the problem that the focus style is incorrect --- ui/src/pages/Questions/Detail/components/WriteAnswer/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/pages/Questions/Detail/components/WriteAnswer/index.tsx b/ui/src/pages/Questions/Detail/components/WriteAnswer/index.tsx index febdb585..01badd47 100644 --- a/ui/src/pages/Questions/Detail/components/WriteAnswer/index.tsx +++ b/ui/src/pages/Questions/Detail/components/WriteAnswer/index.tsx @@ -82,6 +82,7 @@ const Index: FC = ({ visible = false, data, callback }) => { handleSubmit(); }; const handleFocusForTextArea = () => { + setForceType('answer'); setShowEditor(true); };