</div>
</div>
- <div class="submit-comment">
+ <div class="comment-buttons">
+ <button *ngIf="isAddButtonDisplayed()" class="cancel-button" (click)="cancelCommentReply()" i18n>
+ Cancel
+ </button>
<button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid || addingComment }" i18n>
- Post comment
+ Reply
</button>
</div>
</form>
}
}
-.submit-comment {
+.cancel-button {
+ font-weight: $font-semibold;
+ display: inline-block;
+ padding: 0 10px 0 10px;
+ white-space: nowrap;
+ background: transparent;
+}
+
+.comment-buttons {
display: flex;
justify-content: flex-end;
button {
@include peertube-button;
- @include orange-button;
+
+ &:last-child {
+ @include orange-button;
+ }
}
}
@media screen and (max-width: 600px) {
- textarea, .submit-comment button {
+ textarea, .comment-buttons button {
font-size: 14px !important;
}
@Input() focusOnInit = false
@Output() commentCreated = new EventEmitter<VideoCommentCreate>()
+ @Output() cancel = new EventEmitter()
@ViewChild('visitorModal', { static: true }) visitorModal: NgbModal
@ViewChild('textarea', { static: true }) textareaElement: ElementRef
return this.videoCommentService
.addCommentThread(this.video.id, commentCreate)
}
+
+ private cancelCommentReply () {
+ this.cancel.emit(null)
+ }
}
[parentComments]="newParentComments"
[focusOnInit]="true"
(commentCreated)="onCommentReplyCreated($event)"
+ (cancel)="onResetReply()"
></my-video-comment-add>
<div *ngIf="commentTree" class="children">
}
}
+ .right {
+ width: 100%;
+ }
+
.comment-avatar {
@include avatar(36px);