From 2f48df9e9d84a466669b6cc38010897bc5d62483 Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Wed, 23 Sep 2020 12:40:41 +0100 Subject: [PATCH] update fractal description --- src/clients/Fractal.tsx | 11 ++++++++--- src/components/ClientTile.tsx | 29 ++++++++++++++++------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/clients/Fractal.tsx b/src/clients/Fractal.tsx index a0caaac..058b4d6 100644 --- a/src/clients/Fractal.tsx +++ b/src/clients/Fractal.tsx @@ -37,9 +37,14 @@ const Fractal: TextClient = { case LinkKind.Alias: case LinkKind.RoomId: case LinkKind.UserId: - return Click the '+' button in the top right; + return ( + + Click the '+' button in the top right and paste the + identifier + + ); default: - return Weechat doesn't support this kind of link; + return Fractal doesn't support this kind of link; } }, copyString: (link) => { @@ -63,7 +68,7 @@ const Fractal: TextClient = { } }, - description: 'Command-line Matrix interface using Weechat', + description: 'Fractal is a Matrix Client written in Rust', }; export default Fractal; diff --git a/src/components/ClientTile.tsx b/src/components/ClientTile.tsx index ba3e57d..c238a8b 100644 --- a/src/components/ClientTile.tsx +++ b/src/components/ClientTile.tsx @@ -39,19 +39,22 @@ const ClientTile: React.FC = ({ client, link }: IProps) => { clientTileLink: client.kind === ClientKind.LINKED_CLIENT, }); - const inviteButton = - client.kind === ClientKind.LINKED_CLIENT ? ( - - ) : ( - - ); + let inviteButton: JSX.Element = <>; + if (client.kind === ClientKind.LINKED_CLIENT) { + inviteButton = ; + } else { + const copyString = client.copyString(link); + if (copyString !== '') { + inviteButton = ( + + ); + } + } let clientTile = (