Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/page/template/content/conversation/title-bar.htm
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
data-placement="bottom"
data-uie-name="do-participants"
class="conversation-title-bar-name">
<!-- ko if: conversationEntity().hasLegalHold() -->
<legal-hold-dot style="margin: 0 16px 0 0" params="legalHoldModal: contentViewModel.legalHoldModal, conversation: conversationEntity" data-uie-name="status-legal-hold-conversation"></legal-hold-dot>
<!-- /ko -->
<!-- ko if: conversationEntity().verification_state() === ConversationVerificationState.VERIFIED -->
<verified-icon class="conversation-title-bar-name--verified"></verified-icon>
<div class="conversation-title-bar-name-label--wrapper">
<!-- ko if: conversationEntity().hasLegalHold() -->
<legal-hold-dot style="margin: 0 16px 0 0" params="legalHoldModal: contentViewModel.legalHoldModal, conversation: conversationEntity" data-uie-name="status-legal-hold-conversation"></legal-hold-dot>
<!-- /ko -->
<!-- ko if: conversationEntity().verification_state() === ConversationVerificationState.VERIFIED -->
<verified-icon class="conversation-title-bar-name--verified"></verified-icon>
<!-- /ko -->
<span class="conversation-title-bar-name-label" data-bind="text: conversationEntity().display_name()" data-uie-name="status-conversation-title-bar-label"></span>
</div>
<!-- ko if: conversationSubtitle() -->
<div class="conversation-title-bar-name--subtitle" data-bind="text: conversationSubtitle()"></div>
<!-- /ko -->
<span class="conversation-title-bar-name-label" data-bind="text: conversationEntity().display_name()" data-uie-name="status-conversation-title-bar-label"></span>
</div>

<div class="conversation-title-bar-icons">
Expand Down
10 changes: 9 additions & 1 deletion src/script/view_model/content/TitleBarViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class TitleBarViewModel {
readonly supportsVideoCall: ko.PureComputed<boolean>;
readonly isVideoCallingEnabled: ko.PureComputed<boolean>;
readonly peopleTooltip: string;
readonly conversationSubtitle: ko.PureComputed<string>;

constructor(
readonly callingViewModel: CallingViewModel,
Expand All @@ -70,10 +71,17 @@ export class TitleBarViewModel {
// TODO remove the titlebar for now to ensure that buttons are clickable in macOS wrappers
window.setTimeout(() => $('.titlebar').remove(), TIME_IN_MILLIS.SECOND);

this.conversationEntity = this.conversationState.activeConversation;
this.conversationEntity = this.conversationState.activeConversation!;
this.ConversationVerificationState = ConversationVerificationState;

this.isActivatedAccount = this.userState.isActivatedAccount;
this.conversationSubtitle = ko.pureComputed(() => {
return this.conversationEntity() &&
this.conversationEntity().is1to1() &&
!this.conversationEntity().firstUserEntity().isOnSameFederatedDomain()
? this.conversationEntity().firstUserEntity().handle
: '';
});

this.hasCall = ko.pureComputed(() => {
const hasEntities = this.conversationEntity() && !!this.callState.joinedCall();
Expand Down
10 changes: 10 additions & 0 deletions src/style/content/conversation/title-bar.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

display: flex;
height: 100%;
flex-direction: column;
flex-grow: 1;
cursor: pointer;
user-select: none;
Expand Down Expand Up @@ -95,4 +96,13 @@
.label-bold-xs;
overflow: hidden;
text-overflow: ellipsis;
&--wrapper {
.flex-center;
display: flex;
}
}

.conversation-title-bar-name--subtitle {
.font-size-xs;
color: var(--background-fade-40);
}