Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show group members in header #145

Merged
merged 8 commits into from
Mar 8, 2017
Merged
14 changes: 14 additions & 0 deletions src/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,18 @@ angular.module('3ema.filters', [])
};
}])

/**
* Convert ID-Array to (Display-)Name-String, separated by ','
*/
.filter('idToName', ['WebClientService', function (webClientService: threema.WebClientService) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .filter call should not be indented, to match the rest of the file.

Also, the function should probably be named idsToNames, since it accepts multiple ids.

return(ids: string[]) => {
let names: string[] = [];
for (let id of ids){
this.contactReceiver = webClientService.contacts.get(id);
names.push(this.contactReceiver.displayName);
}
return names.join(', ');
};
}])

;
2 changes: 1 addition & 1 deletion src/partials/dialog.about.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<form ng-cloak>
<md-toolbar>
<div class="md-toolbar-tools">
<h2>About</h2>
<h2 translate>messenger.ABOUT</h2>
<span flex></span>
<md-button class="md-icon-button" ng-click="ctrl.cancel()">
<md-icon aria-label="Close dialog" class="material-icons md-24">close</md-icon>
Expand Down
3 changes: 3 additions & 0 deletions src/partials/messenger.conversation.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<eee-verification-level ng-if="ctrl.type == 'contact'"
contact="ctrl.receiver"></eee-verification-level>
</div>
<div class="conversation-header-details-detail" ng-if="ctrl.type == 'group'">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the whole list to the title attribute

title="{{ctrl.receiver.members | idToName}}"

<span>{{ ctrl.receiver.members | idToName }}</span>
</div>
</div>
</div>
<div id="conversation-is-private" ng-if="ctrl.locked">
Expand Down
10 changes: 9 additions & 1 deletion src/sass/sections/_conversation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

.header-details {
@include mouse-hand;

overflow: hidden;

& > *:first-child {
font-weight: bold;
Expand All @@ -29,6 +29,14 @@
padding: 0;
font-size: 120%;
}

.conversation-header-details-detail, .conversation-header-details-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
display: inherit;
Copy link
Contributor

@dbrgn dbrgn Mar 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add line-height: 1.3 here? Otherwise text containing characters like "g" is cut off at the bottom.

}
}

#conversation-is-private {
Expand Down