diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-02-28 13:52:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 13:52:21 +0100 |
commit | d3217560a611b94f888ecf3de93b428a7521d4de (patch) | |
tree | 26fc984f351afb994dc13c94e138476ded50c76a /client/src/app/videos/video-list | |
parent | 64645512b08875c18ebdc009a550cdfa69def955 (diff) | |
download | PeerTube-d3217560a611b94f888ecf3de93b428a7521d4de.tar.gz PeerTube-d3217560a611b94f888ecf3de93b428a7521d4de.tar.zst PeerTube-d3217560a611b94f888ecf3de93b428a7521d4de.zip |
Add visitor settings, rework logged-in dropdown (#2514)
* Add visitor settings, rework logged-in dropdown
* Make user dropdown P2P switch functional
* Fix lint
* Fix unnecessary notification when user logs out
* Simplify visitor settings code and remove unnecessary icons
* Catch parsing errors and reindent menu styles
Diffstat (limited to 'client/src/app/videos/video-list')
5 files changed, 20 insertions, 0 deletions
diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts index 59f65f95c..757b0e498 100644 --- a/client/src/app/videos/video-list/video-local.component.ts +++ b/client/src/app/videos/video-list/video-local.component.ts | |||
@@ -11,6 +11,8 @@ import { ScreenService } from '@app/shared/misc/screen.service' | |||
11 | import { UserRight } from '../../../../../shared/models/users' | 11 | import { UserRight } from '../../../../../shared/models/users' |
12 | import { Notifier, ServerService } from '@app/core' | 12 | import { Notifier, ServerService } from '@app/core' |
13 | import { HooksService } from '@app/core/plugins/hooks.service' | 13 | import { HooksService } from '@app/core/plugins/hooks.service' |
14 | import { UserService } from '@app/shared' | ||
15 | import { LocalStorageService } from '@app/shared/misc/storage.service' | ||
14 | 16 | ||
15 | @Component({ | 17 | @Component({ |
16 | selector: 'my-videos-local', | 18 | selector: 'my-videos-local', |
@@ -31,7 +33,9 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On | |||
31 | protected route: ActivatedRoute, | 33 | protected route: ActivatedRoute, |
32 | protected notifier: Notifier, | 34 | protected notifier: Notifier, |
33 | protected authService: AuthService, | 35 | protected authService: AuthService, |
36 | protected userService: UserService, | ||
34 | protected screenService: ScreenService, | 37 | protected screenService: ScreenService, |
38 | protected storageService: LocalStorageService, | ||
35 | private videoService: VideoService, | 39 | private videoService: VideoService, |
36 | private hooks: HooksService | 40 | private hooks: HooksService |
37 | ) { | 41 | ) { |
diff --git a/client/src/app/videos/video-list/video-most-liked.component.ts b/client/src/app/videos/video-list/video-most-liked.component.ts index 6ff7a1e0e..b69fad05f 100644 --- a/client/src/app/videos/video-list/video-most-liked.component.ts +++ b/client/src/app/videos/video-list/video-most-liked.component.ts | |||
@@ -9,6 +9,8 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
9 | import { ScreenService } from '@app/shared/misc/screen.service' | 9 | import { ScreenService } from '@app/shared/misc/screen.service' |
10 | import { Notifier, ServerService } from '@app/core' | 10 | import { Notifier, ServerService } from '@app/core' |
11 | import { HooksService } from '@app/core/plugins/hooks.service' | 11 | import { HooksService } from '@app/core/plugins/hooks.service' |
12 | import { UserService } from '@app/shared' | ||
13 | import { LocalStorageService } from '@app/shared/misc/storage.service' | ||
12 | 14 | ||
13 | @Component({ | 15 | @Component({ |
14 | selector: 'my-videos-most-liked', | 16 | selector: 'my-videos-most-liked', |
@@ -28,7 +30,9 @@ export class VideoMostLikedComponent extends AbstractVideoList implements OnInit | |||
28 | protected route: ActivatedRoute, | 30 | protected route: ActivatedRoute, |
29 | protected notifier: Notifier, | 31 | protected notifier: Notifier, |
30 | protected authService: AuthService, | 32 | protected authService: AuthService, |
33 | protected userService: UserService, | ||
31 | protected screenService: ScreenService, | 34 | protected screenService: ScreenService, |
35 | protected storageService: LocalStorageService, | ||
32 | private videoService: VideoService, | 36 | private videoService: VideoService, |
33 | private hooks: HooksService | 37 | private hooks: HooksService |
34 | ) { | 38 | ) { |
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts index 7568f4536..c1ddd4fd4 100644 --- a/client/src/app/videos/video-list/video-recently-added.component.ts +++ b/client/src/app/videos/video-list/video-recently-added.component.ts | |||
@@ -9,6 +9,8 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
9 | import { ScreenService } from '@app/shared/misc/screen.service' | 9 | import { ScreenService } from '@app/shared/misc/screen.service' |
10 | import { Notifier, ServerService } from '@app/core' | 10 | import { Notifier, ServerService } from '@app/core' |
11 | import { HooksService } from '@app/core/plugins/hooks.service' | 11 | import { HooksService } from '@app/core/plugins/hooks.service' |
12 | import { UserService } from '@app/shared' | ||
13 | import { LocalStorageService } from '@app/shared/misc/storage.service' | ||
12 | 14 | ||
13 | @Component({ | 15 | @Component({ |
14 | selector: 'my-videos-recently-added', | 16 | selector: 'my-videos-recently-added', |
@@ -29,7 +31,9 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On | |||
29 | protected router: Router, | 31 | protected router: Router, |
30 | protected notifier: Notifier, | 32 | protected notifier: Notifier, |
31 | protected authService: AuthService, | 33 | protected authService: AuthService, |
34 | protected userService: UserService, | ||
32 | protected screenService: ScreenService, | 35 | protected screenService: ScreenService, |
36 | protected storageService: LocalStorageService, | ||
33 | private videoService: VideoService, | 37 | private videoService: VideoService, |
34 | private hooks: HooksService | 38 | private hooks: HooksService |
35 | ) { | 39 | ) { |
diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index e29830b5b..fbe052277 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts | |||
@@ -9,6 +9,8 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
9 | import { ScreenService } from '@app/shared/misc/screen.service' | 9 | import { ScreenService } from '@app/shared/misc/screen.service' |
10 | import { Notifier, ServerService } from '@app/core' | 10 | import { Notifier, ServerService } from '@app/core' |
11 | import { HooksService } from '@app/core/plugins/hooks.service' | 11 | import { HooksService } from '@app/core/plugins/hooks.service' |
12 | import { UserService } from '@app/shared' | ||
13 | import { LocalStorageService } from '@app/shared/misc/storage.service' | ||
12 | 14 | ||
13 | @Component({ | 15 | @Component({ |
14 | selector: 'my-videos-trending', | 16 | selector: 'my-videos-trending', |
@@ -28,7 +30,9 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, | |||
28 | protected route: ActivatedRoute, | 30 | protected route: ActivatedRoute, |
29 | protected notifier: Notifier, | 31 | protected notifier: Notifier, |
30 | protected authService: AuthService, | 32 | protected authService: AuthService, |
33 | protected userService: UserService, | ||
31 | protected screenService: ScreenService, | 34 | protected screenService: ScreenService, |
35 | protected storageService: LocalStorageService, | ||
32 | private videoService: VideoService, | 36 | private videoService: VideoService, |
33 | private hooks: HooksService | 37 | private hooks: HooksService |
34 | ) { | 38 | ) { |
diff --git a/client/src/app/videos/video-list/video-user-subscriptions.component.ts b/client/src/app/videos/video-list/video-user-subscriptions.component.ts index cf0b15054..036fd8dcb 100644 --- a/client/src/app/videos/video-list/video-user-subscriptions.component.ts +++ b/client/src/app/videos/video-list/video-user-subscriptions.component.ts | |||
@@ -10,6 +10,8 @@ import { ScreenService } from '@app/shared/misc/screen.service' | |||
10 | import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' | 10 | import { OwnerDisplayType } from '@app/shared/video/video-miniature.component' |
11 | import { Notifier, ServerService } from '@app/core' | 11 | import { Notifier, ServerService } from '@app/core' |
12 | import { HooksService } from '@app/core/plugins/hooks.service' | 12 | import { HooksService } from '@app/core/plugins/hooks.service' |
13 | import { UserService } from '@app/shared' | ||
14 | import { LocalStorageService } from '@app/shared/misc/storage.service' | ||
13 | 15 | ||
14 | @Component({ | 16 | @Component({ |
15 | selector: 'my-videos-user-subscriptions', | 17 | selector: 'my-videos-user-subscriptions', |
@@ -29,7 +31,9 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement | |||
29 | protected route: ActivatedRoute, | 31 | protected route: ActivatedRoute, |
30 | protected notifier: Notifier, | 32 | protected notifier: Notifier, |
31 | protected authService: AuthService, | 33 | protected authService: AuthService, |
34 | protected userService: UserService, | ||
32 | protected screenService: ScreenService, | 35 | protected screenService: ScreenService, |
36 | protected storageService: LocalStorageService, | ||
33 | private videoService: VideoService, | 37 | private videoService: VideoService, |
34 | private hooks: HooksService | 38 | private hooks: HooksService |
35 | ) { | 39 | ) { |