This is an automated email from the ASF dual-hosted git repository. shuai pushed a commit to branch test in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit ece404ef2eaaa038a4cd9cee8c22f450ec3efb97 Author: sy-records <[email protected]> AuthorDate: Fri May 31 13:15:49 2024 +0800 fix: loginToContinueModal z-index error fix: loginToContinueModal z-index error --- ui/src/components/Comment/index.tsx | 7 ++++-- ui/src/components/Modal/LoginToContinueModal.tsx | 4 +++- ui/src/components/Modal/login.scss | 26 ++++++++++++++++++++++ .../Detail/components/Reactions/index.tsx | 3 ++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsx index 88d29de8..1cb46f12 100644 --- a/ui/src/components/Comment/index.tsx +++ b/ui/src/components/Comment/index.tsx @@ -364,9 +364,12 @@ const Comment = ({ objectId, mode, commentId }) => { }; const handleAddComment = () => { - if (tryNormalLogged(true)) { - setVisibleComment(!visibleComment); + if (!tryNormalLogged(true)) { + setVisibleComment(false); + return; } + + setVisibleComment(!visibleComment); }; return ( diff --git a/ui/src/components/Modal/LoginToContinueModal.tsx b/ui/src/components/Modal/LoginToContinueModal.tsx index 96ed666f..b9d8f0d3 100644 --- a/ui/src/components/Modal/LoginToContinueModal.tsx +++ b/ui/src/components/Modal/LoginToContinueModal.tsx @@ -26,6 +26,8 @@ import { loginToContinueStore, siteInfoStore } from '@/stores'; import { floppyNavigation } from '@/utils'; import { WelcomeTitle } from '@/components'; +import './login.scss'; + interface IProps { visible: boolean; } @@ -44,10 +46,10 @@ const Index: React.FC<IProps> = ({ visible = false }) => { }; return ( <Modal - title="LoginToContinue" show={visible} onHide={closeModal} centered + className="loginToContinueModal" fullscreen="sm-down"> <Modal.Header closeButton> <Modal.Title as="h5">{t('login_to_continue')}</Modal.Title> diff --git a/ui/src/components/Modal/login.scss b/ui/src/components/Modal/login.scss new file mode 100644 index 00000000..723f27c9 --- /dev/null +++ b/ui/src/components/Modal/login.scss @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.modal-backdrop { + z-index: 1081; +} + +.loginToContinueModal.show { + z-index: 1082; +} diff --git a/ui/src/pages/Questions/Detail/components/Reactions/index.tsx b/ui/src/pages/Questions/Detail/components/Reactions/index.tsx index 27a7619a..4cf7b454 100644 --- a/ui/src/pages/Questions/Detail/components/Reactions/index.tsx +++ b/ui/src/pages/Questions/Detail/components/Reactions/index.tsx @@ -50,6 +50,7 @@ const Index: FC<Props> = ({ const handleSubmit = (params: { object_id: string; emoji: string }) => { if (!tryNormalLogged(true)) { + setReactIsActive(false); return; } updateReaction({ @@ -135,7 +136,7 @@ const Index: FC<Props> = ({ }> <Button title={emoji.name} - className="rounded-pill ms-2 link-secondary d-flex align-items-center" + className="rounded-pill ms-2 link-secondary align-items-center" variant="light" size="sm" onClick={() =>
