You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2024/05/06 07:23:48 UTC

(incubator-answer) branch feat/1.3.1/ui created (now 7e81bf9a)

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

shuai pushed a change to branch feat/1.3.1/ui
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


      at 7e81bf9a fix: mentions style add apacje license

This branch includes the following new commits:

     new 40a6cbda fix: mentions style format
     new 7e81bf9a fix: mentions style add apacje license

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-answer) 02/02: fix: mentions style add apacje license

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch feat/1.3.1/ui
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 7e81bf9ad650f2547bd7b45a5cca8641a576fd00
Author: shuai <li...@sifou.com>
AuthorDate: Mon May 6 15:23:36 2024 +0800

    fix: mentions style add apacje license
---
 ui/src/components/Mentions/index.scss | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/ui/src/components/Mentions/index.scss b/ui/src/components/Mentions/index.scss
index bd8614a3..69c73f88 100644
--- a/ui/src/components/Mentions/index.scss
+++ b/ui/src/components/Mentions/index.scss
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
 .bg-gray-200 {
   color: var(--bs-body-color);
   background-color: var(--an-invite-answer-item-active);


(incubator-answer) 01/02: fix: mentions style format

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch feat/1.3.1/ui
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 40a6cbdab74ba404323798817ce760e3ecaa8a93
Author: shuai <li...@sifou.com>
AuthorDate: Mon May 6 15:22:58 2024 +0800

    fix: mentions style format
---
 ui/src/components/Mentions/index.scss | 4 ++++
 ui/src/components/Mentions/index.tsx  | 9 ++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ui/src/components/Mentions/index.scss b/ui/src/components/Mentions/index.scss
new file mode 100644
index 00000000..bd8614a3
--- /dev/null
+++ b/ui/src/components/Mentions/index.scss
@@ -0,0 +1,4 @@
+.bg-gray-200 {
+  color: var(--bs-body-color);
+  background-color: var(--an-invite-answer-item-active);
+}
diff --git a/ui/src/components/Mentions/index.tsx b/ui/src/components/Mentions/index.tsx
index 63d0f702..fd1beb03 100644
--- a/ui/src/components/Mentions/index.tsx
+++ b/ui/src/components/Mentions/index.tsx
@@ -23,6 +23,8 @@ import { Dropdown } from 'react-bootstrap';
 import { useSearchUserStaff } from '@/services';
 import * as Types from '@/common/interface';
 
+import './index.scss';
+
 interface IProps {
   children: React.ReactNode;
   pageUsers;
@@ -50,8 +52,6 @@ const Mentions: FC<IProps> = ({ children, pageUsers, onSelected }) => {
           users.findIndex((user) => user.userName === item.userName) < 0,
       ) || [];
 
-  console.log('staffUserList:', staffUserList);
-
   const searchUser = () => {
     const element = dropdownRef.current?.children[0];
     const { value, selectionStart = 0 } = element as HTMLTextAreaElement;
@@ -71,9 +71,6 @@ const Mentions: FC<IProps> = ({ children, pageUsers, onSelected }) => {
     if (str.substring(str.lastIndexOf(' '), selectionStart).indexOf('@') < 0) {
       return;
     }
-
-    console.log('str111111:', str);
-    console.log('str2222:', str.substring(1));
     setValue(str.substring(1));
 
     if (!str.substring(1)) {
@@ -148,6 +145,8 @@ const Mentions: FC<IProps> = ({ children, pageUsers, onSelected }) => {
     }
   };
 
+  console.log('keyCode11111', cursor);
+
   return (
     <Dropdown
       ref={dropdownRef}