From 97dbe15a010f29c5e9116f3711f50a34fb748153 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sun, 31 Jan 2021 13:18:18 +0800
Subject: ...

---
 FrontEnd/src/app/views/timeline-common/TimelineMember.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'FrontEnd/src/app/views/timeline-common/TimelineMember.tsx')

diff --git a/FrontEnd/src/app/views/timeline-common/TimelineMember.tsx b/FrontEnd/src/app/views/timeline-common/TimelineMember.tsx
index 7bc81e7f..9660b2aa 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelineMember.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelineMember.tsx
@@ -33,7 +33,7 @@ const TimelineMemberItem: React.FC<{
         {onAction ? (
           <Button
             className="align-self-center"
-            variant="danger"
+            variant={add ? "success" : "danger"}
             onClick={() => {
               onAction(user.username);
             }}
@@ -88,7 +88,7 @@ const TimelineMemberUserSearch: React.FC<{ timeline: TimelineInfo }> = ({
                   (user) =>
                     timeline.members.findIndex(
                       (m) => m.username === user.username
-                    ) === -1
+                    ) === -1 && timeline.owner.username !== user.username
                 );
                 setUserSearchState({ type: "users", data: users });
               },
@@ -108,8 +108,8 @@ const TimelineMemberUserSearch: React.FC<{ timeline: TimelineInfo }> = ({
             return <div>{t("timeline.member.noUserAvailableToAdd")}</div>;
           } else {
             return (
-              <ListGroup>
-                {users.map((user) => {
+              <ListGroup className="mt-2">
+                {users.map((user) => (
                   <TimelineMemberItem
                     key={user.username}
                     user={user}
@@ -122,8 +122,8 @@ const TimelineMemberUserSearch: React.FC<{ timeline: TimelineInfo }> = ({
                           setUserSearchState({ type: "init" });
                         });
                     }}
-                  />;
-                })}
+                  />
+                ))}
               </ListGroup>
             );
           }
-- 
cgit v1.2.3

