diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comments.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.ts | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index bba9f1372..df0018ec6 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts | |||
@@ -1,18 +1,13 @@ | |||
1 | import { Subject, Subscription } from 'rxjs' | ||
1 | import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core' | 2 | import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | 3 | import { ActivatedRoute } from '@angular/router' |
3 | import { ConfirmService, Notifier } from '@app/core' | 4 | import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifier, User } from '@app/core' |
4 | import { Subject, Subscription } from 'rxjs' | 5 | import { HooksService } from '@app/core/plugins/hooks.service' |
5 | import { AuthService } from '../../../core/auth' | 6 | import { Syndication, VideoDetails } from '@app/shared/shared-main' |
6 | import { ComponentPagination, hasMoreItems } from '../../../shared/rest/component-pagination.model' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
7 | import { User } from '../../../shared/users' | 8 | import { VideoCommentThreadTree } from './video-comment-thread-tree.model' |
8 | import { CommentSortField } from '../../../shared/video/sort-field.type' | ||
9 | import { VideoDetails } from '../../../shared/video/video-details.model' | ||
10 | import { VideoComment } from './video-comment.model' | 9 | import { VideoComment } from './video-comment.model' |
11 | import { VideoCommentService } from './video-comment.service' | 10 | import { VideoCommentService } from './video-comment.service' |
12 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
13 | import { Syndication } from '@app/shared/video/syndication.model' | ||
14 | import { HooksService } from '@app/core/plugins/hooks.service' | ||
15 | import { VideoCommentThreadTree } from '@app/videos/+video-watch/comment/video-comment-thread-tree.model' | ||
16 | 11 | ||
17 | @Component({ | 12 | @Component({ |
18 | selector: 'my-video-comments', | 13 | selector: 'my-video-comments', |
@@ -28,7 +23,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
28 | 23 | ||
29 | comments: VideoComment[] = [] | 24 | comments: VideoComment[] = [] |
30 | highlightedThread: VideoComment | 25 | highlightedThread: VideoComment |
31 | sort: CommentSortField = '-createdAt' | 26 | sort = '-createdAt' |
32 | componentPagination: ComponentPagination = { | 27 | componentPagination: ComponentPagination = { |
33 | currentPage: 1, | 28 | currentPage: 1, |
34 | itemsPerPage: 10, | 29 | itemsPerPage: 10, |
@@ -154,7 +149,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
154 | this.viewReplies(commentTree.comment.id) | 149 | this.viewReplies(commentTree.comment.id) |
155 | } | 150 | } |
156 | 151 | ||
157 | handleSortChange (sort: CommentSortField) { | 152 | handleSortChange (sort: string) { |
158 | if (this.sort === sort) return | 153 | if (this.sort === sort) return |
159 | 154 | ||
160 | this.sort = sort | 155 | this.sort = sort |