Skip to content

Commit 9f9a678

Browse files
committed
Small fixes
1 parent 8223f81 commit 9f9a678

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

projects/stream-chat-angular/src/assets/i18n/en.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ export const en = {
141141
'Suggest an option': 'Suggest an option',
142142
'Add a comment': 'Add a comment',
143143
'Update your comment': 'Update your comment',
144-
'View {{count}} comments': 'View {{count}} comments',
145-
'View {{count}} comment': 'View {{count}} comment',
144+
'View {{ count }} comments': 'View {{ count }} comments',
145+
'View {{ count }} comment': 'View {{ count }} comment',
146146
'View results': 'View results',
147147
'End vote': 'End vote',
148148
'After a poll is closed, no more votes can be cast':

projects/stream-chat-angular/src/lib/polls/poll-actions/add-option/add-option.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="str-chat__dialog__title">
66
{{ "streamChat.Suggest an option" | translate }}
77
</div>
8-
<form [formGroup]="formGroup" (ngSubmit)="addOption()">
8+
<form [formGroup]="formGroup">
99
<div class="str-chat__dialog__field">
1010
<input formControlName="text" id="text" type="text" />
1111
<div class="str-chat__form-field-error">
@@ -19,17 +19,17 @@
1919
<div class="str-chat__dialog__controls">
2020
<button
2121
class="str-chat__dialog__controls-button str-chat__dialog__controls-button--cancel"
22-
onClick="{close}"
2322
type="button"
24-
translate
2523
(click)="closeModal()"
24+
(keyup.enter)="closeModal()"
2625
>
2726
{{ "streamChat.Cancel" | translate }}
2827
</button>
2928
<button
3029
class="str-chat__dialog__controls-button str-chat__dialog__controls-button--submit"
3130
type="submit"
32-
translate
31+
(click)="addOption()"
32+
(keyup.enter)="addOption()"
3333
[disabled]="formGroup.invalid"
3434
>
3535
{{ "streamChat.Send" | translate }}

projects/stream-chat-angular/src/lib/polls/poll-actions/poll-actions.component.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
</button>
2424
</ng-container>
2525
<ng-container *ngIf="allowAnswers && canVote && !isClosed">
26-
<button class="str-chat__poll-action" (click)="modalOpened('addAnswer')">
26+
<button
27+
class="str-chat__poll-action"
28+
(click)="modalOpened('addAnswer')"
29+
(keyup.enter)="modalOpened('addAnswer')"
30+
>
2731
<ng-container *ngIf="ownAnwer; else newAnswer">
2832
{{ "streamChat.Update your comment" | translate }}
2933
</ng-container>
@@ -34,7 +38,7 @@
3438
</ng-container>
3539
<ng-container *ngIf="answerCount > 0 && canQueryVotes">
3640
<button class="str-chat__poll-action" (click)="modalOpened('viewComments')">
37-
{{ (answerCount === 1 ? "streamChat.View {{count}} comment" :
41+
{{ (answerCount === 1 ? "streamChat.View {{ count }} comment" :
3842
"streamChat.View {{ count }} comments") | translate:{count: answerCount}
3943
}}
4044
</button>
@@ -78,7 +82,9 @@
7882
<ng-template #allOptions>
7983
<div class="str-chat__modal__poll-option-list str-chat-angular__poll-actions">
8084
<div class="str-chat__modal-header">
81-
<div class="str-chat__modal-header__title" translate>Poll options</div>
85+
<div class="str-chat__modal-header__title" translate>
86+
streamChat.Poll options
87+
</div>
8288
</div>
8389
<div class="str-chat__modal__poll-option-list__body">
8490
<div class="str-chat__modal__poll-option-list__title">{{ name }}</div>

projects/stream-chat-angular/src/lib/polls/poll-actions/poll-actions.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export class PollActionsComponent extends BasePollComponent {
115115
if (this.isModalOpen) {
116116
this.isModalOpen = false;
117117
this.messageService.modalOpenedForMessage.next(undefined);
118+
this.markForCheck();
118119
}
119120
};
120121

0 commit comments

Comments
 (0)