From 2956f8af0f8c0bd0ca7cc06b2e3912fd6f5d66f2 Mon Sep 17 00:00:00 2001 From: flovo <4864182+flovo@users.noreply.github.com> Date: Mon, 29 Jul 2019 23:03:58 +0200 Subject: [PATCH 1/5] Added chat window to group view Place a EmbeddedChat below group news --- src/views/Group/Group.styl | 10 ++++++++++ src/views/Group/Group.tsx | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/Group/Group.styl b/src/views/Group/Group.styl index 55d972ba0a..9fb23cebf4 100644 --- a/src/views/Group/Group.styl +++ b/src/views/Group/Group.styl @@ -88,4 +88,14 @@ button { margin: 0 0.5rem 1rem 0; } + + .EmbeddedChat { + flex-shrink: 0; + flex-grow: 1; + min-width: 15rem; + flex-basis: 15rem; + overflow: hidden; + .Chat { + } + } } diff --git a/src/views/Group/Group.tsx b/src/views/Group/Group.tsx index 4ef6624eea..3e948c385f 100644 --- a/src/views/Group/Group.tsx +++ b/src/views/Group/Group.tsx @@ -35,7 +35,7 @@ import * as Dropzone from "react-dropzone"; import {image_resizer} from "image_resizer"; import * as moment from "moment"; import {PlayerAutocomplete} from "PlayerAutocomplete"; - +import {EmbeddedChat} from "Chat"; declare var swal; @@ -607,6 +607,7 @@ export class Group extends React.PureComponent { } + {(group.has_tournament_records || null) && From c7b9a7610c145be0052834cc1db564416174bcae Mon Sep 17 00:00:00 2001 From: flovo <4864182+flovo@users.noreply.github.com> Date: Mon, 29 Jul 2019 23:40:29 +0200 Subject: [PATCH 2/5] space indentation instead of mixed --- src/views/Group/Group.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Group/Group.tsx b/src/views/Group/Group.tsx index 3e948c385f..2d064477e1 100644 --- a/src/views/Group/Group.tsx +++ b/src/views/Group/Group.tsx @@ -607,7 +607,7 @@ export class Group extends React.PureComponent { } - + {(group.has_tournament_records || null) && From 4fb672f25d97a0c31868180f00cdec2933d583d9 Mon Sep 17 00:00:00 2001 From: flovo <4864182+flovo@users.noreply.github.com> Date: Thu, 1 Aug 2019 11:35:53 +0200 Subject: [PATCH 3/5] Hide group chat if details are hidden Show group chat if either: - group details aren't hidden - user is member of group --- src/views/Group/Group.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/Group/Group.tsx b/src/views/Group/Group.tsx index 2d064477e1..6df4cc693e 100644 --- a/src/views/Group/Group.tsx +++ b/src/views/Group/Group.tsx @@ -37,6 +37,7 @@ import * as moment from "moment"; import {PlayerAutocomplete} from "PlayerAutocomplete"; import {EmbeddedChat} from "Chat"; + declare var swal; interface GroupProperties { @@ -607,8 +608,8 @@ export class Group extends React.PureComponent { } - - + {((!group.hide_details || group.is_member ) || null) && } + {(group.has_tournament_records || null) &&
From ceda98419d8027339859348c7e9aaeeeebbac8f5 Mon Sep 17 00:00:00 2001 From: flovo <4864182+flovo@users.noreply.github.com> Date: Thu, 1 Aug 2019 11:46:14 +0200 Subject: [PATCH 4/5] removed trailing whitespaces --- src/views/Group/Group.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Group/Group.tsx b/src/views/Group/Group.tsx index 6df4cc693e..37880db886 100644 --- a/src/views/Group/Group.tsx +++ b/src/views/Group/Group.tsx @@ -609,7 +609,7 @@ export class Group extends React.PureComponent { } {((!group.hide_details || group.is_member ) || null) && } - + {(group.has_tournament_records || null) &&
From cdc3e0ee3dfcdff614e86785093b960c89a128d8 Mon Sep 17 00:00:00 2001 From: flovo <4864182+flovo@users.noreply.github.com> Date: Thu, 1 Aug 2019 12:27:30 +0200 Subject: [PATCH 5/5] Show group chat to everyone only if it is public --- src/views/Group/Group.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Group/Group.tsx b/src/views/Group/Group.tsx index 37880db886..be1c121495 100644 --- a/src/views/Group/Group.tsx +++ b/src/views/Group/Group.tsx @@ -608,7 +608,7 @@ export class Group extends React.PureComponent { } - {((!group.hide_details || group.is_member ) || null) && } + {(((group.is_public && !group.hide_details) || group.is_member ) || null) && } {(group.has_tournament_records || null) &&