From 748fdef1fbded624a786533e8f065b91a047b91c Mon Sep 17 00:00:00 2001 From: samogot Date: Sat, 30 Jul 2016 03:54:42 +0900 Subject: Online status in all modals (#3617) * add wrapper to modal avatar image which show small round indicator of online/away status of member in all modals * add offline indicator * the color of the status indicators follow the theme --- webapp/components/popover_list_members.jsx | 18 ++++++++++++------ webapp/components/user_list_row.jsx | 19 +++++++++++++------ webapp/sass/components/_modal.scss | 23 ++++++++++++++++++++++- webapp/utils/utils.jsx | 2 ++ 4 files changed, 49 insertions(+), 13 deletions(-) diff --git a/webapp/components/popover_list_members.jsx b/webapp/components/popover_list_members.jsx index 306fa7a2e..0b318d487 100644 --- a/webapp/components/popover_list_members.jsx +++ b/webapp/components/popover_list_members.jsx @@ -88,18 +88,24 @@ export default class PopoverListMembers extends React.Component { } if (name) { + if (!m.status) { + var status = UserStore.getStatus(m.id); + m.status = status ? 'status-' + status : ''; + } popoverHtml.push(
- + + +
- + + +
diff --git a/webapp/sass/components/_modal.scss b/webapp/sass/components/_modal.scss index 6e5ff5d06..5ea1337f1 100644 --- a/webapp/sass/components/_modal.scss +++ b/webapp/sass/components/_modal.scss @@ -503,7 +503,28 @@ @include border-radius(60px); flex-grow: 0; flex-shrink: 0; - margin-right: 8px; + max-width: none; + + &-wrapper { + position: relative; + display: inline-block; + margin-right: 8px; + + &:after { + content: ""; + right: 0; + bottom: 0; + width: 25%; + height: 25%; + display: block; + position: absolute; + border-radius: 100%; + } + + &.status-offline:after { + background: #D3D3D3; + } + } } .more-modal__details { diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index 613995200..c4cee3235 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -575,12 +575,14 @@ export function applyTheme(theme) { changeCss('.app__body .sidebar--left .status .online--icon', 'fill:' + theme.onlineIndicator, 1); changeCss('.app__body .channel-header__info .status .online--icon', 'fill:' + theme.onlineIndicator, 1); changeCss('.app__body .navbar .status .online--icon', 'fill:' + theme.onlineIndicator, 1); + changeCss('.more-modal__list .more-modal__image-wrapper.status-online:after', 'background:' + theme.onlineIndicator, 1); } if (theme.awayIndicator) { changeCss('.app__body .sidebar--left .status .away--icon', 'fill:' + theme.awayIndicator, 1); changeCss('.app__body .channel-header__info .status .away--icon', 'fill:' + theme.awayIndicator, 1); changeCss('.app__body .navbar .status .away--icon', 'fill:' + theme.awayIndicator, 1); + changeCss('.more-modal__list .more-modal__image-wrapper.status-away:after', 'background:' + theme.awayIndicator, 1); } if (theme.mentionBj) { -- cgit v1.2.3-1-g7c22