diff options
Diffstat (limited to 'client/src')
264 files changed, 448 insertions, 441 deletions
diff --git a/client/src/app/+about/about-follows/about-follows.component.ts b/client/src/app/+about/about-follows/about-follows.component.ts index e1df8b813..a542cdbf1 100644 --- a/client/src/app/+about/about-follows/about-follows.component.ts +++ b/client/src/app/+about/about-follows/about-follows.component.ts | |||
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ComponentPagination, hasMoreItems, Notifier, RestService, ServerService } from '@app/core' | 3 | import { ComponentPagination, hasMoreItems, Notifier, RestService, ServerService } from '@app/core' |
4 | import { InstanceFollowService } from '@app/shared/shared-instance' | 4 | import { InstanceFollowService } from '@app/shared/shared-instance' |
5 | import { Actor } from '@shared/models/actors' | 5 | import { Actor } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-about-follows', | 8 | selector: 'my-about-follows', |
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts index fc5214215..85e973d7b 100644 --- a/client/src/app/+about/about-instance/about-instance.component.ts +++ b/client/src/app/+about/about-instance/about-instance.component.ts | |||
@@ -3,8 +3,8 @@ import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@ang | |||
3 | import { ActivatedRoute } from '@angular/router' | 3 | import { ActivatedRoute } from '@angular/router' |
4 | import { Notifier, ServerService } from '@app/core' | 4 | import { Notifier, ServerService } from '@app/core' |
5 | import { AboutHTML } from '@app/shared/shared-instance' | 5 | import { AboutHTML } from '@app/shared/shared-instance' |
6 | import { HTMLServerConfig, ServerStats } from '@peertube/peertube-models' | ||
6 | import { copyToClipboard } from '@root-helpers/utils' | 7 | import { copyToClipboard } from '@root-helpers/utils' |
7 | import { HTMLServerConfig, ServerStats } from '@shared/models/server' | ||
8 | import { ResolverData } from './about-instance.resolver' | 8 | import { ResolverData } from './about-instance.resolver' |
9 | import { ContactAdminModalComponent } from './contact-admin-modal.component' | 9 | import { ContactAdminModalComponent } from './contact-admin-modal.component' |
10 | 10 | ||
diff --git a/client/src/app/+about/about-instance/about-instance.resolver.ts b/client/src/app/+about/about-instance/about-instance.resolver.ts index f52a95b88..b5e8ccaa2 100644 --- a/client/src/app/+about/about-instance/about-instance.resolver.ts +++ b/client/src/app/+about/about-instance/about-instance.resolver.ts | |||
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core' | |||
4 | import { ServerService } from '@app/core' | 4 | import { ServerService } from '@app/core' |
5 | import { CustomMarkupService } from '@app/shared/shared-custom-markup' | 5 | import { CustomMarkupService } from '@app/shared/shared-custom-markup' |
6 | import { AboutHTML, InstanceService } from '@app/shared/shared-instance' | 6 | import { AboutHTML, InstanceService } from '@app/shared/shared-instance' |
7 | import { About, ServerStats } from '@shared/models/server' | 7 | import { About, ServerStats } from '@peertube/peertube-models' |
8 | 8 | ||
9 | export type ResolverData = { | 9 | export type ResolverData = { |
10 | serverStats: ServerStats | 10 | serverStats: ServerStats |
diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.ts b/client/src/app/+about/about-instance/contact-admin-modal.component.ts index 0e2bf51e8..38e577fcd 100644 --- a/client/src/app/+about/about-instance/contact-admin-modal.component.ts +++ b/client/src/app/+about/about-instance/contact-admin-modal.component.ts | |||
@@ -11,7 +11,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
11 | import { InstanceService } from '@app/shared/shared-instance' | 11 | import { InstanceService } from '@app/shared/shared-instance' |
12 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 12 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
13 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 13 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
14 | import { HTMLServerConfig, HttpStatusCode } from '@shared/models' | 14 | import { HTMLServerConfig, HttpStatusCode } from '@peertube/peertube-models' |
15 | 15 | ||
16 | type Prefill = { | 16 | type Prefill = { |
17 | subject?: string | 17 | subject?: string |
diff --git a/client/src/app/+about/about-instance/instance-statistics.component.ts b/client/src/app/+about/about-instance/instance-statistics.component.ts index ac6984438..9eb56d0a4 100644 --- a/client/src/app/+about/about-instance/instance-statistics.component.ts +++ b/client/src/app/+about/about-instance/instance-statistics.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { ServerStats } from '@shared/models/server' | 2 | import { ServerStats } from '@peertube/peertube-models' |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-instance-statistics', | 5 | selector: 'my-instance-statistics', |
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts index 2ee168492..b8afa66ff 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | |||
@@ -5,7 +5,7 @@ import { ComponentPagination, hasMoreItems, MarkdownService, User, UserService } | |||
5 | import { SimpleMemoize } from '@app/helpers' | 5 | import { SimpleMemoize } from '@app/helpers' |
6 | import { Account, AccountService, Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' | 6 | import { Account, AccountService, Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' |
7 | import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' | 7 | import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' |
8 | import { NSFWPolicyType, VideoSortField } from '@shared/models' | 8 | import { NSFWPolicyType, VideoSortField } from '@peertube/peertube-models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-account-video-channels', | 11 | selector: 'my-account-video-channels', |
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.ts b/client/src/app/+accounts/account-videos/account-videos.component.ts index 13d1f857d..d8e8377e1 100644 --- a/client/src/app/+accounts/account-videos/account-videos.component.ts +++ b/client/src/app/+accounts/account-videos/account-videos.component.ts | |||
@@ -4,7 +4,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
4 | import { ComponentPaginationLight, DisableForReuseHook, ScreenService } from '@app/core' | 4 | import { ComponentPaginationLight, DisableForReuseHook, ScreenService } from '@app/core' |
5 | import { Account, AccountService, VideoService } from '@app/shared/shared-main' | 5 | import { Account, AccountService, VideoService } from '@app/shared/shared-main' |
6 | import { VideoFilters } from '@app/shared/shared-video-miniature' | 6 | import { VideoFilters } from '@app/shared/shared-video-miniature' |
7 | import { VideoSortField } from '@shared/models' | 7 | import { VideoSortField } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-account-videos', | 10 | selector: 'my-account-videos', |
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index 6d912e325..156f35804 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | VideoService | 13 | VideoService |
14 | } from '@app/shared/shared-main' | 14 | } from '@app/shared/shared-main' |
15 | import { AccountReportComponent, BlocklistService } from '@app/shared/shared-moderation' | 15 | import { AccountReportComponent, BlocklistService } from '@app/shared/shared-moderation' |
16 | import { HttpStatusCode, User, UserRight } from '@shared/models' | 16 | import { HttpStatusCode, User, UserRight } from '@peertube/peertube-models' |
17 | 17 | ||
18 | @Component({ | 18 | @Component({ |
19 | templateUrl: './accounts.component.html', | 19 | templateUrl: './accounts.component.html', |
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts index 49092ea2a..c0d7db99e 100644 --- a/client/src/app/+admin/admin.component.ts +++ b/client/src/app/+admin/admin.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core' | |||
2 | import { AuthService, ScreenService, ServerService } from '@app/core' | 2 | import { AuthService, ScreenService, ServerService } from '@app/core' |
3 | import { ListOverflowItem } from '@app/shared/shared-main' | 3 | import { ListOverflowItem } from '@app/shared/shared-main' |
4 | import { TopMenuDropdownParam } from '@app/shared/shared-main/misc/top-menu-dropdown.component' | 4 | import { TopMenuDropdownParam } from '@app/shared/shared-main/misc/top-menu-dropdown.component' |
5 | import { UserRight } from '@shared/models' | 5 | import { UserRight } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | templateUrl: './admin.component.html', | 8 | templateUrl: './admin.component.html', |
diff --git a/client/src/app/+admin/config/config.routes.ts b/client/src/app/+admin/config/config.routes.ts index 6d255ac46..96a4f3771 100644 --- a/client/src/app/+admin/config/config.routes.ts +++ b/client/src/app/+admin/config/config.routes.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config' | 2 | import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config' |
3 | import { UserRightGuard } from '@app/core' | 3 | import { UserRightGuard } from '@app/core' |
4 | import { UserRight } from '@shared/models' | 4 | import { UserRight } from '@peertube/peertube-models' |
5 | 5 | ||
6 | export const ConfigRoutes: Routes = [ | 6 | export const ConfigRoutes: Routes = [ |
7 | { | 7 | { |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts index 2122e67b2..953c7d540 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts | |||
@@ -3,7 +3,7 @@ import { SelectOptionsItem } from 'src/types/select-options-item.model' | |||
3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { MenuService, ThemeService } from '@app/core' | 5 | import { MenuService, ThemeService } from '@app/core' |
6 | import { HTMLServerConfig } from '@shared/models' | 6 | import { HTMLServerConfig } from '@peertube/peertube-models' |
7 | import { ConfigService } from '../shared/config.service' | 7 | import { ConfigService } from '../shared/config.service' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index c3b85b196..54c076b74 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | |||
@@ -27,7 +27,7 @@ import { | |||
27 | import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators' | 27 | import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators' |
28 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 28 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
29 | import { CustomPageService } from '@app/shared/shared-main/custom-page' | 29 | import { CustomPageService } from '@app/shared/shared-main/custom-page' |
30 | import { CustomConfig, CustomPage, HTMLServerConfig } from '@shared/models' | 30 | import { CustomConfig, CustomPage, HTMLServerConfig } from '@peertube/peertube-models' |
31 | import { EditConfigurationService } from './edit-configuration.service' | 31 | import { EditConfigurationService } from './edit-configuration.service' |
32 | 32 | ||
33 | type ComponentCustomConfig = CustomConfig & { | 33 | type ComponentCustomConfig = CustomConfig & { |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts index 1d1fecf90..59629aa20 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | 2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' |
3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { HTMLServerConfig } from '@shared/models' | 5 | import { HTMLServerConfig } from '@peertube/peertube-models' |
6 | import { ConfigService } from '../shared/config.service' | 6 | import { ConfigService } from '../shared/config.service' |
7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' | 7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' |
8 | 8 | ||
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts index 6496e8753..a2cd04396 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | 2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' |
3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { HTMLServerConfig } from '@shared/models' | 5 | import { HTMLServerConfig } from '@peertube/peertube-models' |
6 | import { ConfigService } from '../shared/config.service' | 6 | import { ConfigService } from '../shared/config.service' |
7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' | 7 | import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' |
8 | 8 | ||
diff --git a/client/src/app/+admin/config/shared/config.service.ts b/client/src/app/+admin/config/shared/config.service.ts index 80f495b41..3c3894945 100644 --- a/client/src/app/+admin/config/shared/config.service.ts +++ b/client/src/app/+admin/config/shared/config.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { RestExtractor } from '@app/core' | 4 | import { RestExtractor } from '@app/core' |
5 | import { CustomConfig } from '@shared/models' | 5 | import { CustomConfig } from '@peertube/peertube-models' |
6 | import { SelectOptionsItem } from '../../../../types/select-options-item.model' | 6 | import { SelectOptionsItem } from '../../../../types/select-options-item.model' |
7 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
8 | 8 | ||
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts index 618892242..656a7bf87 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts | |||
@@ -5,7 +5,7 @@ import { formatICU } from '@app/helpers' | |||
5 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 5 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
6 | import { InstanceFollowService } from '@app/shared/shared-instance' | 6 | import { InstanceFollowService } from '@app/shared/shared-instance' |
7 | import { DropdownAction } from '@app/shared/shared-main' | 7 | import { DropdownAction } from '@app/shared/shared-main' |
8 | import { ActorFollow } from '@shared/models' | 8 | import { ActorFollow } from '@peertube/peertube-models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-followers-list', | 11 | selector: 'my-followers-list', |
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts index 6c8723c16..da6647f6b 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.ts +++ b/client/src/app/+admin/follows/following-list/following-list.component.ts | |||
@@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core' | |||
3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 4 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
5 | import { InstanceFollowService } from '@app/shared/shared-instance' | 5 | import { InstanceFollowService } from '@app/shared/shared-instance' |
6 | import { ActorFollow } from '@shared/models' | 6 | import { ActorFollow } from '@peertube/peertube-models' |
7 | import { FollowModalComponent } from './follow-modal.component' | 7 | import { FollowModalComponent } from './follow-modal.component' |
8 | import { DropdownAction } from '@app/shared/shared-main' | 8 | import { DropdownAction } from '@app/shared/shared-main' |
9 | import { formatICU } from '@app/helpers' | 9 | import { formatICU } from '@app/helpers' |
diff --git a/client/src/app/+admin/follows/follows.routes.ts b/client/src/app/+admin/follows/follows.routes.ts index 718493dc7..e187f83ea 100644 --- a/client/src/app/+admin/follows/follows.routes.ts +++ b/client/src/app/+admin/follows/follows.routes.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list' | 2 | import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list' |
3 | import { UserRightGuard } from '@app/core' | 3 | import { UserRightGuard } from '@app/core' |
4 | import { UserRight } from '@shared/models' | 4 | import { UserRight } from '@peertube/peertube-models' |
5 | import { FollowersListComponent } from './followers-list' | 5 | import { FollowersListComponent } from './followers-list' |
6 | import { FollowingListComponent } from './following-list/following-list.component' | 6 | import { FollowingListComponent } from './following-list/following-list.component' |
7 | 7 | ||
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts index efcefd509..09fc038ce 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts | |||
@@ -3,9 +3,8 @@ import { SortMeta } from 'primeng/api' | |||
3 | import { Component, OnInit } from '@angular/core' | 3 | import { Component, OnInit } from '@angular/core' |
4 | import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | 4 | import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' |
5 | import { BytesPipe, RedundancyService } from '@app/shared/shared-main' | 5 | import { BytesPipe, RedundancyService } from '@app/shared/shared-main' |
6 | import { VideoRedundanciesTarget, VideoRedundancy, VideosRedundancyStats } from '@peertube/peertube-models' | ||
6 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 7 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
7 | import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' | ||
8 | import { VideosRedundancyStats } from '@shared/models/server' | ||
9 | 8 | ||
10 | @Component({ | 9 | @Component({ |
11 | selector: 'my-video-redundancies-list', | 10 | selector: 'my-video-redundancies-list', |
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts index 6f3090c08..779d19059 100644 --- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts +++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { FileRedundancyInformation, StreamingPlaylistRedundancyInformation } from '@shared/models' | 2 | import { FileRedundancyInformation, StreamingPlaylistRedundancyInformation } from '@peertube/peertube-models' |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-video-redundancy-information', | 5 | selector: 'my-video-redundancy-information', |
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts index 378d2bed7..f0494de7b 100644 --- a/client/src/app/+admin/moderation/moderation.routes.ts +++ b/client/src/app/+admin/moderation/moderation.routes.ts | |||
@@ -3,7 +3,7 @@ import { AbuseListComponent } from '@app/+admin/moderation/abuse-list' | |||
3 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' | 3 | import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' |
4 | import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' | 4 | import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' |
5 | import { UserRightGuard } from '@app/core' | 5 | import { UserRightGuard } from '@app/core' |
6 | import { UserRight } from '@shared/models' | 6 | import { UserRight } from '@peertube/peertube-models' |
7 | import { RegistrationListComponent } from './registration-list' | 7 | import { RegistrationListComponent } from './registration-list' |
8 | 8 | ||
9 | export const ModerationRoutes: Routes = [ | 9 | export const ModerationRoutes: Routes = [ |
diff --git a/client/src/app/+admin/moderation/registration-list/admin-registration.service.ts b/client/src/app/+admin/moderation/registration-list/admin-registration.service.ts index a9f13cf2f..f8ab04c71 100644 --- a/client/src/app/+admin/moderation/registration-list/admin-registration.service.ts +++ b/client/src/app/+admin/moderation/registration-list/admin-registration.service.ts | |||
@@ -4,8 +4,8 @@ import { catchError, concatMap, toArray } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { arrayify } from '@shared/core-utils' | 7 | import { arrayify } from '@peertube/peertube-core-utils' |
8 | import { ResultList, UserRegistration, UserRegistrationUpdateState } from '@shared/models' | 8 | import { ResultList, UserRegistration, UserRegistrationUpdateState } from '@peertube/peertube-models' |
9 | import { environment } from '../../../../environments/environment' | 9 | import { environment } from '../../../../environments/environment' |
10 | 10 | ||
11 | @Injectable() | 11 | @Injectable() |
diff --git a/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts b/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts index 8f013cbd5..f8e346f50 100644 --- a/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts +++ b/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts | |||
@@ -3,7 +3,7 @@ import { Notifier, ServerService } from '@app/core' | |||
3 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
6 | import { UserRegistration } from '@shared/models' | 6 | import { UserRegistration } from '@peertube/peertube-models' |
7 | import { AdminRegistrationService } from './admin-registration.service' | 7 | import { AdminRegistrationService } from './admin-registration.service' |
8 | import { REGISTRATION_MODERATION_RESPONSE_VALIDATOR } from './process-registration-validators' | 8 | import { REGISTRATION_MODERATION_RESPONSE_VALIDATOR } from './process-registration-validators' |
9 | 9 | ||
diff --git a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts index 35d9d13d7..1dc5e9077 100644 --- a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts +++ b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts | |||
@@ -5,7 +5,7 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, S | |||
5 | import { formatICU } from '@app/helpers' | 5 | import { formatICU } from '@app/helpers' |
6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
7 | import { DropdownAction } from '@app/shared/shared-main' | 7 | import { DropdownAction } from '@app/shared/shared-main' |
8 | import { UserRegistration, UserRegistrationState } from '@shared/models' | 8 | import { UserRegistration, UserRegistrationState } from '@peertube/peertube-models' |
9 | import { AdminRegistrationService } from './admin-registration.service' | 9 | import { AdminRegistrationService } from './admin-registration.service' |
10 | import { ProcessRegistrationModalComponent } from './process-registration-modal.component' | 10 | import { ProcessRegistrationModalComponent } from './process-registration-modal.component' |
11 | 11 | ||
diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts index f365a2500..3c6bda16c 100644 --- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts +++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts | |||
@@ -7,9 +7,9 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, S | |||
7 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 7 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
8 | import { DropdownAction, VideoService } from '@app/shared/shared-main' | 8 | import { DropdownAction, VideoService } from '@app/shared/shared-main' |
9 | import { VideoBlockService } from '@app/shared/shared-moderation' | 9 | import { VideoBlockService } from '@app/shared/shared-moderation' |
10 | import { buildVideoEmbedLink, decorateVideoLink } from '@peertube/peertube-core-utils' | ||
11 | import { VideoBlacklist, VideoBlacklistType, VideoBlacklistType_Type } from '@peertube/peertube-models' | ||
10 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' | 12 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' |
11 | import { buildVideoEmbedLink, decorateVideoLink } from '@shared/core-utils' | ||
12 | import { VideoBlacklist, VideoBlacklistType } from '@shared/models' | ||
13 | 13 | ||
14 | @Component({ | 14 | @Component({ |
15 | selector: 'my-video-block-list', | 15 | selector: 'my-video-block-list', |
@@ -21,7 +21,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit { | |||
21 | totalRecords = 0 | 21 | totalRecords = 0 |
22 | sort: SortMeta = { field: 'createdAt', order: -1 } | 22 | sort: SortMeta = { field: 'createdAt', order: -1 } |
23 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } | 23 | pagination: RestPagination = { count: this.rowsPerPage, start: 0 } |
24 | blocklistTypeFilter: VideoBlacklistType = undefined | 24 | blocklistTypeFilter: VideoBlacklistType_Type |
25 | 25 | ||
26 | videoBlocklistActions: DropdownAction<VideoBlacklist>[][] = [] | 26 | videoBlocklistActions: DropdownAction<VideoBlacklist>[][] = [] |
27 | 27 | ||
diff --git a/client/src/app/+admin/overview/comments/video-comment-list.component.ts b/client/src/app/+admin/overview/comments/video-comment-list.component.ts index b77072665..254e76a60 100644 --- a/client/src/app/+admin/overview/comments/video-comment-list.component.ts +++ b/client/src/app/+admin/overview/comments/video-comment-list.component.ts | |||
@@ -6,7 +6,7 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms' | |||
6 | import { DropdownAction } from '@app/shared/shared-main' | 6 | import { DropdownAction } from '@app/shared/shared-main' |
7 | import { BulkService } from '@app/shared/shared-moderation' | 7 | import { BulkService } from '@app/shared/shared-moderation' |
8 | import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' | 8 | import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' |
9 | import { FeedFormat, UserRight } from '@shared/models' | 9 | import { FeedFormat, UserRight } from '@peertube/peertube-models' |
10 | import { formatICU } from '@app/helpers' | 10 | import { formatICU } from '@app/helpers' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
diff --git a/client/src/app/+admin/overview/comments/video-comment.routes.ts b/client/src/app/+admin/overview/comments/video-comment.routes.ts index f0bd440ad..f67027430 100644 --- a/client/src/app/+admin/overview/comments/video-comment.routes.ts +++ b/client/src/app/+admin/overview/comments/video-comment.routes.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { UserRightGuard } from '@app/core' | 2 | import { UserRightGuard } from '@app/core' |
3 | import { UserRight } from '@shared/models' | 3 | import { UserRight } from '@peertube/peertube-models' |
4 | import { VideoCommentListComponent } from './video-comment-list.component' | 4 | import { VideoCommentListComponent } from './video-comment-list.component' |
5 | 5 | ||
6 | export const commentRoutes: Routes = [ | 6 | export const commentRoutes: Routes = [ |
diff --git a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts index 0627aa887..77acb9988 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts | |||
@@ -14,7 +14,7 @@ import { | |||
14 | } from '@app/shared/form-validators/user-validators' | 14 | } from '@app/shared/form-validators/user-validators' |
15 | import { FormReactiveService } from '@app/shared/shared-forms' | 15 | import { FormReactiveService } from '@app/shared/shared-forms' |
16 | import { UserAdminService } from '@app/shared/shared-users' | 16 | import { UserAdminService } from '@app/shared/shared-users' |
17 | import { UserCreate, UserRole } from '@shared/models' | 17 | import { UserCreate, UserRole } from '@peertube/peertube-models' |
18 | import { UserEdit } from './user-edit' | 18 | import { UserEdit } from './user-edit' |
19 | 19 | ||
20 | @Component({ | 20 | @Component({ |
diff --git a/client/src/app/+admin/overview/users/user-edit/user-edit.ts b/client/src/app/+admin/overview/users/user-edit/user-edit.ts index 9547da2d1..d61b7b068 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-edit.ts | |||
@@ -2,9 +2,8 @@ import { Directive, OnInit } from '@angular/core' | |||
2 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 2 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
3 | import { AuthService, ScreenService, ServerService, User } from '@app/core' | 3 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
4 | import { FormReactive } from '@app/shared/shared-forms' | 4 | import { FormReactive } from '@app/shared/shared-forms' |
5 | import { peertubeTranslate } from '@shared/core-utils' | 5 | import { peertubeTranslate, USER_ROLE_LABELS } from '@peertube/peertube-core-utils' |
6 | import { USER_ROLE_LABELS } from '@shared/core-utils/users' | 6 | import { HTMLServerConfig, UserAdminFlag, UserRole } from '@peertube/peertube-models' |
7 | import { HTMLServerConfig, UserAdminFlag, UserRole } from '@shared/models' | ||
8 | import { SelectOptionsItem } from '../../../../../types/select-options-item.model' | 7 | import { SelectOptionsItem } from '../../../../../types/select-options-item.model' |
9 | 8 | ||
10 | @Directive() | 9 | @Directive() |
diff --git a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts index ec93619f5..af39c82af 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts | |||
@@ -3,7 +3,7 @@ import { Notifier } from '@app/core' | |||
3 | import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' | 3 | import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' |
4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
5 | import { UserAdminService } from '@app/shared/shared-users' | 5 | import { UserAdminService } from '@app/shared/shared-users' |
6 | import { UserUpdate } from '@shared/models' | 6 | import { UserUpdate } from '@peertube/peertube-models' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
9 | selector: 'my-user-password', | 9 | selector: 'my-user-password', |
diff --git a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts index 25d02f000..b55a519f3 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | } from '@app/shared/form-validators/user-validators' | 11 | } from '@app/shared/form-validators/user-validators' |
12 | import { FormReactiveService } from '@app/shared/shared-forms' | 12 | import { FormReactiveService } from '@app/shared/shared-forms' |
13 | import { TwoFactorService, UserAdminService } from '@app/shared/shared-users' | 13 | import { TwoFactorService, UserAdminService } from '@app/shared/shared-users' |
14 | import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models' | 14 | import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@peertube/peertube-models' |
15 | import { UserEdit } from './user-edit' | 15 | import { UserEdit } from './user-edit' |
16 | 16 | ||
17 | @Component({ | 17 | @Component({ |
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.ts b/client/src/app/+admin/overview/users/user-list/user-list.component.ts index 5d5abf6f4..a5a1552da 100644 --- a/client/src/app/+admin/overview/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.ts | |||
@@ -7,8 +7,8 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms' | |||
7 | import { Actor, DropdownAction } from '@app/shared/shared-main' | 7 | import { Actor, DropdownAction } from '@app/shared/shared-main' |
8 | import { AccountMutedStatus, BlocklistService, UserBanModalComponent, UserModerationDisplayType } from '@app/shared/shared-moderation' | 8 | import { AccountMutedStatus, BlocklistService, UserBanModalComponent, UserModerationDisplayType } from '@app/shared/shared-moderation' |
9 | import { UserAdminService } from '@app/shared/shared-users' | 9 | import { UserAdminService } from '@app/shared/shared-users' |
10 | import { User, UserRole, UserRoleType } from '@peertube/peertube-models' | ||
10 | import { logger } from '@root-helpers/logger' | 11 | import { logger } from '@root-helpers/logger' |
11 | import { User, UserRole } from '@shared/models' | ||
12 | 12 | ||
13 | type UserForList = User & { | 13 | type UserForList = User & { |
14 | rawVideoQuota: number | 14 | rawVideoQuota: number |
@@ -166,7 +166,7 @@ export class UserListComponent extends RestTable <User> implements OnInit { | |||
166 | return 'UserListComponent' | 166 | return 'UserListComponent' |
167 | } | 167 | } |
168 | 168 | ||
169 | getRoleClass (role: UserRole) { | 169 | getRoleClass (role: UserRoleType) { |
170 | switch (role) { | 170 | switch (role) { |
171 | case UserRole.ADMINISTRATOR: | 171 | case UserRole.ADMINISTRATOR: |
172 | return 'badge-purple' | 172 | return 'badge-purple' |
diff --git a/client/src/app/+admin/overview/users/users.routes.ts b/client/src/app/+admin/overview/users/users.routes.ts index c9724e5fb..d66b8c762 100644 --- a/client/src/app/+admin/overview/users/users.routes.ts +++ b/client/src/app/+admin/overview/users/users.routes.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { UserRightGuard } from '@app/core' | 2 | import { UserRightGuard } from '@app/core' |
3 | import { UserRight } from '@shared/models' | 3 | import { UserRight } from '@peertube/peertube-models' |
4 | import { UserCreateComponent, UserUpdateComponent } from './user-edit' | 4 | import { UserCreateComponent, UserUpdateComponent } from './user-edit' |
5 | import { UserListComponent } from './user-list' | 5 | import { UserListComponent } from './user-list' |
6 | 6 | ||
diff --git a/client/src/app/+admin/overview/videos/video-admin.service.ts b/client/src/app/+admin/overview/videos/video-admin.service.ts index 722495706..9b33ed8e5 100644 --- a/client/src/app/+admin/overview/videos/video-admin.service.ts +++ b/client/src/app/+admin/overview/videos/video-admin.service.ts | |||
@@ -5,8 +5,8 @@ import { Injectable } from '@angular/core' | |||
5 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 5 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
7 | import { CommonVideoParams, Video, VideoService } from '@app/shared/shared-main' | 7 | import { CommonVideoParams, Video, VideoService } from '@app/shared/shared-main' |
8 | import { ResultList, VideoInclude, VideoPrivacy } from '@shared/models' | 8 | import { ResultList, VideoInclude, VideoPrivacy } from '@peertube/peertube-models' |
9 | import { getAllPrivacies } from '@shared/core-utils' | 9 | import { getAllPrivacies } from '@peertube/peertube-core-utils' |
10 | 10 | ||
11 | @Injectable() | 11 | @Injectable() |
12 | export class VideoAdminService { | 12 | export class VideoAdminService { |
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts index 2792a2d8a..2e12a2b31 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.ts +++ b/client/src/app/+admin/overview/videos/video-list.component.ts | |||
@@ -8,8 +8,8 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms' | |||
8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
9 | import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' | 9 | import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' |
10 | import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' | 10 | import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' |
11 | import { getAllFiles } from '@shared/core-utils' | 11 | import { getAllFiles } from '@peertube/peertube-core-utils' |
12 | import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models' | 12 | import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@peertube/peertube-models' |
13 | import { VideoAdminService } from './video-admin.service' | 13 | import { VideoAdminService } from './video-admin.service' |
14 | 14 | ||
15 | @Component({ | 15 | @Component({ |
diff --git a/client/src/app/+admin/overview/videos/video.routes.ts b/client/src/app/+admin/overview/videos/video.routes.ts index 01cb5b497..dfffd2696 100644 --- a/client/src/app/+admin/overview/videos/video.routes.ts +++ b/client/src/app/+admin/overview/videos/video.routes.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { UserRightGuard } from '@app/core' | 2 | import { UserRightGuard } from '@app/core' |
3 | import { UserRight } from '@shared/models' | 3 | import { UserRight } from '@peertube/peertube-models' |
4 | import { VideoListComponent } from './video-list.component' | 4 | import { VideoListComponent } from './video-list.component' |
5 | 5 | ||
6 | export const videosRoutes: Routes = [ | 6 | export const videosRoutes: Routes = [ |
diff --git a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts index 3fa1c56dc..1b78a00cd 100644 --- a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts | |||
@@ -4,8 +4,8 @@ import { ActivatedRoute, Router } from '@angular/router' | |||
4 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | 4 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' |
5 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier } from '@app/core' | 5 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier } from '@app/core' |
6 | import { PluginService } from '@app/core/plugins/plugin.service' | 6 | import { PluginService } from '@app/core/plugins/plugin.service' |
7 | import { compareSemVer } from '@shared/core-utils' | 7 | import { compareSemVer } from '@peertube/peertube-core-utils' |
8 | import { PeerTubePlugin, PluginType } from '@shared/models' | 8 | import { PeerTubePlugin, PluginType, PluginType_Type } from '@peertube/peertube-models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-plugin-list-installed', | 11 | selector: 'my-plugin-list-installed', |
@@ -13,7 +13,7 @@ import { PeerTubePlugin, PluginType } from '@shared/models' | |||
13 | styleUrls: [ './plugin-list-installed.component.scss' ] | 13 | styleUrls: [ './plugin-list-installed.component.scss' ] |
14 | }) | 14 | }) |
15 | export class PluginListInstalledComponent implements OnInit { | 15 | export class PluginListInstalledComponent implements OnInit { |
16 | pluginType: PluginType | 16 | pluginType: PluginType_Type |
17 | 17 | ||
18 | pagination: ComponentPagination = { | 18 | pagination: ComponentPagination = { |
19 | currentPage: 1, | 19 | currentPage: 1, |
@@ -48,7 +48,7 @@ export class PluginListInstalledComponent implements OnInit { | |||
48 | this.route.queryParams.subscribe(query => { | 48 | this.route.queryParams.subscribe(query => { |
49 | if (!query['pluginType']) return | 49 | if (!query['pluginType']) return |
50 | 50 | ||
51 | this.pluginType = parseInt(query['pluginType'], 10) | 51 | this.pluginType = parseInt(query['pluginType'], 10) as PluginType_Type |
52 | 52 | ||
53 | this.reloadPlugins() | 53 | this.reloadPlugins() |
54 | }) | 54 | }) |
diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts index c03e37aa5..5539d1c13 100644 --- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts +++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts | |||
@@ -4,8 +4,8 @@ import { Component, OnInit } from '@angular/core' | |||
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' | 5 | import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' |
6 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier, PluginService } from '@app/core' | 6 | import { ComponentPagination, ConfirmService, hasMoreItems, Notifier, PluginService } from '@app/core' |
7 | import { PeerTubePluginIndex, PluginType, PluginType_Type } from '@peertube/peertube-models' | ||
7 | import { logger } from '@root-helpers/logger' | 8 | import { logger } from '@root-helpers/logger' |
8 | import { PeerTubePluginIndex, PluginType } from '@shared/models' | ||
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-plugin-search', | 11 | selector: 'my-plugin-search', |
@@ -13,7 +13,7 @@ import { PeerTubePluginIndex, PluginType } from '@shared/models' | |||
13 | styleUrls: [ './plugin-search.component.scss' ] | 13 | styleUrls: [ './plugin-search.component.scss' ] |
14 | }) | 14 | }) |
15 | export class PluginSearchComponent implements OnInit { | 15 | export class PluginSearchComponent implements OnInit { |
16 | pluginType: PluginType | 16 | pluginType: PluginType_Type |
17 | 17 | ||
18 | pagination: ComponentPagination = { | 18 | pagination: ComponentPagination = { |
19 | currentPage: 1, | 19 | currentPage: 1, |
@@ -53,7 +53,7 @@ export class PluginSearchComponent implements OnInit { | |||
53 | this.route.queryParams.subscribe(query => { | 53 | this.route.queryParams.subscribe(query => { |
54 | if (!query['pluginType']) return | 54 | if (!query['pluginType']) return |
55 | 55 | ||
56 | this.pluginType = parseInt(query['pluginType'], 10) | 56 | this.pluginType = parseInt(query['pluginType'], 10) as PluginType_Type |
57 | this.search = query['search'] || '' | 57 | this.search = query['search'] || '' |
58 | 58 | ||
59 | this.reloadPlugins() | 59 | this.reloadPlugins() |
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts index b1a41567e..9eee1a901 100644 --- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts | |||
@@ -5,7 +5,7 @@ import { ActivatedRoute } from '@angular/router' | |||
5 | import { HooksService, Notifier, PluginService } from '@app/core' | 5 | import { HooksService, Notifier, PluginService } from '@app/core' |
6 | import { BuildFormArgument } from '@app/shared/form-validators' | 6 | import { BuildFormArgument } from '@app/shared/form-validators' |
7 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 7 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
8 | import { PeerTubePlugin, RegisterServerSettingOptions } from '@shared/models' | 8 | import { PeerTubePlugin, RegisterServerSettingOptions } from '@peertube/peertube-models' |
9 | import { PluginApiService } from '../shared/plugin-api.service' | 9 | import { PluginApiService } from '../shared/plugin-api.service' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
diff --git a/client/src/app/+admin/plugins/plugins.routes.ts b/client/src/app/+admin/plugins/plugins.routes.ts index f735a490b..40660f1f4 100644 --- a/client/src/app/+admin/plugins/plugins.routes.ts +++ b/client/src/app/+admin/plugins/plugins.routes.ts | |||
@@ -3,7 +3,7 @@ import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-in | |||
3 | import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component' | 3 | import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component' |
4 | import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component' | 4 | import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component' |
5 | import { UserRightGuard } from '@app/core' | 5 | import { UserRightGuard } from '@app/core' |
6 | import { UserRight } from '@shared/models' | 6 | import { UserRight } from '@peertube/peertube-models' |
7 | 7 | ||
8 | export const PluginsRoutes: Routes = [ | 8 | export const PluginsRoutes: Routes = [ |
9 | { | 9 | { |
diff --git a/client/src/app/+admin/plugins/shared/plugin-api.service.ts b/client/src/app/+admin/plugins/shared/plugin-api.service.ts index fbfdaea18..e1bd2f125 100644 --- a/client/src/app/+admin/plugins/shared/plugin-api.service.ts +++ b/client/src/app/+admin/plugins/shared/plugin-api.service.ts | |||
@@ -9,9 +9,10 @@ import { | |||
9 | PeerTubePlugin, | 9 | PeerTubePlugin, |
10 | PeerTubePluginIndex, | 10 | PeerTubePluginIndex, |
11 | PluginType, | 11 | PluginType, |
12 | PluginType_Type, | ||
12 | RegisteredServerSettings, | 13 | RegisteredServerSettings, |
13 | ResultList | 14 | ResultList |
14 | } from '@shared/models' | 15 | } from '@peertube/peertube-models' |
15 | import { environment } from '../../../../environments/environment' | 16 | import { environment } from '../../../../environments/environment' |
16 | 17 | ||
17 | @Injectable() | 18 | @Injectable() |
@@ -25,7 +26,7 @@ export class PluginApiService { | |||
25 | private pluginService: PluginService | 26 | private pluginService: PluginService |
26 | ) { } | 27 | ) { } |
27 | 28 | ||
28 | getPluginTypeLabel (type: PluginType) { | 29 | getPluginTypeLabel (type: PluginType_Type) { |
29 | if (type === PluginType.PLUGIN) { | 30 | if (type === PluginType.PLUGIN) { |
30 | return $localize`plugin` | 31 | return $localize`plugin` |
31 | } | 32 | } |
@@ -34,7 +35,7 @@ export class PluginApiService { | |||
34 | } | 35 | } |
35 | 36 | ||
36 | getPlugins ( | 37 | getPlugins ( |
37 | pluginType: PluginType, | 38 | pluginType: PluginType_Type, |
38 | componentPagination: ComponentPagination, | 39 | componentPagination: ComponentPagination, |
39 | sort: string | 40 | sort: string |
40 | ) { | 41 | ) { |
@@ -49,7 +50,7 @@ export class PluginApiService { | |||
49 | } | 50 | } |
50 | 51 | ||
51 | searchAvailablePlugins ( | 52 | searchAvailablePlugins ( |
52 | pluginType: PluginType, | 53 | pluginType: PluginType_Type, |
53 | componentPagination: ComponentPagination, | 54 | componentPagination: ComponentPagination, |
54 | sort: string, | 55 | sort: string, |
55 | search?: string | 56 | search?: string |
@@ -73,7 +74,7 @@ export class PluginApiService { | |||
73 | .pipe(catchError(res => this.restExtractor.handleError(res))) | 74 | .pipe(catchError(res => this.restExtractor.handleError(res))) |
74 | } | 75 | } |
75 | 76 | ||
76 | getPluginRegisteredSettings (pluginName: string, pluginType: PluginType) { | 77 | getPluginRegisteredSettings (pluginName: string, pluginType: PluginType_Type) { |
77 | const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) | 78 | const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) |
78 | const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/registered-settings' | 79 | const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/registered-settings' |
79 | 80 | ||
@@ -83,7 +84,7 @@ export class PluginApiService { | |||
83 | ) | 84 | ) |
84 | } | 85 | } |
85 | 86 | ||
86 | updatePluginSettings (pluginName: string, pluginType: PluginType, settings: any) { | 87 | updatePluginSettings (pluginName: string, pluginType: PluginType_Type, settings: any) { |
87 | const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) | 88 | const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) |
88 | const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/settings' | 89 | const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/settings' |
89 | 90 | ||
@@ -91,7 +92,7 @@ export class PluginApiService { | |||
91 | .pipe(catchError(res => this.restExtractor.handleError(res))) | 92 | .pipe(catchError(res => this.restExtractor.handleError(res))) |
92 | } | 93 | } |
93 | 94 | ||
94 | uninstall (pluginName: string, pluginType: PluginType) { | 95 | uninstall (pluginName: string, pluginType: PluginType_Type) { |
95 | const body: ManagePlugin = { | 96 | const body: ManagePlugin = { |
96 | npmName: this.pluginService.nameToNpmName(pluginName, pluginType) | 97 | npmName: this.pluginService.nameToNpmName(pluginName, pluginType) |
97 | } | 98 | } |
@@ -100,7 +101,7 @@ export class PluginApiService { | |||
100 | .pipe(catchError(res => this.restExtractor.handleError(res))) | 101 | .pipe(catchError(res => this.restExtractor.handleError(res))) |
101 | } | 102 | } |
102 | 103 | ||
103 | update (pluginName: string, pluginType: PluginType) { | 104 | update (pluginName: string, pluginType: PluginType_Type) { |
104 | const body: ManagePlugin = { | 105 | const body: ManagePlugin = { |
105 | npmName: this.pluginService.nameToNpmName(pluginName, pluginType) | 106 | npmName: this.pluginService.nameToNpmName(pluginName, pluginType) |
106 | } | 107 | } |
@@ -118,7 +119,7 @@ export class PluginApiService { | |||
118 | .pipe(catchError(res => this.restExtractor.handleError(res))) | 119 | .pipe(catchError(res => this.restExtractor.handleError(res))) |
119 | } | 120 | } |
120 | 121 | ||
121 | getPluginOrThemeHref (type: PluginType, name: string) { | 122 | getPluginOrThemeHref (type: PluginType_Type, name: string) { |
122 | const typeString = type === PluginType.PLUGIN | 123 | const typeString = type === PluginType.PLUGIN |
123 | ? 'plugin' | 124 | ? 'plugin' |
124 | : 'theme' | 125 | : 'theme' |
diff --git a/client/src/app/+admin/plugins/shared/plugin-card.component.ts b/client/src/app/+admin/plugins/shared/plugin-card.component.ts index 462a6c213..ae91f6887 100644 --- a/client/src/app/+admin/plugins/shared/plugin-card.component.ts +++ b/client/src/app/+admin/plugins/shared/plugin-card.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { PeerTubePlugin, PeerTubePluginIndex, PluginType } from '@shared/models' | 2 | import { PeerTubePlugin, PeerTubePluginIndex, PluginType_Type } from '@peertube/peertube-models' |
3 | import { PluginApiService } from './plugin-api.service' | 3 | import { PluginApiService } from './plugin-api.service' |
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
@@ -11,7 +11,7 @@ import { PluginApiService } from './plugin-api.service' | |||
11 | export class PluginCardComponent { | 11 | export class PluginCardComponent { |
12 | @Input() plugin: PeerTubePluginIndex | PeerTubePlugin | 12 | @Input() plugin: PeerTubePluginIndex | PeerTubePlugin |
13 | @Input() version: string | 13 | @Input() version: string |
14 | @Input() pluginType: PluginType | 14 | @Input() pluginType: PluginType_Type |
15 | 15 | ||
16 | constructor ( | 16 | constructor ( |
17 | private pluginApiService: PluginApiService | 17 | private pluginApiService: PluginApiService |
diff --git a/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts b/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts index 1c963f521..c829bc975 100644 --- a/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts +++ b/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { PluginType } from '@shared/models/plugins' | 2 | import { PluginType_Type } from '@peertube/peertube-models' |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-plugin-navigation', | 5 | selector: 'my-plugin-navigation', |
@@ -7,5 +7,5 @@ import { PluginType } from '@shared/models/plugins' | |||
7 | styleUrls: [ './plugin-navigation.component.scss' ] | 7 | styleUrls: [ './plugin-navigation.component.scss' ] |
8 | }) | 8 | }) |
9 | export class PluginNavigationComponent { | 9 | export class PluginNavigationComponent { |
10 | @Input() pluginType: PluginType | 10 | @Input() pluginType: PluginType_Type |
11 | } | 11 | } |
diff --git a/client/src/app/+admin/shared/user-email-info.component.ts b/client/src/app/+admin/shared/user-email-info.component.ts index e33948b60..0af905c84 100644 --- a/client/src/app/+admin/shared/user-email-info.component.ts +++ b/client/src/app/+admin/shared/user-email-info.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { User, UserRegistration } from '@shared/models/users' | 2 | import { User, UserRegistration } from '@peertube/peertube-models' |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-user-email-info', | 5 | selector: 'my-user-email-info', |
diff --git a/client/src/app/+admin/shared/user-real-quota-info.component.ts b/client/src/app/+admin/shared/user-real-quota-info.component.ts index 0a342c799..dd78fa9f0 100644 --- a/client/src/app/+admin/shared/user-real-quota-info.component.ts +++ b/client/src/app/+admin/shared/user-real-quota-info.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, Input, OnInit } from '@angular/core' |
2 | import { ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { HTMLServerConfig, VideoResolution } from '@shared/models/index' | 3 | import { HTMLServerConfig, VideoResolution } from '@peertube/peertube-models' |
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
6 | selector: 'my-user-real-quota-info', | 6 | selector: 'my-user-real-quota-info', |
diff --git a/client/src/app/+admin/system/debug/debug.component.ts b/client/src/app/+admin/system/debug/debug.component.ts index 1f4e71e8a..5c86803ef 100644 --- a/client/src/app/+admin/system/debug/debug.component.ts +++ b/client/src/app/+admin/system/debug/debug.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { Debug } from '@shared/models' | 3 | import { Debug } from '@peertube/peertube-models' |
4 | import { DebugService } from './debug.service' | 4 | import { DebugService } from './debug.service' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
diff --git a/client/src/app/+admin/system/debug/debug.service.ts b/client/src/app/+admin/system/debug/debug.service.ts index ab1d0a7fa..24d3b2ab8 100644 --- a/client/src/app/+admin/system/debug/debug.service.ts +++ b/client/src/app/+admin/system/debug/debug.service.ts | |||
@@ -3,7 +3,7 @@ import { catchError } from 'rxjs/operators' | |||
3 | import { HttpClient } from '@angular/common/http' | 3 | import { HttpClient } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { RestExtractor } from '@app/core' | 5 | import { RestExtractor } from '@app/core' |
6 | import { Debug } from '@shared/models' | 6 | import { Debug } from '@peertube/peertube-models' |
7 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
diff --git a/client/src/app/+admin/system/jobs/job.service.ts b/client/src/app/+admin/system/jobs/job.service.ts index 031e2bad8..eae1dea7d 100644 --- a/client/src/app/+admin/system/jobs/job.service.ts +++ b/client/src/app/+admin/system/jobs/job.service.ts | |||
@@ -4,7 +4,7 @@ import { catchError, map } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { Job, ResultList } from '@shared/models' | 7 | import { Job, ResultList } from '@peertube/peertube-models' |
8 | import { environment } from '../../../../environments/environment' | 8 | import { environment } from '../../../../environments/environment' |
9 | import { JobStateClient } from '../../../../types/job-state-client.type' | 9 | import { JobStateClient } from '../../../../types/job-state-client.type' |
10 | import { JobTypeClient } from '../../../../types/job-type-client.type' | 10 | import { JobTypeClient } from '../../../../types/job-type-client.type' |
diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts index 6e10c81ff..4e6b4bf7b 100644 --- a/client/src/app/+admin/system/jobs/jobs.component.ts +++ b/client/src/app/+admin/system/jobs/jobs.component.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { escapeHTML } from '@peertube/peertube-core-utils' | ||
5 | import { Job, JobState, JobType } from '@peertube/peertube-models' | ||
4 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 6 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
5 | import { escapeHTML } from '@shared/core-utils/renderer' | ||
6 | import { Job, JobState, JobType } from '@shared/models' | ||
7 | import { JobStateClient } from '../../../../types/job-state-client.type' | 7 | import { JobStateClient } from '../../../../types/job-state-client.type' |
8 | import { JobTypeClient } from '../../../../types/job-type-client.type' | 8 | import { JobTypeClient } from '../../../../types/job-type-client.type' |
9 | import { JobService } from './job.service' | 9 | import { JobService } from './job.service' |
diff --git a/client/src/app/+admin/system/logs/log-row.model.ts b/client/src/app/+admin/system/logs/log-row.model.ts index e83c7b064..15799e8b0 100644 --- a/client/src/app/+admin/system/logs/log-row.model.ts +++ b/client/src/app/+admin/system/logs/log-row.model.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import omit from 'lodash-es/omit' | 1 | import omit from 'lodash-es/omit' |
2 | import { logger } from '@root-helpers/logger' | 2 | import { logger } from '@root-helpers/logger' |
3 | import { ServerLogLevel } from '@shared/models' | 3 | import { ServerLogLevel } from '@peertube/peertube-models' |
4 | 4 | ||
5 | export class LogRow { | 5 | export class LogRow { |
6 | date: Date | 6 | date: Date |
diff --git a/client/src/app/+admin/system/logs/logs.component.ts b/client/src/app/+admin/system/logs/logs.component.ts index 939e710d7..22375fcd9 100644 --- a/client/src/app/+admin/system/logs/logs.component.ts +++ b/client/src/app/+admin/system/logs/logs.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' |
2 | import { LocalStorageService, Notifier } from '@app/core' | 2 | import { LocalStorageService, Notifier } from '@app/core' |
3 | import { ServerLogLevel } from '@shared/models' | 3 | import { ServerLogLevel } from '@peertube/peertube-models' |
4 | import { LogRow } from './log-row.model' | 4 | import { LogRow } from './log-row.model' |
5 | import { LogsService } from './logs.service' | 5 | import { LogsService } from './logs.service' |
6 | 6 | ||
diff --git a/client/src/app/+admin/system/logs/logs.service.ts b/client/src/app/+admin/system/logs/logs.service.ts index 933a074a8..9e774d7fd 100644 --- a/client/src/app/+admin/system/logs/logs.service.ts +++ b/client/src/app/+admin/system/logs/logs.service.ts | |||
@@ -3,7 +3,7 @@ import { catchError, map } from 'rxjs/operators' | |||
3 | import { HttpClient, HttpParams } from '@angular/common/http' | 3 | import { HttpClient, HttpParams } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { RestExtractor, RestService } from '@app/core' | 5 | import { RestExtractor, RestService } from '@app/core' |
6 | import { ServerLogLevel } from '@shared/models' | 6 | import { ServerLogLevel } from '@peertube/peertube-models' |
7 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
8 | import { LogRow } from './log-row.model' | 8 | import { LogRow } from './log-row.model' |
9 | 9 | ||
diff --git a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts index 2670eac86..e75446d8c 100644 --- a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts +++ b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts | |||
@@ -3,7 +3,7 @@ import { Component, OnInit } from '@angular/core' | |||
3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { formatICU } from '@app/helpers' | 4 | import { formatICU } from '@app/helpers' |
5 | import { DropdownAction } from '@app/shared/shared-main' | 5 | import { DropdownAction } from '@app/shared/shared-main' |
6 | import { RunnerJob, RunnerJobState } from '@shared/models' | 6 | import { RunnerJob, RunnerJobState } from '@peertube/peertube-models' |
7 | import { RunnerJobFormatted, RunnerService } from '../runner.service' | 7 | import { RunnerJobFormatted, RunnerService } from '../runner.service' |
8 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 8 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
9 | 9 | ||
diff --git a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts index 7566f967e..0964471f9 100644 --- a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts +++ b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts | |||
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { DropdownAction } from '@app/shared/shared-main' | 4 | import { DropdownAction } from '@app/shared/shared-main' |
5 | import { Runner } from '@shared/models' | 5 | import { Runner } from '@peertube/peertube-models' |
6 | import { RunnerService } from '../runner.service' | 6 | import { RunnerService } from '../runner.service' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
diff --git a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts index 77908a2e1..c8a597b18 100644 --- a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts +++ b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts | |||
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { DropdownAction } from '@app/shared/shared-main' | 4 | import { DropdownAction } from '@app/shared/shared-main' |
5 | import { RunnerRegistrationToken } from '@shared/models' | 5 | import { RunnerRegistrationToken } from '@peertube/peertube-models' |
6 | import { RunnerService } from '../runner.service' | 6 | import { RunnerService } from '../runner.service' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
diff --git a/client/src/app/+admin/system/runners/runner.service.ts b/client/src/app/+admin/system/runners/runner.service.ts index 3ab36c4ff..94bdaad78 100644 --- a/client/src/app/+admin/system/runners/runner.service.ts +++ b/client/src/app/+admin/system/runners/runner.service.ts | |||
@@ -4,9 +4,8 @@ import { catchError, concatMap, forkJoin, from, map, toArray } from 'rxjs' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService, ServerService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService, ServerService } from '@app/core' |
7 | import { arrayify, peertubeTranslate } from '@shared/core-utils' | 7 | import { arrayify, peertubeTranslate } from '@peertube/peertube-core-utils' |
8 | import { ResultList } from '@shared/models/common' | 8 | import { ResultList, Runner, RunnerJob, RunnerJobAdmin, RunnerJobState, RunnerRegistrationToken } from '@peertube/peertube-models' |
9 | import { Runner, RunnerJob, RunnerJobAdmin, RunnerJobState, RunnerRegistrationToken } from '@shared/models/runners' | ||
10 | import { environment } from '../../../../environments/environment' | 9 | import { environment } from '../../../../environments/environment' |
11 | 10 | ||
12 | export type RunnerJobFormatted = RunnerJob & { | 11 | export type RunnerJobFormatted = RunnerJob & { |
diff --git a/client/src/app/+admin/system/runners/runners.routes.ts b/client/src/app/+admin/system/runners/runners.routes.ts index fabe687d6..004c3bedd 100644 --- a/client/src/app/+admin/system/runners/runners.routes.ts +++ b/client/src/app/+admin/system/runners/runners.routes.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { UserRightGuard } from '@app/core' | 2 | import { UserRightGuard } from '@app/core' |
3 | import { UserRight } from '@shared/models' | 3 | import { UserRight } from '@peertube/peertube-models' |
4 | import { RunnerJobListComponent } from './runner-job-list' | 4 | import { RunnerJobListComponent } from './runner-job-list' |
5 | import { RunnerListComponent } from './runner-list' | 5 | import { RunnerListComponent } from './runner-list' |
6 | import { RunnerRegistrationTokenListComponent } from './runner-registration-token-list' | 6 | import { RunnerRegistrationTokenListComponent } from './runner-registration-token-list' |
diff --git a/client/src/app/+admin/system/system.routes.ts b/client/src/app/+admin/system/system.routes.ts index 87e4b25b3..169d52952 100644 --- a/client/src/app/+admin/system/system.routes.ts +++ b/client/src/app/+admin/system/system.routes.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | import { UserRightGuard } from '@app/core' | 2 | import { UserRightGuard } from '@app/core' |
3 | import { UserRight } from '@shared/models' | 3 | import { UserRight } from '@peertube/peertube-models' |
4 | import { DebugComponent } from './debug' | 4 | import { DebugComponent } from './debug' |
5 | import { JobsComponent } from './jobs/jobs.component' | 5 | import { JobsComponent } from './jobs/jobs.component' |
6 | import { LogsComponent } from './logs' | 6 | import { LogsComponent } from './logs' |
diff --git a/client/src/app/+error-page/error-page.component.ts b/client/src/app/+error-page/error-page.component.ts index 4fee01350..9cc4646df 100644 --- a/client/src/app/+error-page/error-page.component.ts +++ b/client/src/app/+error-page/error-page.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Title } from '@angular/platform-browser' | 2 | import { Title } from '@angular/platform-browser' |
3 | import { Router } from '@angular/router' | 3 | import { Router } from '@angular/router' |
4 | import { HttpStatusCode } from '@shared/models' | 4 | import { HttpStatusCode, HttpStatusCodeType } from '@peertube/peertube-models' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
7 | selector: 'my-error-page', | 7 | selector: 'my-error-page', |
@@ -9,7 +9,7 @@ import { HttpStatusCode } from '@shared/models' | |||
9 | styleUrls: [ './error-page.component.scss' ] | 9 | styleUrls: [ './error-page.component.scss' ] |
10 | }) | 10 | }) |
11 | export class ErrorPageComponent implements OnInit { | 11 | export class ErrorPageComponent implements OnInit { |
12 | status = HttpStatusCode.NOT_FOUND_404 | 12 | status: HttpStatusCodeType = HttpStatusCode.NOT_FOUND_404 |
13 | type: 'video' | 'other' = 'other' | 13 | type: 'video' | 'other' = 'other' |
14 | 14 | ||
15 | public constructor ( | 15 | public constructor ( |
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts index e486df61d..a6906efa2 100644 --- a/client/src/app/+login/login.component.ts +++ b/client/src/app/+login/login.component.ts | |||
@@ -8,8 +8,8 @@ import { USER_OTP_TOKEN_VALIDATOR } from '@app/shared/form-validators/user-valid | |||
8 | import { FormReactive, FormReactiveService, InputTextComponent } from '@app/shared/shared-forms' | 8 | import { FormReactive, FormReactiveService, InputTextComponent } from '@app/shared/shared-forms' |
9 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' | 9 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' |
10 | import { NgbAccordionDirective, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | 10 | import { NgbAccordionDirective, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
11 | import { getExternalAuthHref } from '@shared/core-utils' | 11 | import { getExternalAuthHref } from '@peertube/peertube-core-utils' |
12 | import { RegisteredExternalAuthConfig, ServerConfig, ServerErrorCode } from '@shared/models' | 12 | import { RegisteredExternalAuthConfig, ServerConfig, ServerErrorCode } from '@peertube/peertube-models' |
13 | 13 | ||
14 | @Component({ | 14 | @Component({ |
15 | selector: 'my-login', | 15 | selector: 'my-login', |
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts index 8ca94b0b3..3f876078f 100644 --- a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts +++ b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | } from '@app/shared/form-validators/video-channel-validators' | 11 | } from '@app/shared/form-validators/video-channel-validators' |
12 | import { FormReactiveService } from '@app/shared/shared-forms' | 12 | import { FormReactiveService } from '@app/shared/shared-forms' |
13 | import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' | 13 | import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' |
14 | import { HttpStatusCode, VideoChannelCreate } from '@shared/models' | 14 | import { HttpStatusCode, VideoChannelCreate } from '@peertube/peertube-models' |
15 | import { VideoChannelEdit } from './video-channel-edit' | 15 | import { VideoChannelEdit } from './video-channel-edit' |
16 | 16 | ||
17 | @Component({ | 17 | @Component({ |
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts index f9045db35..3992e298e 100644 --- a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts +++ b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts | |||
@@ -11,9 +11,9 @@ import { | |||
11 | } from '@app/shared/form-validators/video-channel-validators' | 11 | } from '@app/shared/form-validators/video-channel-validators' |
12 | import { FormReactiveService } from '@app/shared/shared-forms' | 12 | import { FormReactiveService } from '@app/shared/shared-forms' |
13 | import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' | 13 | import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' |
14 | import { HTMLServerConfig, VideoChannelUpdate } from '@shared/models' | 14 | import { HTMLServerConfig, VideoChannelUpdate } from '@peertube/peertube-models' |
15 | import { VideoChannelEdit } from './video-channel-edit' | 15 | import { VideoChannelEdit } from './video-channel-edit' |
16 | import { shallowCopy } from '@shared/core-utils' | 16 | import { shallowCopy } from '@peertube/peertube-core-utils' |
17 | 17 | ||
18 | @Component({ | 18 | @Component({ |
19 | selector: 'my-video-channel-update', | 19 | selector: 'my-video-channel-update', |
diff --git a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts index e88cdd228..281a12eda 100644 --- a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts +++ b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { AuthService, ConfirmService, Notifier, ScopedTokensService } from '@app/core' | 2 | import { AuthService, ConfirmService, Notifier, ScopedTokensService } from '@app/core' |
3 | import { VideoService } from '@app/shared/shared-main' | 3 | import { VideoService } from '@app/shared/shared-main' |
4 | import { FeedFormat } from '@shared/models' | 4 | import { FeedFormat, ScopedToken } from '@peertube/peertube-models' |
5 | import { ScopedToken } from '@shared/models/users/user-scoped-token' | ||
6 | import { environment } from '../../../environments/environment' | 5 | import { environment } from '../../../environments/environment' |
7 | 6 | ||
8 | @Component({ | 7 | @Component({ |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts index 1e8fa2a56..7bbd240d0 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts | |||
@@ -4,7 +4,7 @@ import { Component, OnInit } from '@angular/core' | |||
4 | import { AuthService, Notifier, ServerService, UserService } from '@app/core' | 4 | import { AuthService, Notifier, ServerService, UserService } from '@app/core' |
5 | import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' | 5 | import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' |
6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
7 | import { HttpStatusCode, User } from '@shared/models' | 7 | import { HttpStatusCode, User } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-account-change-email', | 10 | selector: 'my-account-change-email', |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts index 805d50070..f916740be 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts | |||
@@ -7,7 +7,7 @@ import { | |||
7 | USER_PASSWORD_VALIDATOR | 7 | USER_PASSWORD_VALIDATOR |
8 | } from '@app/shared/form-validators/user-validators' | 8 | } from '@app/shared/form-validators/user-validators' |
9 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 9 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
10 | import { HttpStatusCode, User } from '@shared/models' | 10 | import { HttpStatusCode, User } from '@peertube/peertube-models' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
13 | selector: 'my-account-change-password', | 13 | selector: 'my-account-change-password', |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts index 381d18922..bf6accc3e 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts | |||
@@ -2,7 +2,7 @@ import { Subject } from 'rxjs' | |||
2 | import { Component, Input, OnInit } from '@angular/core' | 2 | import { Component, Input, OnInit } from '@angular/core' |
3 | import { Notifier, UserService } from '@app/core' | 3 | import { Notifier, UserService } from '@app/core' |
4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
5 | import { User, UserUpdateMe } from '@shared/models' | 5 | import { User, UserUpdateMe } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-account-email-preferences', | 8 | selector: 'my-account-email-preferences', |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts index 2adc276a9..f4181340d 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts | |||
@@ -3,8 +3,8 @@ import { Subject } from 'rxjs' | |||
3 | import { Component, Input, OnInit } from '@angular/core' | 3 | import { Component, Input, OnInit } from '@angular/core' |
4 | import { Notifier, ServerService, User } from '@app/core' | 4 | import { Notifier, ServerService, User } from '@app/core' |
5 | import { UserNotificationService } from '@app/shared/shared-main' | 5 | import { UserNotificationService } from '@app/shared/shared-main' |
6 | import { objectKeysTyped } from '@shared/core-utils' | 6 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
7 | import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '@shared/models' | 7 | import { UserNotificationSetting, UserNotificationSettingValue, UserRight, UserRightType } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-account-notification-preferences', | 10 | selector: 'my-account-notification-preferences', |
@@ -19,7 +19,7 @@ export class MyAccountNotificationPreferencesComponent implements OnInit { | |||
19 | emailNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {} | 19 | emailNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {} |
20 | webNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {} | 20 | webNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {} |
21 | labelNotifications: { [ id in keyof UserNotificationSetting ]?: string } = {} | 21 | labelNotifications: { [ id in keyof UserNotificationSetting ]?: string } = {} |
22 | rightNotifications: { [ id in keyof Partial<UserNotificationSetting> ]?: UserRight } = {} | 22 | rightNotifications: { [ id in keyof Partial<UserNotificationSetting> ]?: UserRightType } = {} |
23 | emailEnabled = false | 23 | emailEnabled = false |
24 | 24 | ||
25 | private savePreferences = debounce(this.savePreferencesImpl.bind(this), 500) | 25 | private savePreferences = debounce(this.savePreferencesImpl.bind(this), 500) |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index a276bb126..4b3b33bcc 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | |||
@@ -3,7 +3,7 @@ import { HttpErrorResponse } from '@angular/common/http' | |||
3 | import { AfterViewChecked, Component, OnInit } from '@angular/core' | 3 | import { AfterViewChecked, Component, OnInit } from '@angular/core' |
4 | import { AuthService, Notifier, User, UserService } from '@app/core' | 4 | import { AuthService, Notifier, User, UserService } from '@app/core' |
5 | import { genericUploadErrorHandler } from '@app/helpers' | 5 | import { genericUploadErrorHandler } from '@app/helpers' |
6 | import { shallowCopy } from '@shared/core-utils' | 6 | import { shallowCopy } from '@peertube/peertube-core-utils' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
9 | selector: 'my-account-settings', | 9 | selector: 'my-account-settings', |
diff --git a/client/src/app/+my-library/my-follows/my-followers.component.ts b/client/src/app/+my-library/my-follows/my-followers.component.ts index 0dd9bf6f5..4e3e5bcc4 100644 --- a/client/src/app/+my-library/my-follows/my-followers.component.ts +++ b/client/src/app/+my-library/my-follows/my-followers.component.ts | |||
@@ -4,7 +4,7 @@ import { ActivatedRoute } from '@angular/router' | |||
4 | import { AuthService, ComponentPagination, Notifier } from '@app/core' | 4 | import { AuthService, ComponentPagination, Notifier } from '@app/core' |
5 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 5 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
6 | import { UserSubscriptionService } from '@app/shared/shared-user-subscription' | 6 | import { UserSubscriptionService } from '@app/shared/shared-user-subscription' |
7 | import { ActorFollow } from '@shared/models' | 7 | import { ActorFollow } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | templateUrl: './my-followers.component.html', | 10 | templateUrl: './my-followers.component.html', |
diff --git a/client/src/app/+my-library/my-library.component.ts b/client/src/app/+my-library/my-library.component.ts index ff901952f..35eb617ab 100644 --- a/client/src/app/+my-library/my-library.component.ts +++ b/client/src/app/+my-library/my-library.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { AuthService, AuthUser, ScreenService, ServerService } from '@app/core' | 2 | import { AuthService, AuthUser, ScreenService, ServerService } from '@app/core' |
3 | import { HTMLServerConfig } from '@shared/models' | 3 | import { HTMLServerConfig } from '@peertube/peertube-models' |
4 | import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' | 4 | import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts index ca7eb680b..87e389411 100644 --- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts +++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts | |||
@@ -6,7 +6,7 @@ import { OWNERSHIP_CHANGE_CHANNEL_VALIDATOR } from '@app/shared/form-validators/ | |||
6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
7 | import { VideoOwnershipService } from '@app/shared/shared-main' | 7 | import { VideoOwnershipService } from '@app/shared/shared-main' |
8 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 8 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
9 | import { VideoChangeOwnership } from '@shared/models' | 9 | import { VideoChangeOwnership } from '@peertube/peertube-models' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
12 | selector: 'my-accept-ownership', | 12 | selector: 'my-accept-ownership', |
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-ownership.component.ts index 8d6a42dfb..4838eca27 100644 --- a/client/src/app/+my-library/my-ownership/my-ownership.component.ts +++ b/client/src/app/+my-library/my-ownership/my-ownership.component.ts | |||
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit, ViewChild } from '@angular/core' | 2 | import { Component, OnInit, ViewChild } from '@angular/core' |
3 | import { Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { Account, VideoOwnershipService } from '@app/shared/shared-main' | 4 | import { Account, VideoOwnershipService } from '@app/shared/shared-main' |
5 | import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '@shared/models' | 5 | import { VideoChangeOwnership, VideoChangeOwnershipStatus, VideoChangeOwnershipStatusType } from '@peertube/peertube-models' |
6 | import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-ownership.component' | 6 | import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-ownership.component' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
@@ -32,7 +32,7 @@ export class MyOwnershipComponent extends RestTable implements OnInit { | |||
32 | return 'MyOwnershipComponent' | 32 | return 'MyOwnershipComponent' |
33 | } | 33 | } |
34 | 34 | ||
35 | getStatusClass (status: VideoChangeOwnershipStatus) { | 35 | getStatusClass (status: VideoChangeOwnershipStatusType) { |
36 | switch (status) { | 36 | switch (status) { |
37 | case VideoChangeOwnershipStatus.ACCEPTED: | 37 | case VideoChangeOwnershipStatus.ACCEPTED: |
38 | return 'badge-green' | 38 | return 'badge-green' |
diff --git a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts index 1f7287f44..44e5c45b9 100644 --- a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts +++ b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts | |||
@@ -3,8 +3,7 @@ import { mergeMap } from 'rxjs' | |||
3 | import { Component, OnInit } from '@angular/core' | 3 | import { Component, OnInit } from '@angular/core' |
4 | import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | 4 | import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' |
5 | import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' | 5 | import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' |
6 | import { HTMLServerConfig } from '@shared/models/server' | 6 | import { HTMLServerConfig, VideoChannelSync, VideoChannelSyncState, VideoChannelSyncStateType } from '@peertube/peertube-models' |
7 | import { VideoChannelSync, VideoChannelSyncState } from '@shared/models/videos' | ||
8 | 7 | ||
9 | @Component({ | 8 | @Component({ |
10 | templateUrl: './my-video-channel-syncs.component.html', | 9 | templateUrl: './my-video-channel-syncs.component.html', |
@@ -124,7 +123,7 @@ export class MyVideoChannelSyncsComponent extends RestTable implements OnInit { | |||
124 | return '/my-library/video-channel-syncs/create' | 123 | return '/my-library/video-channel-syncs/create' |
125 | } | 124 | } |
126 | 125 | ||
127 | getSyncStateClass (stateId: VideoChannelSyncState) { | 126 | getSyncStateClass (stateId: VideoChannelSyncStateType) { |
128 | return [ 'pt-badge', MyVideoChannelSyncsComponent.STATE_CLASS_BY_ID[stateId] ] | 127 | return [ 'pt-badge', MyVideoChannelSyncsComponent.STATE_CLASS_BY_ID[stateId] ] |
129 | } | 128 | } |
130 | 129 | ||
diff --git a/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts b/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts index a14ab5b92..a40a68764 100644 --- a/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts +++ b/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts | |||
@@ -7,7 +7,7 @@ import { listUserChannelsForSelect } from '@app/helpers' | |||
7 | import { VIDEO_CHANNEL_EXTERNAL_URL_VALIDATOR } from '@app/shared/form-validators/video-channel-validators' | 7 | import { VIDEO_CHANNEL_EXTERNAL_URL_VALIDATOR } from '@app/shared/form-validators/video-channel-validators' |
8 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 8 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
9 | import { VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' | 9 | import { VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' |
10 | import { VideoChannelSyncCreate } from '@shared/models/videos' | 10 | import { VideoChannelSyncCreate } from '@peertube/peertube-models' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
13 | selector: 'my-video-channel-sync-edit', | 13 | selector: 'my-video-channel-sync-edit', |
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts index 7d82f62b9..76cefa7bd 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts | |||
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { Video, VideoImportService } from '@app/shared/shared-main' | 4 | import { Video, VideoImportService } from '@app/shared/shared-main' |
5 | import { VideoImport, VideoImportState } from '@shared/models' | 5 | import { VideoImport, VideoImportState, VideoImportStateType } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | templateUrl: './my-video-imports.component.html', | 8 | templateUrl: './my-video-imports.component.html', |
@@ -29,7 +29,7 @@ export class MyVideoImportsComponent extends RestTable implements OnInit { | |||
29 | return 'MyVideoImportsComponent' | 29 | return 'MyVideoImportsComponent' |
30 | } | 30 | } |
31 | 31 | ||
32 | getVideoImportStateClass (state: VideoImportState) { | 32 | getVideoImportStateClass (state: VideoImportStateType) { |
33 | switch (state) { | 33 | switch (state) { |
34 | case VideoImportState.FAILED: | 34 | case VideoImportState.FAILED: |
35 | return 'badge-red' | 35 | return 'badge-red' |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts index 63f72df3f..a54b3ca86 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts | |||
@@ -11,8 +11,7 @@ import { | |||
11 | } from '@app/shared/form-validators/video-playlist-validators' | 11 | } from '@app/shared/form-validators/video-playlist-validators' |
12 | import { FormReactiveService } from '@app/shared/shared-forms' | 12 | import { FormReactiveService } from '@app/shared/shared-forms' |
13 | import { VideoPlaylistService } from '@app/shared/shared-video-playlist' | 13 | import { VideoPlaylistService } from '@app/shared/shared-video-playlist' |
14 | import { VideoPlaylistCreate } from '@shared/models/videos/playlist/video-playlist-create.model' | 14 | import { VideoPlaylistCreate, VideoPlaylistPrivacy } from '@peertube/peertube-models' |
15 | import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model' | ||
16 | import { MyVideoPlaylistEdit } from './my-video-playlist-edit' | 15 | import { MyVideoPlaylistEdit } from './my-video-playlist-edit' |
17 | 16 | ||
18 | @Component({ | 17 | @Component({ |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts index 71db0592a..127960a58 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts | |||
@@ -1,13 +1,12 @@ | |||
1 | import { FormReactive } from '@app/shared/shared-forms' | 1 | import { FormReactive } from '@app/shared/shared-forms' |
2 | import { VideoConstant, VideoPlaylistPrivacy } from '@shared/models' | 2 | import { VideoConstant, VideoPlaylist, VideoPlaylistPrivacyType } from '@peertube/peertube-models' |
3 | import { VideoPlaylist } from '@shared/models/videos/playlist/video-playlist.model' | ||
4 | import { SelectChannelItem } from '../../../types/select-options-item.model' | 3 | import { SelectChannelItem } from '../../../types/select-options-item.model' |
5 | 4 | ||
6 | export abstract class MyVideoPlaylistEdit extends FormReactive { | 5 | export abstract class MyVideoPlaylistEdit extends FormReactive { |
7 | // Declare it here to avoid errors in create template | 6 | // Declare it here to avoid errors in create template |
8 | videoPlaylistToUpdate: VideoPlaylist | 7 | videoPlaylistToUpdate: VideoPlaylist |
9 | userVideoChannels: SelectChannelItem[] = [] | 8 | userVideoChannels: SelectChannelItem[] = [] |
10 | videoPlaylistPrivacies: VideoConstant<VideoPlaylistPrivacy>[] = [] | 9 | videoPlaylistPrivacies: VideoConstant<VideoPlaylistPrivacyType>[] = [] |
11 | 10 | ||
12 | abstract isCreation (): boolean | 11 | abstract isCreation (): boolean |
13 | abstract getFormButtonTitle (): string | 12 | abstract getFormButtonTitle (): string |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts index c9739b6cc..7a9588743 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts | |||
@@ -6,7 +6,7 @@ import { ComponentPagination, ConfirmService, HooksService, Notifier, ScreenServ | |||
6 | import { DropdownAction } from '@app/shared/shared-main' | 6 | import { DropdownAction } from '@app/shared/shared-main' |
7 | import { VideoShareComponent } from '@app/shared/shared-share-modal' | 7 | import { VideoShareComponent } from '@app/shared/shared-share-modal' |
8 | import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 8 | import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
9 | import { VideoPlaylistType } from '@shared/models' | 9 | import { VideoPlaylistType } from '@peertube/peertube-models' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
12 | templateUrl: './my-video-playlist-elements.component.html', | 12 | templateUrl: './my-video-playlist-elements.component.html', |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts index bbe8a5f80..f29a0cc45 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts | |||
@@ -13,7 +13,7 @@ import { | |||
13 | } from '@app/shared/form-validators/video-playlist-validators' | 13 | } from '@app/shared/form-validators/video-playlist-validators' |
14 | import { FormReactiveService } from '@app/shared/shared-forms' | 14 | import { FormReactiveService } from '@app/shared/shared-forms' |
15 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 15 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
16 | import { VideoPlaylistUpdate } from '@shared/models' | 16 | import { VideoPlaylistUpdate } from '@peertube/peertube-models' |
17 | import { MyVideoPlaylistEdit } from './my-video-playlist-edit' | 17 | import { MyVideoPlaylistEdit } from './my-video-playlist-edit' |
18 | 18 | ||
19 | @Component({ | 19 | @Component({ |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts index 634176744..08bd94fae 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts | |||
@@ -3,7 +3,7 @@ import { mergeMap } from 'rxjs/operators' | |||
3 | import { Component } from '@angular/core' | 3 | import { Component } from '@angular/core' |
4 | import { AuthService, ComponentPagination, ConfirmService, Notifier } from '@app/core' | 4 | import { AuthService, ComponentPagination, ConfirmService, Notifier } from '@app/core' |
5 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 5 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
6 | import { VideoPlaylistType } from '@shared/models' | 6 | import { VideoPlaylistType } from '@peertube/peertube-models' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
9 | templateUrl: './my-video-playlists.component.html', | 9 | templateUrl: './my-video-playlists.component.html', |
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index 1827d6a0b..4a7604878 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | VideosSelectionComponent | 16 | VideosSelectionComponent |
17 | } from '@app/shared/shared-video-miniature' | 17 | } from '@app/shared/shared-video-miniature' |
18 | import { VideoPlaylistService } from '@app/shared/shared-video-playlist' | 18 | import { VideoPlaylistService } from '@app/shared/shared-video-playlist' |
19 | import { VideoChannel, VideoExistInPlaylist, VideosExistInPlaylists, VideoSortField } from '@shared/models' | 19 | import { VideoChannel, VideoExistInPlaylist, VideosExistInPlaylists, VideoSortField } from '@peertube/peertube-models' |
20 | import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' | 20 | import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' |
21 | 21 | ||
22 | @Component({ | 22 | @Component({ |
diff --git a/client/src/app/+search/search-filters.component.ts b/client/src/app/+search/search-filters.component.ts index a6fc51383..b98acee18 100644 --- a/client/src/app/+search/search-filters.component.ts +++ b/client/src/app/+search/search-filters.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
2 | import { ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { AdvancedSearch } from '@app/shared/shared-search' | 3 | import { AdvancedSearch } from '@app/shared/shared-search' |
4 | import { HTMLServerConfig, VideoConstant } from '@shared/models' | 4 | import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models' |
5 | 5 | ||
6 | type FormOption = { id: string, label: string } | 6 | type FormOption = { id: string, label: string } |
7 | 7 | ||
diff --git a/client/src/app/+search/search.component.ts b/client/src/app/+search/search.component.ts index 31394a1d1..62e349c40 100644 --- a/client/src/app/+search/search.component.ts +++ b/client/src/app/+search/search.component.ts | |||
@@ -9,7 +9,7 @@ import { Video, VideoChannel } from '@app/shared/shared-main' | |||
9 | import { AdvancedSearch, SearchService } from '@app/shared/shared-search' | 9 | import { AdvancedSearch, SearchService } from '@app/shared/shared-search' |
10 | import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' | 10 | import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' |
11 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' | 11 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' |
12 | import { HTMLServerConfig, SearchTargetType } from '@shared/models' | 12 | import { HTMLServerConfig, SearchTargetType } from '@peertube/peertube-models' |
13 | 13 | ||
14 | @Component({ | 14 | @Component({ |
15 | selector: 'my-search', | 15 | selector: 'my-search', |
diff --git a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts index 6765ba15e..4e8b71293 100644 --- a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts +++ b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts | |||
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs' | |||
2 | import { map } from 'rxjs/operators' | 2 | import { map } from 'rxjs/operators' |
3 | import { ActivatedRouteSnapshot, Router } from '@angular/router' | 3 | import { ActivatedRouteSnapshot, Router } from '@angular/router' |
4 | import { logger } from '@root-helpers/logger' | 4 | import { logger } from '@root-helpers/logger' |
5 | import { ResultList } from '@shared/models' | 5 | import { ResultList } from '@peertube/peertube-models' |
6 | 6 | ||
7 | export abstract class AbstractLazyLoadResolver <T> { | 7 | export abstract class AbstractLazyLoadResolver <T> { |
8 | protected router: Router | 8 | protected router: Router |
diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts index be51c36d1..396971d98 100644 --- a/client/src/app/+signup/+register/register.component.ts +++ b/client/src/app/+signup/+register/register.component.ts | |||
@@ -5,8 +5,7 @@ import { ActivatedRoute } from '@angular/router' | |||
5 | import { AuthService } from '@app/core' | 5 | import { AuthService } from '@app/core' |
6 | import { HooksService } from '@app/core/plugins/hooks.service' | 6 | import { HooksService } from '@app/core/plugins/hooks.service' |
7 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' | 7 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' |
8 | import { UserRegister } from '@shared/models' | 8 | import { ServerConfig, UserRegister } from '@peertube/peertube-models' |
9 | import { ServerConfig } from '@shared/models/server' | ||
10 | import { SignupService } from '../shared/signup.service' | 9 | import { SignupService } from '../shared/signup.service' |
11 | 10 | ||
12 | @Component({ | 11 | @Component({ |
diff --git a/client/src/app/+signup/shared/signup.service.ts b/client/src/app/+signup/shared/signup.service.ts index f647298be..7c331437e 100644 --- a/client/src/app/+signup/shared/signup.service.ts +++ b/client/src/app/+signup/shared/signup.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError, tap } from 'rxjs/operators' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { RestExtractor, UserService } from '@app/core' | 4 | import { RestExtractor, UserService } from '@app/core' |
5 | import { UserRegister, UserRegistrationRequest } from '@shared/models' | 5 | import { UserRegister, UserRegistrationRequest } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Injectable() | 7 | @Injectable() |
8 | export class SignupService { | 8 | export class SignupService { |
diff --git a/client/src/app/+stats/video/video-stats.component.ts b/client/src/app/+stats/video/video-stats.component.ts index fa5e33ab6..5bde5b01d 100644 --- a/client/src/app/+stats/video/video-stats.component.ts +++ b/client/src/app/+stats/video/video-stats.component.ts | |||
@@ -7,15 +7,15 @@ import { ActivatedRoute } from '@angular/router' | |||
7 | import { Notifier, PeerTubeRouterService } from '@app/core' | 7 | import { Notifier, PeerTubeRouterService } from '@app/core' |
8 | import { NumberFormatterPipe, VideoDetails } from '@app/shared/shared-main' | 8 | import { NumberFormatterPipe, VideoDetails } from '@app/shared/shared-main' |
9 | import { LiveVideoService } from '@app/shared/shared-video-live' | 9 | import { LiveVideoService } from '@app/shared/shared-video-live' |
10 | import { secondsToTime } from '@shared/core-utils' | 10 | import { secondsToTime } from '@peertube/peertube-core-utils' |
11 | import { HttpStatusCode } from '@shared/models/http' | ||
12 | import { | 11 | import { |
12 | HttpStatusCode, | ||
13 | LiveVideoSession, | 13 | LiveVideoSession, |
14 | VideoStatsOverall, | 14 | VideoStatsOverall, |
15 | VideoStatsRetention, | 15 | VideoStatsRetention, |
16 | VideoStatsTimeserie, | 16 | VideoStatsTimeserie, |
17 | VideoStatsTimeserieMetric | 17 | VideoStatsTimeserieMetric |
18 | } from '@shared/models/videos' | 18 | } from '@peertube/peertube-models' |
19 | import { VideoStatsService } from './video-stats.service' | 19 | import { VideoStatsService } from './video-stats.service' |
20 | 20 | ||
21 | type ActiveGraphId = VideoStatsTimeserieMetric | 'retention' | 'countries' | 21 | type ActiveGraphId = VideoStatsTimeserieMetric | 'retention' | 'countries' |
diff --git a/client/src/app/+stats/video/video-stats.service.ts b/client/src/app/+stats/video/video-stats.service.ts index e019c87f7..5d4817892 100644 --- a/client/src/app/+stats/video/video-stats.service.ts +++ b/client/src/app/+stats/video/video-stats.service.ts | |||
@@ -4,7 +4,7 @@ import { HttpClient, HttpParams } from '@angular/common/http' | |||
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { RestExtractor } from '@app/core' | 5 | import { RestExtractor } from '@app/core' |
6 | import { VideoService } from '@app/shared/shared-main' | 6 | import { VideoService } from '@app/shared/shared-main' |
7 | import { VideoStatsOverall, VideoStatsRetention, VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models/videos' | 7 | import { VideoStatsOverall, VideoStatsRetention, VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Injectable({ | 9 | @Injectable({ |
10 | providedIn: 'root' | 10 | providedIn: 'root' |
diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts index 5e3946bf5..725990300 100644 --- a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts +++ b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts | |||
@@ -4,7 +4,7 @@ import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core' | |||
4 | import { ComponentPaginationLight, DisableForReuseHook, HooksService, ScreenService } from '@app/core' | 4 | import { ComponentPaginationLight, DisableForReuseHook, HooksService, ScreenService } from '@app/core' |
5 | import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' | 5 | import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' |
6 | import { MiniatureDisplayOptions, VideoFilters } from '@app/shared/shared-video-miniature' | 6 | import { MiniatureDisplayOptions, VideoFilters } from '@app/shared/shared-video-miniature' |
7 | import { Video, VideoSortField } from '@shared/models' | 7 | import { Video, VideoSortField } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-video-channel-videos', | 10 | selector: 'my-video-channel-videos', |
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index f5bea66ec..40b3b19b7 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts | |||
@@ -8,7 +8,7 @@ import { Account, ListOverflowItem, VideoChannel, VideoChannelService, VideoServ | |||
8 | import { BlocklistService } from '@app/shared/shared-moderation' | 8 | import { BlocklistService } from '@app/shared/shared-moderation' |
9 | import { SupportModalComponent } from '@app/shared/shared-support-modal' | 9 | import { SupportModalComponent } from '@app/shared/shared-support-modal' |
10 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' | 10 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' |
11 | import { HttpStatusCode, UserRight } from '@shared/models' | 11 | import { HttpStatusCode, UserRight } from '@peertube/peertube-models' |
12 | 12 | ||
13 | @Component({ | 13 | @Component({ |
14 | templateUrl: './video-channels.component.html', | 14 | templateUrl: './video-channels.component.html', |
diff --git a/client/src/app/+video-studio/edit/video-studio-edit.component.ts b/client/src/app/+video-studio/edit/video-studio-edit.component.ts index 3d618fbe1..40e9cf40a 100644 --- a/client/src/app/+video-studio/edit/video-studio-edit.component.ts +++ b/client/src/app/+video-studio/edit/video-studio-edit.component.ts | |||
@@ -5,8 +5,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
5 | import { VideoDetails } from '@app/shared/shared-main' | 5 | import { VideoDetails } from '@app/shared/shared-main' |
6 | import { LoadingBarService } from '@ngx-loading-bar/core' | 6 | import { LoadingBarService } from '@ngx-loading-bar/core' |
7 | import { logger } from '@root-helpers/logger' | 7 | import { logger } from '@root-helpers/logger' |
8 | import { secondsToTime } from '@shared/core-utils' | 8 | import { secondsToTime } from '@peertube/peertube-core-utils' |
9 | import { VideoStudioTask, VideoStudioTaskCut } from '@shared/models' | 9 | import { VideoStudioTask, VideoStudioTaskCut } from '@peertube/peertube-models' |
10 | import { VideoStudioService } from '../shared' | 10 | import { VideoStudioService } from '../shared' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
diff --git a/client/src/app/+video-studio/shared/video-studio.service.ts b/client/src/app/+video-studio/shared/video-studio.service.ts index 8d8b2f0e5..a3aabd347 100644 --- a/client/src/app/+video-studio/shared/video-studio.service.ts +++ b/client/src/app/+video-studio/shared/video-studio.service.ts | |||
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core' | |||
4 | import { RestExtractor } from '@app/core' | 4 | import { RestExtractor } from '@app/core' |
5 | import { objectToFormData } from '@app/helpers' | 5 | import { objectToFormData } from '@app/helpers' |
6 | import { VideoService } from '@app/shared/shared-main' | 6 | import { VideoService } from '@app/shared/shared-main' |
7 | import { VideoStudioCreateEdition, VideoStudioTask } from '@shared/models' | 7 | import { VideoStudioCreateEdition, VideoStudioTask } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
10 | export class VideoStudioService { | 10 | export class VideoStudioService { |
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts index 4ab2d42db..e595cf2c9 100644 --- a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts | |||
@@ -4,7 +4,7 @@ import { VIDEO_CAPTION_FILE_VALIDATOR, VIDEO_CAPTION_LANGUAGE_VALIDATOR } from ' | |||
4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
5 | import { VideoCaptionEdit } from '@app/shared/shared-main' | 5 | import { VideoCaptionEdit } from '@app/shared/shared-main' |
6 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
7 | import { HTMLServerConfig, VideoConstant } from '@shared/models' | 7 | import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models' |
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-video-caption-add-modal', | 10 | selector: 'my-video-caption-add-modal', |
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts index 2cb470a24..6c6a30d96 100644 --- a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts | |||
@@ -3,7 +3,7 @@ import { VIDEO_CAPTION_FILE_CONTENT_VALIDATOR } from '@app/shared/form-validator | |||
3 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
4 | import { VideoCaptionEdit, VideoCaptionService, VideoCaptionWithPathEdit } from '@app/shared/shared-main' | 4 | import { VideoCaptionEdit, VideoCaptionService, VideoCaptionWithPathEdit } from '@app/shared/shared-main' |
5 | import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' |
6 | import { HTMLServerConfig, VideoConstant } from '@shared/models' | 6 | import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models' |
7 | import { ServerService } from '../../../../core' | 7 | import { ServerService } from '../../../../core' |
8 | 8 | ||
9 | /** | 9 | /** |
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts index 460960a01..b0c1352f3 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts | |||
@@ -24,8 +24,6 @@ import { FormReactiveValidationMessages, FormValidatorService } from '@app/share | |||
24 | import { InstanceService } from '@app/shared/shared-instance' | 24 | import { InstanceService } from '@app/shared/shared-instance' |
25 | import { VideoCaptionEdit, VideoCaptionWithPathEdit, VideoEdit, VideoService } from '@app/shared/shared-main' | 25 | import { VideoCaptionEdit, VideoCaptionWithPathEdit, VideoEdit, VideoService } from '@app/shared/shared-main' |
26 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 26 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
27 | import { logger } from '@root-helpers/logger' | ||
28 | import { PluginInfo } from '@root-helpers/plugins-manager' | ||
29 | import { | 27 | import { |
30 | HTMLServerConfig, | 28 | HTMLServerConfig, |
31 | LiveVideo, | 29 | LiveVideo, |
@@ -34,9 +32,12 @@ import { | |||
34 | RegisterClientVideoFieldOptions, | 32 | RegisterClientVideoFieldOptions, |
35 | VideoConstant, | 33 | VideoConstant, |
36 | VideoDetails, | 34 | VideoDetails, |
37 | VideoPrivacy | 35 | VideoPrivacy, |
38 | } from '@shared/models' | 36 | VideoPrivacyType, |
39 | import { VideoSource } from '@shared/models/videos/video-source' | 37 | VideoSource |
38 | } from '@peertube/peertube-models' | ||
39 | import { logger } from '@root-helpers/logger' | ||
40 | import { PluginInfo } from '@root-helpers/plugins-manager' | ||
40 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' | 41 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' |
41 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' | 42 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' |
42 | import { VideoCaptionEditModalContentComponent } from './video-caption-edit-modal-content/video-caption-edit-modal-content.component' | 43 | import { VideoCaptionEditModalContentComponent } from './video-caption-edit-modal-content/video-caption-edit-modal-content.component' |
@@ -81,8 +82,8 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
81 | // So that it can be accessed in the template | 82 | // So that it can be accessed in the template |
82 | readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY | 83 | readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY |
83 | 84 | ||
84 | videoPrivacies: VideoConstant<VideoPrivacy | typeof VideoEdit.SPECIAL_SCHEDULED_PRIVACY > [] = [] | 85 | videoPrivacies: VideoConstant<VideoPrivacyType | typeof VideoEdit.SPECIAL_SCHEDULED_PRIVACY > [] = [] |
85 | replayPrivacies: VideoConstant<VideoPrivacy> [] = [] | 86 | replayPrivacies: VideoConstant<VideoPrivacyType> [] = [] |
86 | videoCategories: VideoConstant<number>[] = [] | 87 | videoCategories: VideoConstant<number>[] = [] |
87 | videoLicences: VideoConstant<number>[] = [] | 88 | videoLicences: VideoConstant<number>[] = [] |
88 | videoLanguages: VideoLanguages[] = [] | 89 | videoLanguages: VideoLanguages[] = [] |
diff --git a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts index 50ca1a60b..c3f8936a9 100644 --- a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts +++ b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts | |||
@@ -3,7 +3,7 @@ import { HttpErrorResponse, HttpEventType, HttpHeaders } from '@angular/common/h | |||
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { AuthService, Notifier, ServerService } from '@app/core' | 4 | import { AuthService, Notifier, ServerService } from '@app/core' |
5 | import { BytesPipe, VideoService } from '@app/shared/shared-main' | 5 | import { BytesPipe, VideoService } from '@app/shared/shared-main' |
6 | import { HttpStatusCode } from '@shared/models' | 6 | import { HttpStatusCode } from '@peertube/peertube-models' |
7 | import { UploaderXFormData } from './uploaderx-form-data' | 7 | import { UploaderXFormData } from './uploaderx-form-data' |
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts index ba612f553..f7a570ed3 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | PeerTubeProblemDocument, | 16 | PeerTubeProblemDocument, |
17 | ServerErrorCode, | 17 | ServerErrorCode, |
18 | VideoPrivacy | 18 | VideoPrivacy |
19 | } from '@shared/models' | 19 | } from '@peertube/peertube-models' |
20 | import { VideoSend } from './video-send' | 20 | import { VideoSend } from './video-send' |
21 | 21 | ||
22 | @Component({ | 22 | @Component({ |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts index 4a1408a4a..97517e1c7 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts | |||
@@ -7,7 +7,7 @@ import { FormReactiveService } from '@app/shared/shared-forms' | |||
7 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' | 7 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' |
8 | import { LoadingBarService } from '@ngx-loading-bar/core' | 8 | import { LoadingBarService } from '@ngx-loading-bar/core' |
9 | import { logger } from '@root-helpers/logger' | 9 | import { logger } from '@root-helpers/logger' |
10 | import { PeerTubeProblemDocument, ServerErrorCode, VideoUpdate } from '@shared/models' | 10 | import { PeerTubeProblemDocument, ServerErrorCode, VideoUpdate } from '@peertube/peertube-models' |
11 | import { hydrateFormFromVideo } from '../shared/video-edit-utils' | 11 | import { hydrateFormFromVideo } from '../shared/video-edit-utils' |
12 | import { VideoSend } from './video-send' | 12 | import { VideoSend } from './video-send' |
13 | 13 | ||
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts index 502f3818e..634bd9914 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts | |||
@@ -8,7 +8,7 @@ import { FormReactiveService } from '@app/shared/shared-forms' | |||
8 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' | 8 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' |
9 | import { LoadingBarService } from '@ngx-loading-bar/core' | 9 | import { LoadingBarService } from '@ngx-loading-bar/core' |
10 | import { logger } from '@root-helpers/logger' | 10 | import { logger } from '@root-helpers/logger' |
11 | import { VideoUpdate } from '@shared/models' | 11 | import { VideoUpdate } from '@peertube/peertube-models' |
12 | import { hydrateFormFromVideo } from '../shared/video-edit-utils' | 12 | import { hydrateFormFromVideo } from '../shared/video-edit-utils' |
13 | import { VideoSend } from './video-send' | 13 | import { VideoSend } from './video-send' |
14 | 14 | ||
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts index 9de373cd3..56dcfa0e6 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts | |||
@@ -6,16 +6,16 @@ import { listUserChannelsForSelect } from '@app/helpers' | |||
6 | import { FormReactive } from '@app/shared/shared-forms' | 6 | import { FormReactive } from '@app/shared/shared-forms' |
7 | import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' | 7 | import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' |
8 | import { LoadingBarService } from '@ngx-loading-bar/core' | 8 | import { LoadingBarService } from '@ngx-loading-bar/core' |
9 | import { HTMLServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' | 9 | import { HTMLServerConfig, VideoConstant, VideoPrivacyType } from '@peertube/peertube-models' |
10 | 10 | ||
11 | @Directive() | 11 | @Directive() |
12 | // eslint-disable-next-line @angular-eslint/directive-class-suffix | 12 | // eslint-disable-next-line @angular-eslint/directive-class-suffix |
13 | export abstract class VideoSend extends FormReactive implements OnInit { | 13 | export abstract class VideoSend extends FormReactive implements OnInit { |
14 | userVideoChannels: SelectChannelItem[] = [] | 14 | userVideoChannels: SelectChannelItem[] = [] |
15 | videoPrivacies: VideoConstant<VideoPrivacy>[] = [] | 15 | videoPrivacies: VideoConstant<VideoPrivacyType>[] = [] |
16 | videoCaptions: VideoCaptionEdit[] = [] | 16 | videoCaptions: VideoCaptionEdit[] = [] |
17 | 17 | ||
18 | firstStepPrivacyId: VideoPrivacy | 18 | firstStepPrivacyId: VideoPrivacyType |
19 | firstStepChannelId: number | 19 | firstStepChannelId: number |
20 | 20 | ||
21 | abstract firstStepDone: EventEmitter<string> | 21 | abstract firstStepDone: EventEmitter<string> |
@@ -31,7 +31,7 @@ export abstract class VideoSend extends FormReactive implements OnInit { | |||
31 | 31 | ||
32 | protected serverConfig: HTMLServerConfig | 32 | protected serverConfig: HTMLServerConfig |
33 | 33 | ||
34 | protected highestPrivacy: VideoPrivacy | 34 | protected highestPrivacy: VideoPrivacyType |
35 | 35 | ||
36 | abstract canDeactivate (): CanComponentDeactivateResult | 36 | abstract canDeactivate (): CanComponentDeactivateResult |
37 | 37 | ||
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts index f7e1872a5..cbf43ee5f 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts | |||
@@ -10,7 +10,7 @@ import { FormReactiveService } from '@app/shared/shared-forms' | |||
10 | import { Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' | 10 | import { Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' |
11 | import { LoadingBarService } from '@ngx-loading-bar/core' | 11 | import { LoadingBarService } from '@ngx-loading-bar/core' |
12 | import { logger } from '@root-helpers/logger' | 12 | import { logger } from '@root-helpers/logger' |
13 | import { HttpStatusCode, VideoCreateResult } from '@shared/models' | 13 | import { HttpStatusCode, VideoCreateResult } from '@peertube/peertube-models' |
14 | import { VideoUploadService } from '../shared/video-upload.service' | 14 | import { VideoUploadService } from '../shared/video-upload.service' |
15 | import { VideoSend } from './video-send' | 15 | import { VideoSend } from './video-send' |
16 | 16 | ||
diff --git a/client/src/app/+videos/+video-edit/video-add.component.ts b/client/src/app/+videos/+video-edit/video-add.component.ts index 460c37a38..413fe4780 100644 --- a/client/src/app/+videos/+video-edit/video-add.component.ts +++ b/client/src/app/+videos/+video-edit/video-add.component.ts | |||
@@ -8,7 +8,7 @@ import { | |||
8 | ServerService, | 8 | ServerService, |
9 | UserService | 9 | UserService |
10 | } from '@app/core' | 10 | } from '@app/core' |
11 | import { HTMLServerConfig } from '@shared/models' | 11 | import { HTMLServerConfig } from '@peertube/peertube-models' |
12 | import { VideoEditType } from './shared/video-edit.type' | 12 | import { VideoEditType } from './shared/video-edit.type' |
13 | import { VideoGoLiveComponent } from './video-add-components/video-go-live.component' | 13 | import { VideoGoLiveComponent } from './video-add-components/video-go-live.component' |
14 | import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component' | 14 | import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component' |
diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts index 6ad08cbad..24d91a69a 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts | |||
@@ -12,9 +12,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
12 | import { Video, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' | 12 | import { Video, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' |
13 | import { LiveVideoService } from '@app/shared/shared-video-live' | 13 | import { LiveVideoService } from '@app/shared/shared-video-live' |
14 | import { LoadingBarService } from '@ngx-loading-bar/core' | 14 | import { LoadingBarService } from '@ngx-loading-bar/core' |
15 | import { pick, simpleObjectsDeepEqual } from '@shared/core-utils' | 15 | import { pick, simpleObjectsDeepEqual } from '@peertube/peertube-core-utils' |
16 | import { HttpStatusCode, LiveVideo, LiveVideoUpdate, VideoPrivacy, VideoState } from '@shared/models' | 16 | import { HttpStatusCode, LiveVideo, LiveVideoUpdate, VideoPrivacy, VideoSource, VideoState } from '@peertube/peertube-models' |
17 | import { VideoSource } from '@shared/models/videos/video-source' | ||
18 | import { hydrateFormFromVideo } from './shared/video-edit-utils' | 17 | import { hydrateFormFromVideo } from './shared/video-edit-utils' |
19 | import { VideoUploadService } from './shared/video-upload.service' | 18 | import { VideoUploadService } from './shared/video-upload.service' |
20 | 19 | ||
diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts index 2c99b36a8..d114bfb2d 100644 --- a/client/src/app/+videos/+video-edit/video-update.resolver.ts +++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts | |||
@@ -4,9 +4,9 @@ import { Injectable } from '@angular/core' | |||
4 | import { ActivatedRouteSnapshot } from '@angular/router' | 4 | import { ActivatedRouteSnapshot } from '@angular/router' |
5 | import { AuthService } from '@app/core' | 5 | import { AuthService } from '@app/core' |
6 | import { listUserChannelsForSelect } from '@app/helpers' | 6 | import { listUserChannelsForSelect } from '@app/helpers' |
7 | import { VideoCaptionService, VideoDetails, VideoService, VideoPasswordService } from '@app/shared/shared-main' | 7 | import { VideoCaptionService, VideoDetails, VideoPasswordService, VideoService } from '@app/shared/shared-main' |
8 | import { LiveVideoService } from '@app/shared/shared-video-live' | 8 | import { LiveVideoService } from '@app/shared/shared-video-live' |
9 | import { VideoPrivacy } from '@shared/models/videos' | 9 | import { VideoPrivacy } from '@peertube/peertube-models' |
10 | 10 | ||
11 | @Injectable() | 11 | @Injectable() |
12 | export class VideoUpdateResolver { | 12 | export class VideoUpdateResolver { |
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts index e6c0d4de1..7c89b7e62 100644 --- a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts +++ b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts | |||
@@ -5,7 +5,7 @@ import { VideoShareComponent } from '@app/shared/shared-share-modal' | |||
5 | import { SupportModalComponent } from '@app/shared/shared-support-modal' | 5 | import { SupportModalComponent } from '@app/shared/shared-support-modal' |
6 | import { VideoActionsDisplayType, VideoDownloadComponent } from '@app/shared/shared-video-miniature' | 6 | import { VideoActionsDisplayType, VideoDownloadComponent } from '@app/shared/shared-video-miniature' |
7 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' | 7 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' |
8 | import { UserVideoRateType, VideoCaption, VideoPrivacy } from '@shared/models/videos' | 8 | import { UserVideoRateType, VideoCaption, VideoPrivacy } from '@peertube/peertube-models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-action-buttons', | 11 | selector: 'my-action-buttons', |
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts index 11966ce34..13a709cb0 100644 --- a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts +++ b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts | |||
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs' | |||
3 | import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core' | 3 | import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core' |
4 | import { Notifier, ScreenService } from '@app/core' | 4 | import { Notifier, ScreenService } from '@app/core' |
5 | import { VideoDetails, VideoService } from '@app/shared/shared-main' | 5 | import { VideoDetails, VideoService } from '@app/shared/shared-main' |
6 | import { UserVideoRateType } from '@shared/models' | 6 | import { UserVideoRateType } from '@peertube/peertube-models' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
9 | selector: 'my-video-rate', | 9 | selector: 'my-video-rate', |
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts index 1d9e10d0a..a01bd31fe 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts | |||
@@ -19,7 +19,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
19 | import { Video } from '@app/shared/shared-main' | 19 | import { Video } from '@app/shared/shared-main' |
20 | import { VideoComment, VideoCommentService } from '@app/shared/shared-video-comment' | 20 | import { VideoComment, VideoCommentService } from '@app/shared/shared-video-comment' |
21 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 21 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
22 | import { VideoCommentCreate } from '@shared/models' | 22 | import { VideoCommentCreate } from '@peertube/peertube-models' |
23 | 23 | ||
24 | @Component({ | 24 | @Component({ |
25 | selector: 'my-video-comment-add', | 25 | selector: 'my-video-comment-add', |
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts index 4c85df657..14422010f 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts | |||
@@ -5,7 +5,7 @@ import { AuthService } from '@app/core/auth' | |||
5 | import { Account, DropdownAction, Video } from '@app/shared/shared-main' | 5 | import { Account, DropdownAction, Video } from '@app/shared/shared-main' |
6 | import { CommentReportComponent } from '@app/shared/shared-moderation/report-modals/comment-report.component' | 6 | import { CommentReportComponent } from '@app/shared/shared-moderation/report-modals/comment-report.component' |
7 | import { VideoComment, VideoCommentThreadTree } from '@app/shared/shared-video-comment' | 7 | import { VideoComment, VideoCommentThreadTree } from '@app/shared/shared-video-comment' |
8 | import { User, UserRight } from '@shared/models' | 8 | import { User, UserRight } from '@peertube/peertube-models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-video-comment', | 11 | selector: 'my-video-comment', |
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts index 848936f91..1a8c89bdc 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts | |||
@@ -5,7 +5,7 @@ import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifie | |||
5 | import { HooksService } from '@app/core/plugins/hooks.service' | 5 | import { HooksService } from '@app/core/plugins/hooks.service' |
6 | import { Syndication, VideoDetails } from '@app/shared/shared-main' | 6 | import { Syndication, VideoDetails } from '@app/shared/shared-main' |
7 | import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/shared/shared-video-comment' | 7 | import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/shared/shared-video-comment' |
8 | import { PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' | 8 | import { PeerTubeProblemDocument, ServerErrorCode } from '@peertube/peertube-models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-video-comments', | 11 | selector: 'my-video-comments', |
diff --git a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts index b51457e02..d2f8aa45d 100644 --- a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts +++ b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, Input, OnInit } from '@angular/core' | |||
2 | import { ServerService, User, UserService } from '@app/core' | 2 | import { ServerService, User, UserService } from '@app/core' |
3 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 3 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
4 | import { isP2PEnabled } from '@root-helpers/video' | 4 | import { isP2PEnabled } from '@root-helpers/video' |
5 | import { HTMLServerConfig, Video } from '@shared/models' | 5 | import { HTMLServerConfig, Video } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-privacy-concerns', | 8 | selector: 'my-privacy-concerns', |
diff --git a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts index 8781ead7e..497c48813 100644 --- a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts +++ b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { AuthUser } from '@app/core' | 2 | import { AuthUser } from '@app/core' |
3 | import { VideoDetails } from '@app/shared/shared-main' | 3 | import { VideoDetails } from '@app/shared/shared-main' |
4 | import { VideoPrivacy, VideoState } from '@shared/models' | 4 | import { VideoPrivacy, VideoState } from '@peertube/peertube-models' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
7 | selector: 'my-video-alert', | 7 | selector: 'my-video-alert', |
diff --git a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts index 97d71a510..eca7cf87c 100644 --- a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts +++ b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts | |||
@@ -5,7 +5,7 @@ import { isInViewport } from '@app/helpers' | |||
5 | import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 5 | import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
6 | import { getBoolOrDefault } from '@root-helpers/local-storage-utils' | 6 | import { getBoolOrDefault } from '@root-helpers/local-storage-utils' |
7 | import { peertubeSessionStorage } from '@root-helpers/peertube-web-storage' | 7 | import { peertubeSessionStorage } from '@root-helpers/peertube-web-storage' |
8 | import { VideoPlaylistPrivacy } from '@shared/models' | 8 | import { VideoPlaylistPrivacy } from '@peertube/peertube-models' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-video-watch-playlist', | 11 | selector: 'my-video-watch-playlist', |
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts index ba0d30f3d..174fd6610 100644 --- a/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts +++ b/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts | |||
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core' | |||
4 | import { ServerService, UserService } from '@app/core' | 4 | import { ServerService, UserService } from '@app/core' |
5 | import { Video, VideoService } from '@app/shared/shared-main' | 5 | import { Video, VideoService } from '@app/shared/shared-main' |
6 | import { AdvancedSearch, SearchService } from '@app/shared/shared-search' | 6 | import { AdvancedSearch, SearchService } from '@app/shared/shared-search' |
7 | import { HTMLServerConfig } from '@shared/models' | 7 | import { HTMLServerConfig } from '@peertube/peertube-models' |
8 | import { RecommendationInfo } from './recommendation-info.model' | 8 | import { RecommendationInfo } from './recommendation-info.model' |
9 | import { RecommendationService } from './recommendations.service' | 9 | import { RecommendationService } from './recommendations.service' |
10 | 10 | ||
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 45de62519..f109427cc 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -22,9 +22,7 @@ import { Video, VideoCaptionService, VideoDetails, VideoFileTokenService, VideoS | |||
22 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' | 22 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' |
23 | import { LiveVideoService } from '@app/shared/shared-video-live' | 23 | import { LiveVideoService } from '@app/shared/shared-video-live' |
24 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 24 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
25 | import { logger } from '@root-helpers/logger' | 25 | import { timeToInt } from '@peertube/peertube-core-utils' |
26 | import { isP2PEnabled, videoRequiresFileToken, videoRequiresUserAuth } from '@root-helpers/video' | ||
27 | import { timeToInt } from '@shared/core-utils' | ||
28 | import { | 26 | import { |
29 | HTMLServerConfig, | 27 | HTMLServerConfig, |
30 | HttpStatusCode, | 28 | HttpStatusCode, |
@@ -34,8 +32,11 @@ import { | |||
34 | Storyboard, | 32 | Storyboard, |
35 | VideoCaption, | 33 | VideoCaption, |
36 | VideoPrivacy, | 34 | VideoPrivacy, |
37 | VideoState | 35 | VideoState, |
38 | } from '@shared/models' | 36 | VideoStateType |
37 | } from '@peertube/peertube-models' | ||
38 | import { logger } from '@root-helpers/logger' | ||
39 | import { isP2PEnabled, videoRequiresFileToken, videoRequiresUserAuth } from '@root-helpers/video' | ||
39 | import { | 40 | import { |
40 | HLSOptions, | 41 | HLSOptions, |
41 | PeerTubePlayer, | 42 | PeerTubePlayer, |
@@ -812,7 +813,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
812 | }) | 813 | }) |
813 | } | 814 | } |
814 | 815 | ||
815 | private handleLiveStateChange (newState: VideoState) { | 816 | private handleLiveStateChange (newState: VideoStateType) { |
816 | if (newState !== VideoState.PUBLISHED) return | 817 | if (newState !== VideoState.PUBLISHED) return |
817 | 818 | ||
818 | logger.info('Loading video after live update.') | 819 | logger.info('Loading video after live update.') |
diff --git a/client/src/app/+videos/video-list/overview/overview.service.ts b/client/src/app/+videos/video-list/overview/overview.service.ts index 67a1adb28..581c6b846 100644 --- a/client/src/app/+videos/video-list/overview/overview.service.ts +++ b/client/src/app/+videos/video-list/overview/overview.service.ts | |||
@@ -5,9 +5,8 @@ import { Injectable } from '@angular/core' | |||
5 | import { RestExtractor, ServerService } from '@app/core' | 5 | import { RestExtractor, ServerService } from '@app/core' |
6 | import { immutableAssign } from '@app/helpers' | 6 | import { immutableAssign } from '@app/helpers' |
7 | import { VideoService } from '@app/shared/shared-main' | 7 | import { VideoService } from '@app/shared/shared-main' |
8 | import { objectKeysTyped } from '@shared/core-utils' | 8 | import { objectKeysTyped, peertubeTranslate } from '@peertube/peertube-core-utils' |
9 | import { peertubeTranslate } from '@shared/core-utils/i18n' | 9 | import { VideosOverview as VideosOverviewServer } from '@peertube/peertube-models' |
10 | import { VideosOverview as VideosOverviewServer } from '@shared/models' | ||
11 | import { environment } from '../../../../environments/environment' | 10 | import { environment } from '../../../../environments/environment' |
12 | import { VideosOverview } from './videos-overview.model' | 11 | import { VideosOverview } from './videos-overview.model' |
13 | 12 | ||
diff --git a/client/src/app/+videos/video-list/overview/videos-overview.model.ts b/client/src/app/+videos/video-list/overview/videos-overview.model.ts index 6765ad9b7..1208d5a00 100644 --- a/client/src/app/+videos/video-list/overview/videos-overview.model.ts +++ b/client/src/app/+videos/video-list/overview/videos-overview.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Video } from '@app/shared/shared-main' | 1 | import { Video } from '@app/shared/shared-main' |
2 | import { VideoChannelSummary, VideoConstant, VideosOverview as VideosOverviewServer } from '@shared/models' | 2 | import { VideoChannelSummary, VideoConstant, VideosOverview as VideosOverviewServer } from '@peertube/peertube-models' |
3 | 3 | ||
4 | export class VideosOverview implements VideosOverviewServer { | 4 | export class VideosOverview implements VideosOverviewServer { |
5 | channels: { | 5 | channels: { |
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 04f02c138..c9926488d 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 | |||
@@ -7,7 +7,7 @@ import { HooksService } from '@app/core/plugins/hooks.service' | |||
7 | import { VideoService } from '@app/shared/shared-main' | 7 | import { VideoService } from '@app/shared/shared-main' |
8 | import { UserSubscriptionService } from '@app/shared/shared-user-subscription' | 8 | import { UserSubscriptionService } from '@app/shared/shared-user-subscription' |
9 | import { VideoFilters } from '@app/shared/shared-video-miniature' | 9 | import { VideoFilters } from '@app/shared/shared-video-miniature' |
10 | import { VideoSortField } from '@shared/models' | 10 | import { VideoSortField } from '@peertube/peertube-models' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
13 | selector: 'my-videos-user-subscriptions', | 13 | selector: 'my-videos-user-subscriptions', |
diff --git a/client/src/app/+videos/video-list/videos-list-common-page.component.ts b/client/src/app/+videos/video-list/videos-list-common-page.component.ts index c8fa8ef30..32954f373 100644 --- a/client/src/app/+videos/video-list/videos-list-common-page.component.ts +++ b/client/src/app/+videos/video-list/videos-list-common-page.component.ts | |||
@@ -4,7 +4,7 @@ import { ComponentPaginationLight, DisableForReuseHook, MetaService, RedirectSer | |||
4 | import { HooksService } from '@app/core/plugins/hooks.service' | 4 | import { HooksService } from '@app/core/plugins/hooks.service' |
5 | import { VideoService } from '@app/shared/shared-main' | 5 | import { VideoService } from '@app/shared/shared-main' |
6 | import { VideoFilters, VideoFilterScope } from '@app/shared/shared-video-miniature/video-filters.model' | 6 | import { VideoFilters, VideoFilterScope } from '@app/shared/shared-video-miniature/video-filters.model' |
7 | import { ClientFilterHookName, VideoSortField } from '@shared/models' | 7 | import { ClientFilterHookName, VideoSortField } from '@peertube/peertube-models' |
8 | import { Subscription } from 'rxjs' | 8 | import { Subscription } from 'rxjs' |
9 | 9 | ||
10 | export type VideosListCommonPageRouteData = { | 10 | export type VideosListCommonPageRouteData = { |
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 40e4ec35d..360524d69 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts | |||
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core' | |||
2 | import { RouteReuseStrategy, RouterModule, Routes, UrlMatchResult, UrlSegment } from '@angular/router' | 2 | import { RouteReuseStrategy, RouterModule, Routes, UrlMatchResult, UrlSegment } from '@angular/router' |
3 | import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' | 3 | import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' |
4 | import { MenuGuards } from '@app/core/routing/menu-guard.service' | 4 | import { MenuGuards } from '@app/core/routing/menu-guard.service' |
5 | import { POSSIBLE_LOCALES } from '@shared/core-utils/i18n' | 5 | import { POSSIBLE_LOCALES } from '@peertube/peertube-core-utils' |
6 | import { HomepageRedirectComponent, MetaGuard, PreloadSelectedModulesList } from './core' | 6 | import { HomepageRedirectComponent, MetaGuard, PreloadSelectedModulesList } from './core' |
7 | import { EmptyComponent } from './empty.component' | 7 | import { EmptyComponent } from './empty.component' |
8 | import { USER_USERNAME_REGEX_CHARACTERS } from './shared/form-validators/user-validators' | 8 | import { USER_USERNAME_REGEX_CHARACTERS } from './shared/form-validators/user-validators' |
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index f6d90cb64..4ad20bfd6 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -25,10 +25,10 @@ import { CustomModalComponent } from '@app/modal/custom-modal.component' | |||
25 | import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' | 25 | import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' |
26 | import { NgbConfig, NgbModal } from '@ng-bootstrap/ng-bootstrap' | 26 | import { NgbConfig, NgbModal } from '@ng-bootstrap/ng-bootstrap' |
27 | import { LoadingBarService } from '@ngx-loading-bar/core' | 27 | import { LoadingBarService } from '@ngx-loading-bar/core' |
28 | import { getShortLocale } from '@peertube/peertube-core-utils' | ||
29 | import { BroadcastMessageLevel, HTMLServerConfig, UserRole } from '@peertube/peertube-models' | ||
28 | import { logger } from '@root-helpers/logger' | 30 | import { logger } from '@root-helpers/logger' |
29 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 31 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
30 | import { getShortLocale } from '@shared/core-utils/i18n' | ||
31 | import { BroadcastMessageLevel, HTMLServerConfig, UserRole } from '@shared/models' | ||
32 | import { MenuService } from './core/menu/menu.service' | 32 | import { MenuService } from './core/menu/menu.service' |
33 | import { POP_STATE_MODAL_DISMISS } from './helpers' | 33 | import { POP_STATE_MODAL_DISMISS } from './helpers' |
34 | import { GlobalIconName } from './shared/shared-icons' | 34 | import { GlobalIconName } from './shared/shared-icons' |
diff --git a/client/src/app/core/auth/auth-user.model.ts b/client/src/app/core/auth/auth-user.model.ts index 226075265..a1e23bfbb 100644 --- a/client/src/app/core/auth/auth-user.model.ts +++ b/client/src/app/core/auth/auth-user.model.ts | |||
@@ -1,16 +1,16 @@ | |||
1 | import { Observable, of } from 'rxjs' | 1 | import { Observable, of } from 'rxjs' |
2 | import { map } from 'rxjs/operators' | 2 | import { map } from 'rxjs/operators' |
3 | import { User } from '@app/core/users/user.model' | 3 | import { User } from '@app/core/users/user.model' |
4 | import { OAuthUserTokens } from '@root-helpers/users' | 4 | import { hasUserRight } from '@peertube/peertube-core-utils' |
5 | import { hasUserRight } from '@shared/core-utils/users' | ||
6 | import { | 5 | import { |
7 | MyUser as ServerMyUserModel, | 6 | MyUser as ServerMyUserModel, |
8 | MyUserSpecialPlaylist, | 7 | MyUserSpecialPlaylist, |
9 | User as ServerUserModel, | 8 | User as ServerUserModel, |
10 | UserRight, | 9 | UserRightType, |
11 | UserRole, | 10 | UserRole, |
12 | UserVideoQuota | 11 | UserVideoQuota |
13 | } from '@shared/models' | 12 | } from '@peertube/peertube-models' |
13 | import { OAuthUserTokens } from '@root-helpers/users' | ||
14 | 14 | ||
15 | export class AuthUser extends User implements ServerMyUserModel { | 15 | export class AuthUser extends User implements ServerMyUserModel { |
16 | oauthTokens: OAuthUserTokens | 16 | oauthTokens: OAuthUserTokens |
@@ -42,7 +42,7 @@ export class AuthUser extends User implements ServerMyUserModel { | |||
42 | this.oauthTokens.refreshToken = refreshToken | 42 | this.oauthTokens.refreshToken = refreshToken |
43 | } | 43 | } |
44 | 44 | ||
45 | hasRight (right: UserRight) { | 45 | hasRight (right: UserRightType) { |
46 | return hasUserRight(this.role.id, right) | 46 | return hasUserRight(this.role.id, right) |
47 | } | 47 | } |
48 | 48 | ||
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 6fe601d8d..bc67ab7a0 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts | |||
@@ -6,7 +6,7 @@ import { Injectable } from '@angular/core' | |||
6 | import { Router } from '@angular/router' | 6 | import { Router } from '@angular/router' |
7 | import { Notifier } from '@app/core/notification/notifier.service' | 7 | import { Notifier } from '@app/core/notification/notifier.service' |
8 | import { logger, OAuthUserTokens, objectToUrlEncoded, peertubeLocalStorage } from '@root-helpers/index' | 8 | import { logger, OAuthUserTokens, objectToUrlEncoded, peertubeLocalStorage } from '@root-helpers/index' |
9 | import { HttpStatusCode, MyUser as UserServerModel, OAuthClientLocal, User, UserLogin, UserRefreshToken } from '@shared/models' | 9 | import { HttpStatusCode, MyUser as UserServerModel, OAuthClientLocal, User, UserLogin, UserRefreshToken } from '@peertube/peertube-models' |
10 | import { environment } from '../../../environments/environment' | 10 | import { environment } from '../../../environments/environment' |
11 | import { RestExtractor } from '../rest/rest-extractor.service' | 11 | import { RestExtractor } from '../rest/rest-extractor.service' |
12 | import { RedirectService } from '../routing' | 12 | import { RedirectService } from '../routing' |
diff --git a/client/src/app/core/menu/menu.service.ts b/client/src/app/core/menu/menu.service.ts index d865c7da2..39e89f6e3 100644 --- a/client/src/app/core/menu/menu.service.ts +++ b/client/src/app/core/menu/menu.service.ts | |||
@@ -2,7 +2,7 @@ import { fromEvent } from 'rxjs' | |||
2 | import { debounceTime } from 'rxjs/operators' | 2 | import { debounceTime } from 'rxjs/operators' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { GlobalIconName } from '@app/shared/shared-icons' | 4 | import { GlobalIconName } from '@app/shared/shared-icons' |
5 | import { HTMLServerConfig } from '@shared/models/server' | 5 | import { HTMLServerConfig } from '@peertube/peertube-models' |
6 | import { ScreenService } from '../wrappers' | 6 | import { ScreenService } from '../wrappers' |
7 | 7 | ||
8 | export type MenuLink = { | 8 | export type MenuLink = { |
diff --git a/client/src/app/core/notification/peertube-socket.service.ts b/client/src/app/core/notification/peertube-socket.service.ts index 50a11e948..15af9a310 100644 --- a/client/src/app/core/notification/peertube-socket.service.ts +++ b/client/src/app/core/notification/peertube-socket.service.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Subject } from 'rxjs' | 1 | import { Subject } from 'rxjs' |
2 | import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client' | 2 | import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' | 4 | import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@peertube/peertube-models' |
5 | import { environment } from '../../../environments/environment' | 5 | import { environment } from '../../../environments/environment' |
6 | import { AuthService } from '../auth' | 6 | import { AuthService } from '../auth' |
7 | 7 | ||
diff --git a/client/src/app/core/plugins/hooks.service.ts b/client/src/app/core/plugins/hooks.service.ts index d9fef8389..59c627c05 100644 --- a/client/src/app/core/plugins/hooks.service.ts +++ b/client/src/app/core/plugins/hooks.service.ts | |||
@@ -3,7 +3,7 @@ import { mergeMap, switchMap } from 'rxjs/operators' | |||
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { PluginService } from '@app/core/plugins/plugin.service' | 4 | import { PluginService } from '@app/core/plugins/plugin.service' |
5 | import { logger } from '@root-helpers/logger' | 5 | import { logger } from '@root-helpers/logger' |
6 | import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@shared/models' | 6 | import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@peertube/peertube-models' |
7 | import { AuthService, AuthStatus } from '../auth' | 7 | import { AuthService, AuthStatus } from '../auth' |
8 | 8 | ||
9 | type RawFunction<U, T> = (params: U) => T | 9 | type RawFunction<U, T> = (params: U) => T |
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index bd8c61d9a..d37b2e5f7 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts | |||
@@ -10,22 +10,22 @@ import { RestExtractor } from '@app/core/rest' | |||
10 | import { ServerService } from '@app/core/server/server.service' | 10 | import { ServerService } from '@app/core/server/server.service' |
11 | import { getDevLocale, isOnDevLocale } from '@app/helpers' | 11 | import { getDevLocale, isOnDevLocale } from '@app/helpers' |
12 | import { CustomModalComponent } from '@app/modal/custom-modal.component' | 12 | import { CustomModalComponent } from '@app/modal/custom-modal.component' |
13 | import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' | 13 | import { getCompleteLocale, getKeys, isDefaultLocale, peertubeTranslate } from '@peertube/peertube-core-utils' |
14 | import { getKeys } from '@shared/core-utils' | ||
15 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' | ||
16 | import { | 14 | import { |
17 | ClientHook, | 15 | ClientHook, |
18 | ClientHookName, | 16 | ClientHookName, |
19 | PluginClientScope, | 17 | PluginClientScope, |
20 | PluginTranslation, | 18 | PluginTranslation, |
21 | PluginType, | 19 | PluginType, |
20 | PluginType_Type, | ||
22 | PublicServerSetting, | 21 | PublicServerSetting, |
23 | RegisterClientFormFieldOptions, | 22 | RegisterClientFormFieldOptions, |
24 | RegisterClientRouteOptions, | 23 | RegisterClientRouteOptions, |
25 | RegisterClientSettingsScriptOptions, | 24 | RegisterClientSettingsScriptOptions, |
26 | RegisterClientVideoFieldOptions, | 25 | RegisterClientVideoFieldOptions, |
27 | ServerConfigPlugin | 26 | ServerConfigPlugin |
28 | } from '@shared/models' | 27 | } from '@peertube/peertube-models' |
28 | import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' | ||
29 | import { environment } from '../../../environments/environment' | 29 | import { environment } from '../../../environments/environment' |
30 | import { RegisterClientHelpers } from '../../../types/register-client-option.model' | 30 | import { RegisterClientHelpers } from '../../../types/register-client-option.model' |
31 | 31 | ||
@@ -110,7 +110,7 @@ export class PluginService implements ClientHook { | |||
110 | return this.pluginsManager.removePlugin(plugin) | 110 | return this.pluginsManager.removePlugin(plugin) |
111 | } | 111 | } |
112 | 112 | ||
113 | nameToNpmName (name: string, type: PluginType) { | 113 | nameToNpmName (name: string, type: PluginType_Type) { |
114 | const prefix = type === PluginType.PLUGIN | 114 | const prefix = type === PluginType.PLUGIN |
115 | ? 'peertube-plugin-' | 115 | ? 'peertube-plugin-' |
116 | : 'peertube-theme-' | 116 | : 'peertube-theme-' |
diff --git a/client/src/app/core/renderer/html-renderer.service.ts b/client/src/app/core/renderer/html-renderer.service.ts index 7776ccad5..37741c079 100644 --- a/client/src/app/core/renderer/html-renderer.service.ts +++ b/client/src/app/core/renderer/html-renderer.service.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { getCustomMarkupSanitizeOptions, getDefaultSanitizeOptions } from '@shared/core-utils/renderer/html' | 2 | import { getCustomMarkupSanitizeOptions, getDefaultSanitizeOptions } from '@peertube/peertube-core-utils' |
3 | import { LinkifierService } from './linkifier.service' | 3 | import { LinkifierService } from './linkifier.service' |
4 | 4 | ||
5 | @Injectable() | 5 | @Injectable() |
diff --git a/client/src/app/core/renderer/markdown.service.ts b/client/src/app/core/renderer/markdown.service.ts index ec3b683bb..907b92232 100644 --- a/client/src/app/core/renderer/markdown.service.ts +++ b/client/src/app/core/renderer/markdown.service.ts | |||
@@ -1,13 +1,14 @@ | |||
1 | import * as MarkdownIt from 'markdown-it' | 1 | import * as MarkdownIt from 'markdown-it' |
2 | import { Injectable } from '@angular/core' | 2 | import { Injectable } from '@angular/core' |
3 | import { buildVideoLink, decorateVideoLink } from '@shared/core-utils' | ||
4 | import { | 3 | import { |
4 | buildVideoLink, | ||
5 | COMPLETE_RULES, | 5 | COMPLETE_RULES, |
6 | decorateVideoLink, | ||
6 | ENHANCED_RULES, | 7 | ENHANCED_RULES, |
7 | ENHANCED_WITH_HTML_RULES, | 8 | ENHANCED_WITH_HTML_RULES, |
8 | TEXT_RULES, | 9 | TEXT_RULES, |
9 | TEXT_WITH_HTML_RULES | 10 | TEXT_WITH_HTML_RULES |
10 | } from '@shared/core-utils/renderer/markdown' | 11 | } from '@peertube/peertube-core-utils' |
11 | import { HtmlRendererService } from './html-renderer.service' | 12 | import { HtmlRendererService } from './html-renderer.service' |
12 | 13 | ||
13 | type MarkdownParsers = { | 14 | type MarkdownParsers = { |
diff --git a/client/src/app/core/rest/rest-extractor.service.ts b/client/src/app/core/rest/rest-extractor.service.ts index c6c1e183f..bcc50c0f4 100644 --- a/client/src/app/core/rest/rest-extractor.service.ts +++ b/client/src/app/core/rest/rest-extractor.service.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { throwError as observableThrowError } from 'rxjs' | 1 | import { throwError as observableThrowError } from 'rxjs' |
2 | import { HttpHeaderResponse } from '@angular/common/http' | ||
2 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' | 3 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' |
3 | import { Router } from '@angular/router' | 4 | import { Router } from '@angular/router' |
4 | import { DateFormat, dateToHuman } from '@app/helpers' | 5 | import { DateFormat, dateToHuman } from '@app/helpers' |
6 | import { HttpStatusCode, HttpStatusCodeType, ResultList } from '@peertube/peertube-models' | ||
5 | import { logger } from '@root-helpers/logger' | 7 | import { logger } from '@root-helpers/logger' |
6 | import { HttpStatusCode, ResultList } from '@shared/models' | ||
7 | import { HttpHeaderResponse } from '@angular/common/http' | ||
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
10 | export class RestExtractor { | 10 | export class RestExtractor { |
@@ -45,7 +45,11 @@ export class RestExtractor { | |||
45 | return target | 45 | return target |
46 | } | 46 | } |
47 | 47 | ||
48 | redirectTo404IfNotFound (obj: { status: number }, type: 'video' | 'other', status = [ HttpStatusCode.NOT_FOUND_404 ]) { | 48 | redirectTo404IfNotFound ( |
49 | obj: { status: HttpStatusCodeType }, | ||
50 | type: 'video' | 'other', | ||
51 | status: HttpStatusCodeType[] = [ HttpStatusCode.NOT_FOUND_404 ] | ||
52 | ) { | ||
49 | if (obj?.status && status.includes(obj.status)) { | 53 | if (obj?.status && status.includes(obj.status)) { |
50 | // Do not use redirectService to avoid circular dependencies | 54 | // Do not use redirectService to avoid circular dependencies |
51 | this.router.navigate([ '/404' ], { state: { type, obj }, skipLocationChange: true }) | 55 | this.router.navigate([ '/404' ], { state: { type, obj }, skipLocationChange: true }) |
diff --git a/client/src/app/core/routing/homepage-redirect.component.ts b/client/src/app/core/routing/homepage-redirect.component.ts index 9e3848038..e9be832e0 100644 --- a/client/src/app/core/routing/homepage-redirect.component.ts +++ b/client/src/app/core/routing/homepage-redirect.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | 2 | import { ActivatedRoute } from '@angular/router' |
3 | import { is18nPath } from '@shared/core-utils/i18n/i18n' | 3 | import { is18nPath } from '@peertube/peertube-core-utils' |
4 | import { RedirectService } from './redirect.service' | 4 | import { RedirectService } from './redirect.service' |
5 | 5 | ||
6 | /* | 6 | /* |
diff --git a/client/src/app/core/routing/meta.service.ts b/client/src/app/core/routing/meta.service.ts index 97e440faf..d50f0d65a 100644 --- a/client/src/app/core/routing/meta.service.ts +++ b/client/src/app/core/routing/meta.service.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { Meta, Title } from '@angular/platform-browser' | 2 | import { Meta, Title } from '@angular/platform-browser' |
3 | import { HTMLServerConfig } from '@shared/models/server' | 3 | import { HTMLServerConfig } from '@peertube/peertube-models' |
4 | import { ServerService } from '../server' | 4 | import { ServerService } from '../server' |
5 | 5 | ||
6 | export interface MetaSettings { | 6 | export interface MetaSettings { |
diff --git a/client/src/app/core/scoped-tokens/scoped-tokens.service.ts b/client/src/app/core/scoped-tokens/scoped-tokens.service.ts index 038e5031c..f7d192feb 100644 --- a/client/src/app/core/scoped-tokens/scoped-tokens.service.ts +++ b/client/src/app/core/scoped-tokens/scoped-tokens.service.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { catchError } from 'rxjs/operators' | 1 | import { catchError } from 'rxjs/operators' |
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { ScopedToken } from '@shared/models/users/user-scoped-token' | 4 | import { ScopedToken } from '@peertube/peertube-models' |
5 | import { environment } from '../../../environments/environment' | 5 | import { environment } from '../../../environments/environment' |
6 | import { RestExtractor } from '../rest' | 6 | import { RestExtractor } from '../rest' |
7 | 7 | ||
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index 41cb4791a..75ac8ddc1 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -3,9 +3,16 @@ import { first, map, share, shareReplay, switchMap, tap } from 'rxjs/operators' | |||
3 | import { HttpClient } from '@angular/common/http' | 3 | import { HttpClient } from '@angular/common/http' |
4 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' | 4 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' |
5 | import { getDevLocale, isOnDevLocale } from '@app/helpers' | 5 | import { getDevLocale, isOnDevLocale } from '@app/helpers' |
6 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@peertube/peertube-core-utils' | ||
7 | import { | ||
8 | HTMLServerConfig, | ||
9 | ServerConfig, | ||
10 | ServerStats, | ||
11 | VideoConstant, | ||
12 | VideoPlaylistPrivacyType, | ||
13 | VideoPrivacyType | ||
14 | } from '@peertube/peertube-models' | ||
6 | import { logger } from '@root-helpers/logger' | 15 | import { logger } from '@root-helpers/logger' |
7 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' | ||
8 | import { HTMLServerConfig, ServerConfig, ServerStats, VideoConstant } from '@shared/models' | ||
9 | import { environment } from '../../../environments/environment' | 16 | import { environment } from '../../../environments/environment' |
10 | 17 | ||
11 | @Injectable() | 18 | @Injectable() |
@@ -21,8 +28,8 @@ export class ServerService { | |||
21 | private localeObservable: Observable<any> | 28 | private localeObservable: Observable<any> |
22 | private videoLicensesObservable: Observable<VideoConstant<number>[]> | 29 | private videoLicensesObservable: Observable<VideoConstant<number>[]> |
23 | private videoCategoriesObservable: Observable<VideoConstant<number>[]> | 30 | private videoCategoriesObservable: Observable<VideoConstant<number>[]> |
24 | private videoPrivaciesObservable: Observable<VideoConstant<number>[]> | 31 | private videoPrivaciesObservable: Observable<VideoConstant<VideoPrivacyType>[]> |
25 | private videoPlaylistPrivaciesObservable: Observable<VideoConstant<number>[]> | 32 | private videoPlaylistPrivaciesObservable: Observable<VideoConstant<VideoPlaylistPrivacyType>[]> |
26 | private videoLanguagesObservable: Observable<VideoConstant<string>[]> | 33 | private videoLanguagesObservable: Observable<VideoConstant<string>[]> |
27 | private configObservable: Observable<ServerConfig> | 34 | private configObservable: Observable<ServerConfig> |
28 | 35 | ||
@@ -123,7 +130,7 @@ export class ServerService { | |||
123 | 130 | ||
124 | getVideoPrivacies () { | 131 | getVideoPrivacies () { |
125 | if (!this.videoPrivaciesObservable) { | 132 | if (!this.videoPrivaciesObservable) { |
126 | this.videoPrivaciesObservable = this.loadAttributeEnum<number>(ServerService.BASE_VIDEO_URL, 'privacies') | 133 | this.videoPrivaciesObservable = this.loadAttributeEnum<VideoPrivacyType>(ServerService.BASE_VIDEO_URL, 'privacies') |
127 | } | 134 | } |
128 | 135 | ||
129 | return this.videoPrivaciesObservable.pipe(first()) | 136 | return this.videoPrivaciesObservable.pipe(first()) |
@@ -131,7 +138,10 @@ export class ServerService { | |||
131 | 138 | ||
132 | getVideoPlaylistPrivacies () { | 139 | getVideoPlaylistPrivacies () { |
133 | if (!this.videoPlaylistPrivaciesObservable) { | 140 | if (!this.videoPlaylistPrivaciesObservable) { |
134 | this.videoPlaylistPrivaciesObservable = this.loadAttributeEnum<number>(ServerService.BASE_VIDEO_PLAYLIST_URL, 'privacies') | 141 | this.videoPlaylistPrivaciesObservable = this.loadAttributeEnum<VideoPlaylistPrivacyType>( |
142 | ServerService.BASE_VIDEO_PLAYLIST_URL, | ||
143 | 'privacies' | ||
144 | ) | ||
135 | } | 145 | } |
136 | 146 | ||
137 | return this.videoPlaylistPrivaciesObservable.pipe(first()) | 147 | return this.videoPlaylistPrivaciesObservable.pipe(first()) |
diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts index ead1770ba..22eb5ddd3 100644 --- a/client/src/app/core/theme/theme.service.ts +++ b/client/src/app/core/theme/theme.service.ts | |||
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core' | |||
2 | import { logger } from '@root-helpers/logger' | 2 | import { logger } from '@root-helpers/logger' |
3 | import { capitalizeFirstLetter } from '@root-helpers/string' | 3 | import { capitalizeFirstLetter } from '@root-helpers/string' |
4 | import { UserLocalStorageKeys } from '@root-helpers/users' | 4 | import { UserLocalStorageKeys } from '@root-helpers/users' |
5 | import { HTMLServerConfig, ServerConfigTheme } from '@shared/models' | 5 | import { HTMLServerConfig, ServerConfigTheme } from '@peertube/peertube-models' |
6 | import { environment } from '../../../environments/environment' | 6 | import { environment } from '../../../environments/environment' |
7 | import { AuthService } from '../auth' | 7 | import { AuthService } from '../auth' |
8 | import { PluginService } from '../plugins/plugin.service' | 8 | import { PluginService } from '../plugins/plugin.service' |
diff --git a/client/src/app/core/users/user-local-storage.service.ts b/client/src/app/core/users/user-local-storage.service.ts index a87f3b98a..431a57343 100644 --- a/client/src/app/core/users/user-local-storage.service.ts +++ b/client/src/app/core/users/user-local-storage.service.ts | |||
@@ -1,13 +1,11 @@ | |||
1 | |||
2 | import { filter, throttleTime } from 'rxjs' | 1 | import { filter, throttleTime } from 'rxjs' |
3 | import { Injectable } from '@angular/core' | 2 | import { Injectable } from '@angular/core' |
4 | import { AuthService, AuthStatus } from '@app/core/auth' | 3 | import { AuthService, AuthStatus } from '@app/core/auth' |
4 | import { objectKeysTyped } from '@peertube/peertube-core-utils' | ||
5 | import { NSFWPolicyType, UserRoleType, UserUpdateMe } from '@peertube/peertube-models' | ||
5 | import { getBoolOrDefault } from '@root-helpers/local-storage-utils' | 6 | import { getBoolOrDefault } from '@root-helpers/local-storage-utils' |
6 | import { logger } from '@root-helpers/logger' | 7 | import { logger } from '@root-helpers/logger' |
7 | import { OAuthUserTokens, UserLocalStorageKeys } from '@root-helpers/users' | 8 | import { OAuthUserTokens, UserLocalStorageKeys } from '@root-helpers/users' |
8 | import { objectKeysTyped } from '@shared/core-utils' | ||
9 | import { UserRole, UserUpdateMe } from '@shared/models' | ||
10 | import { NSFWPolicyType } from '@shared/models/videos' | ||
11 | import { ServerService } from '../server' | 9 | import { ServerService } from '../server' |
12 | import { LocalStorageService } from '../wrappers/storage.service' | 10 | import { LocalStorageService } from '../wrappers/storage.service' |
13 | 11 | ||
@@ -61,7 +59,7 @@ export class UserLocalStorageService { | |||
61 | username: this.localStorageService.getItem(UserLocalStorageKeys.USERNAME), | 59 | username: this.localStorageService.getItem(UserLocalStorageKeys.USERNAME), |
62 | email: this.localStorageService.getItem(UserLocalStorageKeys.EMAIL), | 60 | email: this.localStorageService.getItem(UserLocalStorageKeys.EMAIL), |
63 | role: { | 61 | role: { |
64 | id: parseInt(this.localStorageService.getItem(UserLocalStorageKeys.ROLE), 10) as UserRole, | 62 | id: parseInt(this.localStorageService.getItem(UserLocalStorageKeys.ROLE), 10) as UserRoleType, |
65 | label: '' | 63 | label: '' |
66 | }, | 64 | }, |
67 | 65 | ||
@@ -74,7 +72,7 @@ export class UserLocalStorageService { | |||
74 | username: string | 72 | username: string |
75 | email: string | 73 | email: string |
76 | role: { | 74 | role: { |
77 | id: UserRole | 75 | id: UserRoleType |
78 | } | 76 | } |
79 | }) { | 77 | }) { |
80 | this.localStorageService.setItem(UserLocalStorageKeys.ID, user.id.toString()) | 78 | this.localStorageService.setItem(UserLocalStorageKeys.ID, user.id.toString()) |
diff --git a/client/src/app/core/users/user.model.ts b/client/src/app/core/users/user.model.ts index 54b749a4c..ffc7c2b44 100644 --- a/client/src/app/core/users/user.model.ts +++ b/client/src/app/core/users/user.model.ts | |||
@@ -1,17 +1,18 @@ | |||
1 | import { Account } from '@app/shared/shared-main/account/account.model' | 1 | import { Account } from '@app/shared/shared-main/account/account.model' |
2 | import { objectKeysTyped } from '@shared/core-utils' | 2 | import { hasUserRight, objectKeysTyped } from '@peertube/peertube-core-utils' |
3 | import { hasUserRight } from '@shared/core-utils/users' | ||
4 | import { | 3 | import { |
5 | ActorImage, | 4 | ActorImage, |
6 | HTMLServerConfig, | 5 | HTMLServerConfig, |
7 | NSFWPolicyType, | 6 | NSFWPolicyType, |
8 | User as UserServerModel, | 7 | User as UserServerModel, |
9 | UserAdminFlag, | 8 | UserAdminFlag, |
9 | UserAdminFlagType, | ||
10 | UserNotificationSetting, | 10 | UserNotificationSetting, |
11 | UserRight, | 11 | UserRightType, |
12 | UserRole, | 12 | UserRole, |
13 | UserRoleType, | ||
13 | VideoChannel | 14 | VideoChannel |
14 | } from '@shared/models' | 15 | } from '@peertube/peertube-models' |
15 | 16 | ||
16 | export class User implements UserServerModel { | 17 | export class User implements UserServerModel { |
17 | id: number | 18 | id: number |
@@ -23,7 +24,7 @@ export class User implements UserServerModel { | |||
23 | emailPublic: boolean | 24 | emailPublic: boolean |
24 | nsfwPolicy: NSFWPolicyType | 25 | nsfwPolicy: NSFWPolicyType |
25 | 26 | ||
26 | adminFlags?: UserAdminFlag | 27 | adminFlags?: UserAdminFlagType |
27 | 28 | ||
28 | autoPlayVideo: boolean | 29 | autoPlayVideo: boolean |
29 | autoPlayNextVideo: boolean | 30 | autoPlayNextVideo: boolean |
@@ -35,7 +36,7 @@ export class User implements UserServerModel { | |||
35 | videoLanguages: string[] | 36 | videoLanguages: string[] |
36 | 37 | ||
37 | role: { | 38 | role: { |
38 | id: UserRole | 39 | id: UserRoleType |
39 | label: string | 40 | label: string |
40 | } | 41 | } |
41 | 42 | ||
@@ -124,7 +125,7 @@ export class User implements UserServerModel { | |||
124 | } | 125 | } |
125 | } | 126 | } |
126 | 127 | ||
127 | hasRight (right: UserRight) { | 128 | hasRight (right: UserRightType) { |
128 | return hasUserRight(this.role.id, right) | 129 | return hasUserRight(this.role.id, right) |
129 | } | 130 | } |
130 | 131 | ||
diff --git a/client/src/app/core/users/user.service.ts b/client/src/app/core/users/user.service.ts index b4024c02d..7ad0ee9bf 100644 --- a/client/src/app/core/users/user.service.ts +++ b/client/src/app/core/users/user.service.ts | |||
@@ -3,7 +3,7 @@ import { catchError, first, map, shareReplay } from 'rxjs/operators' | |||
3 | import { HttpClient, HttpParams } from '@angular/common/http' | 3 | import { HttpClient, HttpParams } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { AuthService } from '@app/core/auth' | 5 | import { AuthService } from '@app/core/auth' |
6 | import { ActorImage, User as UserServerModel, UserUpdateMe, UserVideoQuota } from '@shared/models' | 6 | import { ActorImage, User as UserServerModel, UserUpdateMe, UserVideoQuota } from '@peertube/peertube-models' |
7 | import { environment } from '../../../environments/environment' | 7 | import { environment } from '../../../environments/environment' |
8 | import { RestExtractor } from '../rest' | 8 | import { RestExtractor } from '../rest' |
9 | import { UserLocalStorageService } from './user-local-storage.service' | 9 | import { UserLocalStorageService } from './user-local-storage.service' |
diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.ts index d2549315c..a3a04041f 100644 --- a/client/src/app/header/search-typeahead.component.ts +++ b/client/src/app/header/search-typeahead.component.ts | |||
@@ -5,7 +5,7 @@ import { AfterViewChecked, Component, OnDestroy, OnInit, QueryList, ViewChildren | |||
5 | import { ActivatedRoute, Params, Router } from '@angular/router' | 5 | import { ActivatedRoute, Params, Router } from '@angular/router' |
6 | import { AuthService, ServerService } from '@app/core' | 6 | import { AuthService, ServerService } from '@app/core' |
7 | import { logger } from '@root-helpers/logger' | 7 | import { logger } from '@root-helpers/logger' |
8 | import { HTMLServerConfig, SearchTargetType } from '@shared/models' | 8 | import { HTMLServerConfig, SearchTargetType } from '@peertube/peertube-models' |
9 | import { SuggestionComponent, SuggestionPayload, SuggestionPayloadType } from './suggestion.component' | 9 | import { SuggestionComponent, SuggestionPayload, SuggestionPayloadType } from './suggestion.component' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
diff --git a/client/src/app/helpers/utils/channel.ts b/client/src/app/helpers/utils/channel.ts index 83f36b70f..fe59ea567 100644 --- a/client/src/app/helpers/utils/channel.ts +++ b/client/src/app/helpers/utils/channel.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { minBy } from 'lodash-es' | 1 | import { minBy } from 'lodash-es' |
2 | import { first, map } from 'rxjs/operators' | 2 | import { first, map } from 'rxjs/operators' |
3 | import { SelectChannelItem } from 'src/types/select-options-item.model' | 3 | import { SelectChannelItem } from 'src/types/select-options-item.model' |
4 | import { VideoChannel } from '@shared/models' | 4 | import { VideoChannel } from '@peertube/peertube-models' |
5 | import { AuthService } from '../../core/auth' | 5 | import { AuthService } from '../../core/auth' |
6 | 6 | ||
7 | function listUserChannelsForSelect (authService: AuthService) { | 7 | function listUserChannelsForSelect (authService: AuthService) { |
diff --git a/client/src/app/helpers/utils/upload.ts b/client/src/app/helpers/utils/upload.ts index b60951612..b55415064 100644 --- a/client/src/app/helpers/utils/upload.ts +++ b/client/src/app/helpers/utils/upload.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { HttpErrorResponse } from '@angular/common/http' | 1 | import { HttpErrorResponse } from '@angular/common/http' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { HttpStatusCode } from '@shared/models' | 3 | import { HttpStatusCode } from '@peertube/peertube-models' |
4 | 4 | ||
5 | function genericUploadErrorHandler (options: { | 5 | function genericUploadErrorHandler (options: { |
6 | err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'> | 6 | err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'> |
diff --git a/client/src/app/menu/language-chooser.component.ts b/client/src/app/menu/language-chooser.component.ts index f7ae69717..1ec5987c2 100644 --- a/client/src/app/menu/language-chooser.component.ts +++ b/client/src/app/menu/language-chooser.component.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import { Component, ElementRef, Inject, LOCALE_ID, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, Inject, LOCALE_ID, ViewChild } from '@angular/core' |
2 | import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers' | 2 | import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers' |
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
4 | import { objectKeysTyped } from '@shared/core-utils' | 4 | import { getCompleteLocale, getShortLocale, I18N_LOCALES, objectKeysTyped } from '@peertube/peertube-core-utils' |
5 | import { getCompleteLocale, getShortLocale, I18N_LOCALES } from '@shared/core-utils/i18n' | ||
6 | 5 | ||
7 | @Component({ | 6 | @Component({ |
8 | selector: 'my-language-chooser', | 7 | selector: 'my-language-chooser', |
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 410abe6fa..6d309f15a 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts | |||
@@ -22,7 +22,7 @@ import { LanguageChooserComponent } from '@app/menu/language-chooser.component' | |||
22 | import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' | 22 | import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' |
23 | import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service' | 23 | import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service' |
24 | import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' | 24 | import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' |
25 | import { HTMLServerConfig, ServerConfig, UserRight, VideoConstant } from '@shared/models' | 25 | import { HTMLServerConfig, ServerConfig, UserRight, UserRightType, VideoConstant } from '@peertube/peertube-models' |
26 | 26 | ||
27 | const debugLogger = debug('peertube:menu:MenuComponent') | 27 | const debugLogger = debug('peertube:menu:MenuComponent') |
28 | 28 | ||
@@ -54,7 +54,7 @@ export class MenuComponent implements OnInit, OnDestroy { | |||
54 | private htmlServerConfig: HTMLServerConfig | 54 | private htmlServerConfig: HTMLServerConfig |
55 | private serverConfig: ServerConfig | 55 | private serverConfig: ServerConfig |
56 | 56 | ||
57 | private routesPerRight: { [role in UserRight]?: string } = { | 57 | private routesPerRight: { [role in UserRightType]?: string } = { |
58 | [UserRight.MANAGE_USERS]: '/admin/users', | 58 | [UserRight.MANAGE_USERS]: '/admin/users', |
59 | [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', | 59 | [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', |
60 | [UserRight.MANAGE_ABUSES]: '/admin/moderation/abuses', | 60 | [UserRight.MANAGE_ABUSES]: '/admin/moderation/abuses', |
diff --git a/client/src/app/modal/instance-config-warning-modal.component.ts b/client/src/app/modal/instance-config-warning-modal.component.ts index 23c2c777e..f8ab155ae 100644 --- a/client/src/app/modal/instance-config-warning-modal.component.ts +++ b/client/src/app/modal/instance-config-warning-modal.component.ts | |||
@@ -2,9 +2,9 @@ import { Location } from '@angular/common' | |||
2 | import { Component, ElementRef, ViewChild } from '@angular/core' | 2 | import { Component, ElementRef, ViewChild } from '@angular/core' |
3 | import { Notifier, User, UserService } from '@app/core' | 3 | import { Notifier, User, UserService } from '@app/core' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { About, ServerConfig } from '@peertube/peertube-models' | ||
5 | import { logger } from '@root-helpers/logger' | 6 | import { logger } from '@root-helpers/logger' |
6 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 7 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
7 | import { About, ServerConfig } from '@shared/models/server' | ||
8 | 8 | ||
9 | @Component({ | 9 | @Component({ |
10 | selector: 'my-instance-config-warning-modal', | 10 | selector: 'my-instance-config-warning-modal', |
diff --git a/client/src/app/shared/form-validators/video-playlist-validators.ts b/client/src/app/shared/form-validators/video-playlist-validators.ts index 63af637a3..3cddcaad2 100644 --- a/client/src/app/shared/form-validators/video-playlist-validators.ts +++ b/client/src/app/shared/form-validators/video-playlist-validators.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Validators, AbstractControl } from '@angular/forms' | 1 | import { Validators, AbstractControl } from '@angular/forms' |
2 | import { BuildFormValidator } from './form-validator.model' | 2 | import { BuildFormValidator } from './form-validator.model' |
3 | import { VideoPlaylistPrivacy } from '@shared/models' | 3 | import { VideoPlaylistPrivacy, VideoPlaylistPrivacyType } from '@peertube/peertube-models' |
4 | 4 | ||
5 | export const VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR: BuildFormValidator = { | 5 | export const VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR: BuildFormValidator = { |
6 | VALIDATORS: [ | 6 | VALIDATORS: [ |
@@ -42,7 +42,7 @@ export const VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR: BuildFormValidator = { | |||
42 | } | 42 | } |
43 | } | 43 | } |
44 | 44 | ||
45 | export function setPlaylistChannelValidator (channelControl: AbstractControl, privacy: VideoPlaylistPrivacy) { | 45 | export function setPlaylistChannelValidator (channelControl: AbstractControl, privacy: VideoPlaylistPrivacyType) { |
46 | if (privacy.toString() === VideoPlaylistPrivacy.PUBLIC.toString()) { | 46 | if (privacy.toString() === VideoPlaylistPrivacy.PUBLIC.toString()) { |
47 | channelControl.setValidators([ Validators.required ]) | 47 | channelControl.setValidators([ Validators.required ]) |
48 | } else { | 48 | } else { |
diff --git a/client/src/app/shared/shared-abuse-list/abuse-details.component.ts b/client/src/app/shared/shared-abuse-list/abuse-details.component.ts index e15edf8c2..357dc4522 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-details.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-details.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, Input, OnInit } from '@angular/core' |
2 | import { durationToString } from '@app/helpers' | 2 | import { durationToString } from '@app/helpers' |
3 | import { AbusePredefinedReasonsString } from '@shared/models' | 3 | import { AbusePredefinedReasonsString } from '@peertube/peertube-models' |
4 | import { ProcessedAbuse } from './processed-abuse.model' | 4 | import { ProcessedAbuse } from './processed-abuse.model' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts index d8470e927..c38e1286f 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts | |||
@@ -7,8 +7,8 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } | |||
7 | import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 7 | import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
8 | import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation' | 8 | import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation' |
9 | import { VideoCommentService } from '@app/shared/shared-video-comment' | 9 | import { VideoCommentService } from '@app/shared/shared-video-comment' |
10 | import { AbuseState, AbuseStateType, AdminAbuse } from '@peertube/peertube-models' | ||
10 | import { logger } from '@root-helpers/logger' | 11 | import { logger } from '@root-helpers/logger' |
11 | import { AbuseState, AdminAbuse } from '@shared/models' | ||
12 | import { AdvancedInputFilter } from '../shared-forms' | 12 | import { AdvancedInputFilter } from '../shared-forms' |
13 | import { AbuseMessageModalComponent } from './abuse-message-modal.component' | 13 | import { AbuseMessageModalComponent } from './abuse-message-modal.component' |
14 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' | 14 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' |
@@ -144,7 +144,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit { | |||
144 | }) | 144 | }) |
145 | } | 145 | } |
146 | 146 | ||
147 | updateAbuseState (abuse: AdminAbuse, state: AbuseState) { | 147 | updateAbuseState (abuse: AdminAbuse, state: AbuseStateType) { |
148 | this.abuseService.updateAbuse(abuse, { state }) | 148 | this.abuseService.updateAbuse(abuse, { state }) |
149 | .subscribe({ | 149 | .subscribe({ |
150 | next: () => this.reloadData(), | 150 | next: () => this.reloadData(), |
diff --git a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts index 12d503f56..8d20166f6 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts | |||
@@ -4,7 +4,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
6 | import { logger } from '@root-helpers/logger' | 6 | import { logger } from '@root-helpers/logger' |
7 | import { AbuseMessage, UserAbuse } from '@shared/models' | 7 | import { AbuseMessage, UserAbuse } from '@peertube/peertube-models' |
8 | import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' | 8 | import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' |
9 | import { AbuseService } from '../shared-moderation' | 9 | import { AbuseService } from '../shared-moderation' |
10 | 10 | ||
diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts index 4ad807d25..e42939f96 100644 --- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts | |||
@@ -4,7 +4,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
4 | import { AbuseService } from '@app/shared/shared-moderation' | 4 | import { AbuseService } from '@app/shared/shared-moderation' |
5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
6 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 6 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
7 | import { AdminAbuse } from '@shared/models' | 7 | import { AdminAbuse } from '@peertube/peertube-models' |
8 | import { ABUSE_MODERATION_COMMENT_VALIDATOR } from '../form-validators/abuse-validators' | 8 | import { ABUSE_MODERATION_COMMENT_VALIDATOR } from '../form-validators/abuse-validators' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
diff --git a/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts b/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts index b9a9bd889..076ccb40b 100644 --- a/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts +++ b/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Account } from '@app/shared/shared-main' | 1 | import { Account } from '@app/shared/shared-main' |
2 | import { AdminAbuse } from '@shared/models' | 2 | import { AdminAbuse } from '@peertube/peertube-models' |
3 | 3 | ||
4 | // Don't use an abuse model because we need external services to compute some properties | 4 | // Don't use an abuse model because we need external services to compute some properties |
5 | // And this model is only used in this component | 5 | // And this model is only used in this component |
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts index ab2e02ad7..36babbe34 100644 --- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts +++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, Input, OnChanges, OnInit } from '@angular/core' | 1 | import { Component, Input, OnChanges, OnInit } from '@angular/core' |
2 | import { VideoChannel } from '../shared-main' | 2 | import { VideoChannel } from '../shared-main' |
3 | import { Account } from '../shared-main/account/account.model' | 3 | import { Account } from '../shared-main/account/account.model' |
4 | import { objectKeysTyped } from '@shared/core-utils' | 4 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
5 | 5 | ||
6 | type ActorInput = { | 6 | type ActorInput = { |
7 | name: string | 7 | name: string |
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts index b49f64834..4ab78a250 100644 --- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts +++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | PlaylistMiniatureMarkupData, | 10 | PlaylistMiniatureMarkupData, |
11 | VideoMiniatureMarkupData, | 11 | VideoMiniatureMarkupData, |
12 | VideosListMarkupData | 12 | VideosListMarkupData |
13 | } from '@shared/models' | 13 | } from '@peertube/peertube-models' |
14 | import { DynamicElementService } from './dynamic-element.service' | 14 | import { DynamicElementService } from './dynamic-element.service' |
15 | import { | 15 | import { |
16 | ButtonMarkupComponent, | 16 | ButtonMarkupComponent, |
diff --git a/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts b/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts index a12907055..dc4f683ac 100644 --- a/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts +++ b/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | SimpleChanges, | 10 | SimpleChanges, |
11 | Type | 11 | Type |
12 | } from '@angular/core' | 12 | } from '@angular/core' |
13 | import { objectKeysTyped } from '@shared/core-utils' | 13 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
14 | 14 | ||
15 | @Injectable() | 15 | @Injectable() |
16 | export class DynamicElementService { | 16 | export class DynamicElementService { |
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts index 4f00eabd3..b731ccc64 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts | |||
@@ -3,7 +3,7 @@ import { finalize, map, switchMap, tap } from 'rxjs/operators' | |||
3 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 3 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
4 | import { MarkdownService, Notifier, UserService } from '@app/core' | 4 | import { MarkdownService, Notifier, UserService } from '@app/core' |
5 | import { FindInBulkService } from '@app/shared/shared-search' | 5 | import { FindInBulkService } from '@app/shared/shared-search' |
6 | import { VideoSortField } from '@shared/models' | 6 | import { VideoSortField } from '@peertube/peertube-models' |
7 | import { Video, VideoChannel, VideoService } from '../../shared-main' | 7 | import { Video, VideoChannel, VideoService } from '../../shared-main' |
8 | import { CustomMarkupComponent } from './shared' | 8 | import { CustomMarkupComponent } from './shared' |
9 | 9 | ||
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts index 0baf2428b..bca7444ec 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { environment } from 'src/environments/environment' | 1 | import { environment } from 'src/environments/environment' |
2 | import { Component, ElementRef, Input, OnInit } from '@angular/core' | 2 | import { Component, ElementRef, Input, OnInit } from '@angular/core' |
3 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' | 3 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' |
4 | import { buildPlaylistEmbedLink, buildVideoEmbedLink } from '@shared/core-utils' | 4 | import { buildPlaylistEmbedLink, buildVideoEmbedLink } from '@peertube/peertube-core-utils' |
5 | import { CustomMarkupComponent } from './shared' | 5 | import { CustomMarkupComponent } from './shared' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts index bd93929c9..d692abbe3 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts | |||
@@ -2,7 +2,7 @@ import { finalize } from 'rxjs/operators' | |||
2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { FindInBulkService } from '@app/shared/shared-search' | 4 | import { FindInBulkService } from '@app/shared/shared-search' |
5 | import { objectKeysTyped } from '@shared/core-utils' | 5 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
6 | import { Video } from '../../shared-main' | 6 | import { Video } from '../../shared-main' |
7 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' | 7 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' |
8 | import { CustomMarkupComponent } from './shared' | 8 | import { CustomMarkupComponent } from './shared' |
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts index 81363be87..cbd5c7bf5 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { finalize } from 'rxjs/operators' | 1 | import { finalize } from 'rxjs/operators' |
2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { objectKeysTyped } from '@shared/core-utils' | 4 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
5 | import { VideoSortField } from '@shared/models' | 5 | import { VideoSortField } from '@peertube/peertube-models' |
6 | import { Video, VideoService } from '../../shared-main' | 6 | import { Video, VideoService } from '../../shared-main' |
7 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' | 7 | import { MiniatureDisplayOptions } from '../../shared-video-miniature' |
8 | import { CustomMarkupComponent } from './shared' | 8 | import { CustomMarkupComponent } from './shared' |
diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.ts b/client/src/app/shared/shared-forms/dynamic-form-field.component.ts index e1a1f8034..a95463944 100644 --- a/client/src/app/shared/shared-forms/dynamic-form-field.component.ts +++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { FormGroup } from '@angular/forms' | 2 | import { FormGroup } from '@angular/forms' |
3 | import { RegisterClientFormFieldOptions } from '@shared/models' | 3 | import { RegisterClientFormFieldOptions } from '@peertube/peertube-models' |
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
6 | selector: 'my-dynamic-form-field', | 6 | selector: 'my-dynamic-form-field', |
diff --git a/client/src/app/shared/shared-forms/form-validator.service.ts b/client/src/app/shared/shared-forms/form-validator.service.ts index 14ee044b5..e7dedf52a 100644 --- a/client/src/app/shared/shared-forms/form-validator.service.ts +++ b/client/src/app/shared/shared-forms/form-validator.service.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { AsyncValidatorFn, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn } from '@angular/forms' | 2 | import { AsyncValidatorFn, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn } from '@angular/forms' |
3 | import { objectKeysTyped } from '@shared/core-utils' | 3 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
4 | import { BuildFormArgument, BuildFormDefaultValues } from '../form-validators/form-validator.model' | 4 | import { BuildFormArgument, BuildFormDefaultValues } from '../form-validators/form-validator.model' |
5 | import { FormReactiveErrors, FormReactiveValidationMessages } from './form-reactive.service' | 5 | import { FormReactiveErrors, FormReactiveValidationMessages } from './form-reactive.service' |
6 | 6 | ||
diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.ts b/client/src/app/shared/shared-forms/markdown-textarea.component.ts index 036fab3d9..7edcf868c 100644 --- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts +++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts | |||
@@ -6,7 +6,7 @@ import { Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@an | |||
6 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' | 6 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' |
7 | import { SafeHtml } from '@angular/platform-browser' | 7 | import { SafeHtml } from '@angular/platform-browser' |
8 | import { MarkdownService, ScreenService } from '@app/core' | 8 | import { MarkdownService, ScreenService } from '@app/core' |
9 | import { Video } from '@shared/models' | 9 | import { Video } from '@peertube/peertube-models' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
12 | selector: 'my-markdown-textarea', | 12 | selector: 'my-markdown-textarea', |
diff --git a/client/src/app/shared/shared-forms/preview-upload.component.ts b/client/src/app/shared/shared-forms/preview-upload.component.ts index cdfa26a23..3db7c34f7 100644 --- a/client/src/app/shared/shared-forms/preview-upload.component.ts +++ b/client/src/app/shared/shared-forms/preview-upload.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core' | |||
2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' | 2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' |
3 | import { ServerService } from '@app/core' | 3 | import { ServerService } from '@app/core' |
4 | import { imageToDataURL } from '@root-helpers/images' | 4 | import { imageToDataURL } from '@root-helpers/images' |
5 | import { HTMLServerConfig } from '@shared/models' | 5 | import { HTMLServerConfig } from '@peertube/peertube-models' |
6 | import { BytesPipe } from '../shared-main' | 6 | import { BytesPipe } from '../shared-main' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
diff --git a/client/src/app/shared/shared-forms/timestamp-input.component.ts b/client/src/app/shared/shared-forms/timestamp-input.component.ts index 79ca63673..280491852 100644 --- a/client/src/app/shared/shared-forms/timestamp-input.component.ts +++ b/client/src/app/shared/shared-forms/timestamp-input.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ChangeDetectorRef, Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core' | 1 | import { ChangeDetectorRef, Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core' |
2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' | 2 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' |
3 | import { secondsToTime, timeToInt } from '@shared/core-utils' | 3 | import { secondsToTime, timeToInt } from '@peertube/peertube-core-utils' |
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
6 | selector: 'my-timestamp-input', | 6 | selector: 'my-timestamp-input', |
diff --git a/client/src/app/shared/shared-instance/instance-about-accordion.component.ts b/client/src/app/shared/shared-instance/instance-about-accordion.component.ts index a7c521876..78d960d93 100644 --- a/client/src/app/shared/shared-instance/instance-about-accordion.component.ts +++ b/client/src/app/shared/shared-instance/instance-about-accordion.component.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { HooksService, Notifier } from '@app/core' | 2 | import { HooksService, Notifier } from '@app/core' |
3 | import { NgbAccordionDirective } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbAccordionDirective } from '@ng-bootstrap/ng-bootstrap' |
4 | import { ClientFilterHookName, PluginClientScope } from '@shared/models/plugins' | 4 | import { About, ClientFilterHookName, PluginClientScope } from '@peertube/peertube-models' |
5 | import { About } from '@shared/models/server' | ||
6 | import { InstanceService } from './instance.service' | 5 | import { InstanceService } from './instance.service' |
7 | 6 | ||
8 | @Component({ | 7 | @Component({ |
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts index ab1b1458a..11c6cc0ac 100644 --- a/client/src/app/shared/shared-instance/instance-features-table.component.ts +++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { formatICU } from '@app/helpers' | 3 | import { formatICU } from '@app/helpers' |
4 | import { ServerConfig } from '@shared/models' | 4 | import { ServerConfig } from '@peertube/peertube-models' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
7 | selector: 'my-instance-features-table', | 7 | selector: 'my-instance-features-table', |
diff --git a/client/src/app/shared/shared-instance/instance-follow.service.ts b/client/src/app/shared/shared-instance/instance-follow.service.ts index 7568fbbf4..f243273ba 100644 --- a/client/src/app/shared/shared-instance/instance-follow.service.ts +++ b/client/src/app/shared/shared-instance/instance-follow.service.ts | |||
@@ -4,8 +4,8 @@ import { catchError, concatMap, toArray } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { arrayify } from '@shared/core-utils' | 7 | import { arrayify } from '@peertube/peertube-core-utils' |
8 | import { ActivityPubActorType, ActorFollow, FollowState, ResultList, ServerFollowCreate } from '@shared/models' | 8 | import { ActivityPubActorType, ActorFollow, FollowState, ResultList, ServerFollowCreate } from '@peertube/peertube-models' |
9 | import { environment } from '../../../environments/environment' | 9 | import { environment } from '../../../environments/environment' |
10 | import { AdvancedInputFilter } from '../shared-forms' | 10 | import { AdvancedInputFilter } from '../shared-forms' |
11 | 11 | ||
diff --git a/client/src/app/shared/shared-instance/instance.service.ts b/client/src/app/shared/shared-instance/instance.service.ts index 3088f0899..9a55cf972 100644 --- a/client/src/app/shared/shared-instance/instance.service.ts +++ b/client/src/app/shared/shared-instance/instance.service.ts | |||
@@ -3,9 +3,8 @@ import { catchError, map } from 'rxjs/operators' | |||
3 | import { HttpClient } from '@angular/common/http' | 3 | import { HttpClient } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { MarkdownService, RestExtractor, ServerService } from '@app/core' | 5 | import { MarkdownService, RestExtractor, ServerService } from '@app/core' |
6 | import { objectKeysTyped } from '@shared/core-utils' | 6 | import { objectKeysTyped, peertubeTranslate } from '@peertube/peertube-core-utils' |
7 | import { peertubeTranslate } from '@shared/core-utils/i18n' | 7 | import { About } from '@peertube/peertube-models' |
8 | import { About } from '@shared/models' | ||
9 | import { environment } from '../../../environments/environment' | 8 | import { environment } from '../../../environments/environment' |
10 | 9 | ||
11 | export type AboutHTML = Pick<About['instance'], | 10 | export type AboutHTML = Pick<About['instance'], |
diff --git a/client/src/app/shared/shared-main/account/account.model.ts b/client/src/app/shared/shared-main/account/account.model.ts index e34f6ef64..3a308fde5 100644 --- a/client/src/app/shared/shared-main/account/account.model.ts +++ b/client/src/app/shared/shared-main/account/account.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Account as ServerAccount, ActorImage, BlockStatus } from '@shared/models' | 1 | import { Account as ServerAccount, ActorImage, BlockStatus } from '@peertube/peertube-models' |
2 | import { Actor } from './actor.model' | 2 | import { Actor } from './actor.model' |
3 | 3 | ||
4 | export class Account extends Actor implements ServerAccount { | 4 | export class Account extends Actor implements ServerAccount { |
diff --git a/client/src/app/shared/shared-main/account/account.service.ts b/client/src/app/shared/shared-main/account/account.service.ts index 8f4abf070..9c1afaa73 100644 --- a/client/src/app/shared/shared-main/account/account.service.ts +++ b/client/src/app/shared/shared-main/account/account.service.ts | |||
@@ -3,7 +3,7 @@ import { catchError, map, tap } from 'rxjs/operators' | |||
3 | import { HttpClient } from '@angular/common/http' | 3 | import { HttpClient } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { RestExtractor } from '@app/core' | 5 | import { RestExtractor } from '@app/core' |
6 | import { Account as ServerAccount } from '@shared/models' | 6 | import { Account as ServerAccount } from '@peertube/peertube-models' |
7 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
8 | import { Account } from './account.model' | 8 | import { Account } from './account.model' |
9 | 9 | ||
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts index bce040970..1a1dc2ce6 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { getAbsoluteAPIUrl, getAPIHost } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl, getAPIHost } from '@app/helpers' |
2 | import { Actor as ServerActor, ActorImage } from '@shared/models' | 2 | import { Actor as ServerActor, ActorImage } from '@peertube/peertube-models' |
3 | 3 | ||
4 | export abstract class Actor implements ServerActor { | 4 | export abstract class Actor implements ServerActor { |
5 | id: number | 5 | id: number |
diff --git a/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts b/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts index 93b3a93d6..e1adf401b 100644 --- a/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts +++ b/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts | |||
@@ -4,8 +4,7 @@ import { HTTP_INTERCEPTORS, HttpErrorResponse, HttpEvent, HttpHandler, HttpInter | |||
4 | import { Injectable, Injector } from '@angular/core' | 4 | import { Injectable, Injector } from '@angular/core' |
5 | import { Router } from '@angular/router' | 5 | import { Router } from '@angular/router' |
6 | import { AuthService } from '@app/core/auth/auth.service' | 6 | import { AuthService } from '@app/core/auth/auth.service' |
7 | import { HttpStatusCode } from '@shared/models' | 7 | import { HttpStatusCode, OAuth2ErrorCode, PeerTubeProblemDocument } from '@peertube/peertube-models' |
8 | import { OAuth2ErrorCode, PeerTubeProblemDocument } from '@shared/models/server' | ||
9 | 8 | ||
10 | @Injectable() | 9 | @Injectable() |
11 | export class AuthInterceptor implements HttpInterceptor { | 10 | export class AuthInterceptor implements HttpInterceptor { |
diff --git a/client/src/app/shared/shared-main/custom-page/custom-page.service.ts b/client/src/app/shared/shared-main/custom-page/custom-page.service.ts index 2914dd6d9..6a2d3a1f5 100644 --- a/client/src/app/shared/shared-main/custom-page/custom-page.service.ts +++ b/client/src/app/shared/shared-main/custom-page/custom-page.service.ts | |||
@@ -3,7 +3,7 @@ import { catchError } from 'rxjs/operators' | |||
3 | import { HttpClient } from '@angular/common/http' | 3 | import { HttpClient } from '@angular/common/http' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { RestExtractor } from '@app/core' | 5 | import { RestExtractor } from '@app/core' |
6 | import { CustomPage } from '@shared/models' | 6 | import { CustomPage } from '@peertube/peertube-models' |
7 | import { environment } from '../../../../environments/environment' | 7 | import { environment } from '../../../../environments/environment' |
8 | 8 | ||
9 | @Injectable() | 9 | @Injectable() |
diff --git a/client/src/app/shared/shared-main/feeds/syndication.model.ts b/client/src/app/shared/shared-main/feeds/syndication.model.ts index cd6fbdb48..a61515313 100644 --- a/client/src/app/shared/shared-main/feeds/syndication.model.ts +++ b/client/src/app/shared/shared-main/feeds/syndication.model.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { FeedFormat } from '@shared/models' | 1 | import { FeedFormatType } from '@peertube/peertube-models' |
2 | 2 | ||
3 | export interface Syndication { | 3 | export interface Syndication { |
4 | format: FeedFormat | 4 | format: FeedFormatType |
5 | label: string | 5 | label: string |
6 | url: string | 6 | url: string |
7 | } | 7 | } |
diff --git a/client/src/app/shared/shared-main/misc/help.component.ts b/client/src/app/shared/shared-main/misc/help.component.ts index 80fe0e160..53eafc74f 100644 --- a/client/src/app/shared/shared-main/misc/help.component.ts +++ b/client/src/app/shared/shared-main/misc/help.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core' | 1 | import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core' |
2 | import { GlobalIconName } from '@app/shared/shared-icons' | 2 | import { GlobalIconName } from '@app/shared/shared-icons' |
3 | import { ENHANCED_RULES, TEXT_RULES } from '@shared/core-utils/renderer/markdown' | 3 | import { ENHANCED_RULES, TEXT_RULES } from '@peertube/peertube-core-utils' |
4 | import { PeerTubeTemplateDirective } from '../angular' | 4 | import { PeerTubeTemplateDirective } from '../angular' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
diff --git a/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts b/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts index 858eff9ba..2064b9089 100644 --- a/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts +++ b/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | import { PluginElementPlaceholder } from '@shared/models' | 2 | import { PluginElementPlaceholder } from '@peertube/peertube-models' |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-plugin-placeholder', | 5 | selector: 'my-plugin-placeholder', |
diff --git a/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts b/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts index 576569f19..ddb431dec 100644 --- a/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts +++ b/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core' | 1 | import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core' |
2 | import { PluginSelectorId } from '@shared/models' | 2 | import { PluginSelectorId } from '@peertube/peertube-models' |
3 | 3 | ||
4 | @Directive({ selector: '[myPluginSelector]' }) | 4 | @Directive({ selector: '[myPluginSelector]' }) |
5 | export class PluginSelectorDirective implements OnInit { | 5 | export class PluginSelectorDirective implements OnInit { |
diff --git a/client/src/app/shared/shared-main/users/user-history.service.ts b/client/src/app/shared/shared-main/users/user-history.service.ts index 4cebbc707..90a9a0eb9 100644 --- a/client/src/app/shared/shared-main/users/user-history.service.ts +++ b/client/src/app/shared/shared-main/users/user-history.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError, switchMap } from 'rxjs/operators' | |||
2 | import { HttpClient, HttpParams } from '@angular/common/http' | 2 | import { HttpClient, HttpParams } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' | 4 | import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' |
5 | import { ResultList } from '@shared/models' | 5 | import { ResultList } from '@peertube/peertube-models' |
6 | import { environment } from '../../../../environments/environment' | 6 | import { environment } from '../../../../environments/environment' |
7 | import { Video } from '../video/video.model' | 7 | import { Video } from '../video/video.model' |
8 | import { VideoService } from '../video/video.service' | 8 | import { VideoService } from '../video/video.service' |
diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts index 96e7b4dd0..865eff378 100644 --- a/client/src/app/shared/shared-main/users/user-notification.model.ts +++ b/client/src/app/shared/shared-main/users/user-notification.model.ts | |||
@@ -2,22 +2,23 @@ import { AuthUser } from '@app/core' | |||
2 | import { Account } from '@app/shared/shared-main/account/account.model' | 2 | import { Account } from '@app/shared/shared-main/account/account.model' |
3 | import { Actor } from '@app/shared/shared-main/account/actor.model' | 3 | import { Actor } from '@app/shared/shared-main/account/actor.model' |
4 | import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model' | 4 | import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model' |
5 | import { logger } from '@root-helpers/logger' | ||
6 | import { | 5 | import { |
7 | AbuseState, | 6 | AbuseStateType, |
8 | ActorInfo, | 7 | ActorInfo, |
9 | FollowState, | 8 | FollowState, |
10 | PluginType, | 9 | PluginType_Type, |
11 | UserNotification as UserNotificationServer, | 10 | UserNotification as UserNotificationServer, |
12 | UserNotificationType, | 11 | UserNotificationType, |
12 | UserNotificationType_Type, | ||
13 | UserRight, | 13 | UserRight, |
14 | VideoInfo | 14 | VideoInfo |
15 | } from '@shared/models' | 15 | } from '@peertube/peertube-models' |
16 | import { logger } from '@root-helpers/logger' | ||
16 | import { Video } from '../video' | 17 | import { Video } from '../video' |
17 | 18 | ||
18 | export class UserNotification implements UserNotificationServer { | 19 | export class UserNotification implements UserNotificationServer { |
19 | id: number | 20 | id: number |
20 | type: UserNotificationType | 21 | type: UserNotificationType_Type |
21 | read: boolean | 22 | read: boolean |
22 | 23 | ||
23 | video?: VideoInfo & { | 24 | video?: VideoInfo & { |
@@ -41,7 +42,7 @@ export class UserNotification implements UserNotificationServer { | |||
41 | 42 | ||
42 | abuse?: { | 43 | abuse?: { |
43 | id: number | 44 | id: number |
44 | state: AbuseState | 45 | state: AbuseStateType |
45 | 46 | ||
46 | video?: VideoInfo | 47 | video?: VideoInfo |
47 | 48 | ||
@@ -75,7 +76,7 @@ export class UserNotification implements UserNotificationServer { | |||
75 | 76 | ||
76 | plugin?: { | 77 | plugin?: { |
77 | name: string | 78 | name: string |
78 | type: PluginType | 79 | type: PluginType_Type |
79 | latestVersion: string | 80 | latestVersion: string |
80 | } | 81 | } |
81 | 82 | ||
diff --git a/client/src/app/shared/shared-main/users/user-notification.service.ts b/client/src/app/shared/shared-main/users/user-notification.service.ts index 0b3dd9a53..1f7adb994 100644 --- a/client/src/app/shared/shared-main/users/user-notification.service.ts +++ b/client/src/app/shared/shared-main/users/user-notification.service.ts | |||
@@ -4,7 +4,7 @@ import { HttpClient, HttpContext, HttpParams } from '@angular/common/http' | |||
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { AuthService, ComponentPaginationLight, PeerTubeSocket, RestExtractor, RestService } from '@app/core' | 5 | import { AuthService, ComponentPaginationLight, PeerTubeSocket, RestExtractor, RestService } from '@app/core' |
6 | import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client' | 6 | import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client' |
7 | import { ResultList, UserNotification as UserNotificationServer, UserNotificationSetting } from '@shared/models' | 7 | import { ResultList, UserNotification as UserNotificationServer, UserNotificationSetting } from '@peertube/peertube-models' |
8 | import { environment } from '../../../../environments/environment' | 8 | import { environment } from '../../../../environments/environment' |
9 | import { UserNotification } from './user-notification.model' | 9 | import { UserNotification } from './user-notification.model' |
10 | 10 | ||
diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.ts b/client/src/app/shared/shared-main/users/user-notifications.component.ts index 50005b855..4318973fa 100644 --- a/client/src/app/shared/shared-main/users/user-notifications.component.ts +++ b/client/src/app/shared/shared-main/users/user-notifications.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Subject } from 'rxjs' | 1 | import { Subject } from 'rxjs' |
2 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { ComponentPagination, hasMoreItems, Notifier } from '@app/core' | 3 | import { ComponentPagination, hasMoreItems, Notifier } from '@app/core' |
4 | import { AbuseState } from '@shared/models' | 4 | import { AbuseState } from '@peertube/peertube-models' |
5 | import { UserNotification } from './user-notification.model' | 5 | import { UserNotification } from './user-notification.model' |
6 | import { UserNotificationService } from './user-notification.service' | 6 | import { UserNotificationService } from './user-notification.service' |
7 | 7 | ||
diff --git a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts index 21f31a717..59c0969a9 100644 --- a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts +++ b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts | |||
@@ -5,8 +5,8 @@ import { Injectable } from '@angular/core' | |||
5 | import { RestExtractor, ServerService } from '@app/core' | 5 | import { RestExtractor, ServerService } from '@app/core' |
6 | import { objectToFormData, sortBy } from '@app/helpers' | 6 | import { objectToFormData, sortBy } from '@app/helpers' |
7 | import { VideoPasswordService, VideoService } from '@app/shared/shared-main/video' | 7 | import { VideoPasswordService, VideoService } from '@app/shared/shared-main/video' |
8 | import { peertubeTranslate } from '@shared/core-utils/i18n' | 8 | import { peertubeTranslate } from '@peertube/peertube-core-utils' |
9 | import { ResultList, VideoCaption } from '@shared/models' | 9 | import { ResultList, VideoCaption } from '@peertube/peertube-models' |
10 | import { environment } from '../../../../environments/environment' | 10 | import { environment } from '../../../../environments/environment' |
11 | import { VideoCaptionEdit } from './video-caption-edit.model' | 11 | import { VideoCaptionEdit } from './video-caption-edit.model' |
12 | 12 | ||
diff --git a/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts b/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts index a4e216869..a7d71c1e0 100644 --- a/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts +++ b/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts | |||
@@ -4,8 +4,7 @@ import { environment } from 'src/environments/environment' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { ResultList } from '@shared/models/common' | 7 | import { ResultList, VideoChannelSync, VideoChannelSyncCreate } from '@peertube/peertube-models' |
8 | import { VideoChannelSync, VideoChannelSyncCreate } from '@shared/models/videos' | ||
9 | import { Account, AccountService } from '../account' | 8 | import { Account, AccountService } from '../account' |
10 | 9 | ||
11 | @Injectable({ | 10 | @Injectable({ |
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts index db3e4b43f..f141d553a 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { getAbsoluteAPIUrl } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl } from '@app/helpers' |
2 | import { Account as ServerAccount, ActorImage, VideoChannel as ServerVideoChannel, ViewsPerDate } from '@shared/models' | 2 | import { Account as ServerAccount, ActorImage, VideoChannel as ServerVideoChannel, ViewsPerDate } from '@peertube/peertube-models' |
3 | import { Actor } from '../account/actor.model' | 3 | import { Actor } from '../account/actor.model' |
4 | 4 | ||
5 | export class VideoChannel extends Actor implements ServerVideoChannel { | 5 | export class VideoChannel extends Actor implements ServerVideoChannel { |
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts index 08811afec..9a42fcc52 100644 --- a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts +++ b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | VideoChannelCreate, | 10 | VideoChannelCreate, |
11 | VideoChannelUpdate, | 11 | VideoChannelUpdate, |
12 | VideosImportInChannelCreate | 12 | VideosImportInChannelCreate |
13 | } from '@shared/models' | 13 | } from '@peertube/peertube-models' |
14 | import { environment } from '../../../../environments/environment' | 14 | import { environment } from '../../../../environments/environment' |
15 | import { Account } from '../account' | 15 | import { Account } from '../account' |
16 | import { AccountService } from '../account/account.service' | 16 | import { AccountService } from '../account/account.service' |
diff --git a/client/src/app/shared/shared-main/video/embed.component.ts b/client/src/app/shared/shared-main/video/embed.component.ts index 43e350197..017fbf357 100644 --- a/client/src/app/shared/shared-main/video/embed.component.ts +++ b/client/src/app/shared/shared-main/video/embed.component.ts | |||
@@ -2,8 +2,8 @@ import { environment } from 'src/environments/environment' | |||
2 | import { Component, Input, OnInit } from '@angular/core' | 2 | import { Component, Input, OnInit } from '@angular/core' |
3 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' | 3 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' |
4 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' | 4 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' |
5 | import { buildVideoEmbedLink, decorateVideoLink } from '@shared/core-utils' | 5 | import { buildVideoEmbedLink, decorateVideoLink } from '@peertube/peertube-core-utils' |
6 | import { Video } from '@shared/models' | 6 | import { Video } from '@peertube/peertube-models' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
9 | selector: 'my-embed', | 9 | selector: 'my-embed', |
diff --git a/client/src/app/shared/shared-main/video/redundancy.service.ts b/client/src/app/shared/shared-main/video/redundancy.service.ts index 4377d628a..8904ee425 100644 --- a/client/src/app/shared/shared-main/video/redundancy.service.ts +++ b/client/src/app/shared/shared-main/video/redundancy.service.ts | |||
@@ -4,7 +4,7 @@ import { catchError, toArray } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { ResultList, Video, VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' | 7 | import { ResultList, Video, VideoRedundanciesTarget, VideoRedundancy } from '@peertube/peertube-models' |
8 | import { environment } from '../../../../environments/environment' | 8 | import { environment } from '../../../../environments/environment' |
9 | 9 | ||
10 | @Injectable() | 10 | @Injectable() |
diff --git a/client/src/app/shared/shared-main/video/video-details.model.ts b/client/src/app/shared/shared-main/video/video-details.model.ts index 5c36b5648..5ad0bb857 100644 --- a/client/src/app/shared/shared-main/video/video-details.model.ts +++ b/client/src/app/shared/shared-main/video/video-details.model.ts | |||
@@ -4,10 +4,10 @@ import { | |||
4 | VideoConstant, | 4 | VideoConstant, |
5 | VideoDetails as VideoDetailsServerModel, | 5 | VideoDetails as VideoDetailsServerModel, |
6 | VideoFile, | 6 | VideoFile, |
7 | VideoState, | 7 | VideoStateType, |
8 | VideoStreamingPlaylist, | 8 | VideoStreamingPlaylist, |
9 | VideoStreamingPlaylistType | 9 | VideoStreamingPlaylistType |
10 | } from '@shared/models' | 10 | } from '@peertube/peertube-models' |
11 | import { Video } from './video.model' | 11 | import { Video } from './video.model' |
12 | 12 | ||
13 | export class VideoDetails extends Video implements VideoDetailsServerModel { | 13 | export class VideoDetails extends Video implements VideoDetailsServerModel { |
@@ -20,7 +20,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel { | |||
20 | downloadEnabled: boolean | 20 | downloadEnabled: boolean |
21 | 21 | ||
22 | waitTranscoding: boolean | 22 | waitTranscoding: boolean |
23 | state: VideoConstant<VideoState> | 23 | state: VideoConstant<VideoStateType> |
24 | 24 | ||
25 | likesPercent: number | 25 | likesPercent: number |
26 | dislikesPercent: number | 26 | dislikesPercent: number |
diff --git a/client/src/app/shared/shared-main/video/video-edit.model.ts b/client/src/app/shared/shared-main/video/video-edit.model.ts index 9129ab93f..a3e736c0f 100644 --- a/client/src/app/shared/shared-main/video/video-edit.model.ts +++ b/client/src/app/shared/shared-main/video/video-edit.model.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { getAbsoluteAPIUrl } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl } from '@app/helpers' |
2 | import { VideoPassword, VideoPrivacy, VideoScheduleUpdate, VideoUpdate } from '@shared/models' | 2 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
3 | import { VideoPassword, VideoPrivacy, VideoPrivacyType, VideoScheduleUpdate, VideoUpdate } from '@peertube/peertube-models' | ||
3 | import { VideoDetails } from './video-details.model' | 4 | import { VideoDetails } from './video-details.model' |
4 | import { objectKeysTyped } from '@shared/core-utils' | ||
5 | 5 | ||
6 | export class VideoEdit implements VideoUpdate { | 6 | export class VideoEdit implements VideoUpdate { |
7 | static readonly SPECIAL_SCHEDULED_PRIVACY = -1 | 7 | static readonly SPECIAL_SCHEDULED_PRIVACY = -1 |
@@ -17,7 +17,7 @@ export class VideoEdit implements VideoUpdate { | |||
17 | downloadEnabled: boolean | 17 | downloadEnabled: boolean |
18 | waitTranscoding: boolean | 18 | waitTranscoding: boolean |
19 | channelId: number | 19 | channelId: number |
20 | privacy: VideoPrivacy | 20 | privacy: VideoPrivacyType |
21 | videoPassword?: string | 21 | videoPassword?: string |
22 | support: string | 22 | support: string |
23 | thumbnailfile?: any | 23 | thumbnailfile?: any |
diff --git a/client/src/app/shared/shared-main/video/video-file-token.service.ts b/client/src/app/shared/shared-main/video/video-file-token.service.ts index 9bca5b9ec..87a952895 100644 --- a/client/src/app/shared/shared-main/video/video-file-token.service.ts +++ b/client/src/app/shared/shared-main/video/video-file-token.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError, map, of, tap } from 'rxjs' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { RestExtractor } from '@app/core' | 4 | import { RestExtractor } from '@app/core' |
5 | import { VideoToken } from '@shared/models' | 5 | import { VideoToken } from '@peertube/peertube-models' |
6 | import { VideoService } from './video.service' | 6 | import { VideoService } from './video.service' |
7 | import { VideoPasswordService } from './video-password.service' | 7 | import { VideoPasswordService } from './video-password.service' |
8 | 8 | ||
diff --git a/client/src/app/shared/shared-main/video/video-import.service.ts b/client/src/app/shared/shared-main/video/video-import.service.ts index 607c08d71..bb9052401 100644 --- a/client/src/app/shared/shared-main/video/video-import.service.ts +++ b/client/src/app/shared/shared-main/video/video-import.service.ts | |||
@@ -5,8 +5,8 @@ import { HttpClient, HttpParams } from '@angular/common/http' | |||
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core' |
7 | import { objectToFormData } from '@app/helpers' | 7 | import { objectToFormData } from '@app/helpers' |
8 | import { peertubeTranslate } from '@shared/core-utils/i18n' | 8 | import { peertubeTranslate } from '@peertube/peertube-core-utils' |
9 | import { ResultList, VideoImport, VideoImportCreate, VideoUpdate } from '@shared/models' | 9 | import { ResultList, VideoImport, VideoImportCreate, VideoUpdate } from '@peertube/peertube-models' |
10 | import { environment } from '../../../../environments/environment' | 10 | import { environment } from '../../../../environments/environment' |
11 | 11 | ||
12 | @Injectable() | 12 | @Injectable() |
diff --git a/client/src/app/shared/shared-main/video/video-ownership.service.ts b/client/src/app/shared/shared-main/video/video-ownership.service.ts index 1e8f7f68c..03e8fc946 100644 --- a/client/src/app/shared/shared-main/video/video-ownership.service.ts +++ b/client/src/app/shared/shared-main/video/video-ownership.service.ts | |||
@@ -4,7 +4,7 @@ import { catchError } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { ResultList, VideoChangeOwnership, VideoChangeOwnershipAccept, VideoChangeOwnershipCreate } from '@shared/models' | 7 | import { ResultList, VideoChangeOwnership, VideoChangeOwnershipAccept, VideoChangeOwnershipCreate } from '@peertube/peertube-models' |
8 | import { environment } from '../../../../environments/environment' | 8 | import { environment } from '../../../../environments/environment' |
9 | 9 | ||
10 | @Injectable() | 10 | @Injectable() |
diff --git a/client/src/app/shared/shared-main/video/video-password.service.ts b/client/src/app/shared/shared-main/video/video-password.service.ts index d5b0406f8..156efd60f 100644 --- a/client/src/app/shared/shared-main/video/video-password.service.ts +++ b/client/src/app/shared/shared-main/video/video-password.service.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ResultList, VideoPassword } from '@shared/models' | 1 | import { ResultList, VideoPassword } from '@peertube/peertube-models' |
2 | import { Injectable } from '@angular/core' | 2 | import { Injectable } from '@angular/core' |
3 | import { catchError, switchMap } from 'rxjs' | 3 | import { catchError, switchMap } from 'rxjs' |
4 | import { HttpClient, HttpHeaders } from '@angular/common/http' | 4 | import { HttpClient, HttpHeaders } from '@angular/common/http' |
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index 1d077a613..ed28fb3f8 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts | |||
@@ -2,8 +2,7 @@ import { AuthUser } from '@app/core' | |||
2 | import { User } from '@app/core/users/user.model' | 2 | import { User } from '@app/core/users/user.model' |
3 | import { durationToString, formatICU, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' | 3 | import { durationToString, formatICU, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' |
4 | import { Actor } from '@app/shared/shared-main/account/actor.model' | 4 | import { Actor } from '@app/shared/shared-main/account/actor.model' |
5 | import { buildVideoWatchPath, getAllFiles } from '@shared/core-utils' | 5 | import { buildVideoWatchPath, getAllFiles, peertubeTranslate } from '@peertube/peertube-core-utils' |
6 | import { peertubeTranslate } from '@shared/core-utils/i18n' | ||
7 | import { | 6 | import { |
8 | ActorImage, | 7 | ActorImage, |
9 | HTMLServerConfig, | 8 | HTMLServerConfig, |
@@ -12,11 +11,13 @@ import { | |||
12 | VideoConstant, | 11 | VideoConstant, |
13 | VideoFile, | 12 | VideoFile, |
14 | VideoPrivacy, | 13 | VideoPrivacy, |
14 | VideoPrivacyType, | ||
15 | VideoScheduleUpdate, | 15 | VideoScheduleUpdate, |
16 | VideoState, | 16 | VideoState, |
17 | VideoStateType, | ||
17 | VideoStreamingPlaylist, | 18 | VideoStreamingPlaylist, |
18 | VideoStreamingPlaylistType | 19 | VideoStreamingPlaylistType |
19 | } from '@shared/models' | 20 | } from '@peertube/peertube-models' |
20 | 21 | ||
21 | export class Video implements VideoServerModel { | 22 | export class Video implements VideoServerModel { |
22 | byVideoChannel: string | 23 | byVideoChannel: string |
@@ -30,7 +31,7 @@ export class Video implements VideoServerModel { | |||
30 | category: VideoConstant<number> | 31 | category: VideoConstant<number> |
31 | licence: VideoConstant<number> | 32 | licence: VideoConstant<number> |
32 | language: VideoConstant<string> | 33 | language: VideoConstant<string> |
33 | privacy: VideoConstant<VideoPrivacy> | 34 | privacy: VideoConstant<VideoPrivacyType> |
34 | 35 | ||
35 | truncatedDescription: string | 36 | truncatedDescription: string |
36 | description: string | 37 | description: string |
@@ -70,7 +71,7 @@ export class Video implements VideoServerModel { | |||
70 | originInstanceHost: string | 71 | originInstanceHost: string |
71 | 72 | ||
72 | waitTranscoding?: boolean | 73 | waitTranscoding?: boolean |
73 | state?: VideoConstant<VideoState> | 74 | state?: VideoConstant<VideoStateType> |
74 | scheduledUpdate?: VideoScheduleUpdate | 75 | scheduledUpdate?: VideoScheduleUpdate |
75 | 76 | ||
76 | blacklisted?: boolean | 77 | blacklisted?: boolean |
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts index a980c2dcf..9b2bc5dee 100644 --- a/client/src/app/shared/shared-main/video/video.service.ts +++ b/client/src/app/shared/shared-main/video/video.service.ts | |||
@@ -5,7 +5,7 @@ import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http' | |||
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { AuthService, ComponentPaginationLight, ConfirmService, RestExtractor, RestService, ServerService, UserService } from '@app/core' | 6 | import { AuthService, ComponentPaginationLight, ConfirmService, RestExtractor, RestService, ServerService, UserService } from '@app/core' |
7 | import { objectToFormData } from '@app/helpers' | 7 | import { objectToFormData } from '@app/helpers' |
8 | import { arrayify } from '@shared/core-utils' | 8 | import { arrayify } from '@peertube/peertube-core-utils' |
9 | import { | 9 | import { |
10 | BooleanBothQuery, | 10 | BooleanBothQuery, |
11 | FeedFormat, | 11 | FeedFormat, |
@@ -21,13 +21,14 @@ import { | |||
21 | VideoConstant, | 21 | VideoConstant, |
22 | VideoDetails as VideoDetailsServerModel, | 22 | VideoDetails as VideoDetailsServerModel, |
23 | VideoFileMetadata, | 23 | VideoFileMetadata, |
24 | VideoInclude, | 24 | VideoIncludeType, |
25 | VideoPrivacy, | 25 | VideoPrivacy, |
26 | VideoPrivacyType, | ||
26 | VideoSortField, | 27 | VideoSortField, |
28 | VideoSource, | ||
27 | VideoTranscodingCreate, | 29 | VideoTranscodingCreate, |
28 | VideoUpdate | 30 | VideoUpdate |
29 | } from '@shared/models' | 31 | } from '@peertube/peertube-models' |
30 | import { VideoSource } from '@shared/models/videos/video-source' | ||
31 | import { environment } from '../../../../environments/environment' | 32 | import { environment } from '../../../../environments/environment' |
32 | import { Account } from '../account/account.model' | 33 | import { Account } from '../account/account.model' |
33 | import { AccountService } from '../account/account.service' | 34 | import { AccountService } from '../account/account.service' |
@@ -40,11 +41,11 @@ import { Video } from './video.model' | |||
40 | export type CommonVideoParams = { | 41 | export type CommonVideoParams = { |
41 | videoPagination?: ComponentPaginationLight | 42 | videoPagination?: ComponentPaginationLight |
42 | sort: VideoSortField | SortMeta | 43 | sort: VideoSortField | SortMeta |
43 | include?: VideoInclude | 44 | include?: VideoIncludeType |
44 | isLocal?: boolean | 45 | isLocal?: boolean |
45 | categoryOneOf?: number[] | 46 | categoryOneOf?: number[] |
46 | languageOneOf?: string[] | 47 | languageOneOf?: string[] |
47 | privacyOneOf?: VideoPrivacy[] | 48 | privacyOneOf?: VideoPrivacyType[] |
48 | isLive?: boolean | 49 | isLive?: boolean |
49 | skipCount?: boolean | 50 | skipCount?: boolean |
50 | nsfw?: BooleanBothQuery | 51 | nsfw?: BooleanBothQuery |
@@ -455,7 +456,7 @@ export class VideoService { | |||
455 | ) | 456 | ) |
456 | } | 457 | } |
457 | 458 | ||
458 | explainedPrivacyLabels (serverPrivacies: VideoConstant<VideoPrivacy>[], defaultPrivacyId = VideoPrivacy.PUBLIC) { | 459 | explainedPrivacyLabels (serverPrivacies: VideoConstant<VideoPrivacyType>[], defaultPrivacyId: VideoPrivacyType = VideoPrivacy.PUBLIC) { |
459 | const descriptions = { | 460 | const descriptions = { |
460 | [VideoPrivacy.PRIVATE]: $localize`Only I can see this video`, | 461 | [VideoPrivacy.PRIVATE]: $localize`Only I can see this video`, |
461 | [VideoPrivacy.UNLISTED]: $localize`Only shareable via a private link`, | 462 | [VideoPrivacy.UNLISTED]: $localize`Only shareable via a private link`, |
@@ -478,7 +479,7 @@ export class VideoService { | |||
478 | } | 479 | } |
479 | } | 480 | } |
480 | 481 | ||
481 | getHighestAvailablePrivacy (serverPrivacies: VideoConstant<VideoPrivacy>[]) { | 482 | getHighestAvailablePrivacy (serverPrivacies: VideoConstant<VideoPrivacyType>[]) { |
482 | // We do not add a password as this requires additional configuration. | 483 | // We do not add a password as this requires additional configuration. |
483 | const order = [ | 484 | const order = [ |
484 | VideoPrivacy.PRIVATE, | 485 | VideoPrivacy.PRIVATE, |
diff --git a/client/src/app/shared/shared-moderation/abuse.service.ts b/client/src/app/shared/shared-moderation/abuse.service.ts index 5d1539f69..8055b6dd1 100644 --- a/client/src/app/shared/shared-moderation/abuse.service.ts +++ b/client/src/app/shared/shared-moderation/abuse.service.ts | |||
@@ -15,7 +15,7 @@ import { | |||
15 | AdminAbuse, | 15 | AdminAbuse, |
16 | ResultList, | 16 | ResultList, |
17 | UserAbuse | 17 | UserAbuse |
18 | } from '@shared/models' | 18 | } from '@peertube/peertube-models' |
19 | import { environment } from '../../../environments/environment' | 19 | import { environment } from '../../../environments/environment' |
20 | 20 | ||
21 | @Injectable() | 21 | @Injectable() |
diff --git a/client/src/app/shared/shared-moderation/account-block.model.ts b/client/src/app/shared/shared-moderation/account-block.model.ts index 8f76c69dc..a5bde327a 100644 --- a/client/src/app/shared/shared-moderation/account-block.model.ts +++ b/client/src/app/shared/shared-moderation/account-block.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { AccountBlock as AccountBlockServer } from '@shared/models' | 1 | import { AccountBlock as AccountBlockServer } from '@peertube/peertube-models' |
2 | import { Account } from '@app/shared/shared-main' | 2 | import { Account } from '@app/shared/shared-main' |
3 | 3 | ||
4 | export class AccountBlock implements AccountBlockServer { | 4 | export class AccountBlock implements AccountBlockServer { |
diff --git a/client/src/app/shared/shared-moderation/blocklist.service.ts b/client/src/app/shared/shared-moderation/blocklist.service.ts index 0fb7536e5..f755b812a 100644 --- a/client/src/app/shared/shared-moderation/blocklist.service.ts +++ b/client/src/app/shared/shared-moderation/blocklist.service.ts | |||
@@ -4,8 +4,8 @@ import { catchError, concatMap, map, toArray } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { arrayify } from '@shared/core-utils' | 7 | import { arrayify } from '@peertube/peertube-core-utils' |
8 | import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@shared/models' | 8 | import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@peertube/peertube-models' |
9 | import { environment } from '../../../environments/environment' | 9 | import { environment } from '../../../environments/environment' |
10 | import { Account } from '../shared-main' | 10 | import { Account } from '../shared-main' |
11 | import { AccountBlock } from './account-block.model' | 11 | import { AccountBlock } from './account-block.model' |
diff --git a/client/src/app/shared/shared-moderation/bulk.service.ts b/client/src/app/shared/shared-moderation/bulk.service.ts index f0b869421..36d1b0b1e 100644 --- a/client/src/app/shared/shared-moderation/bulk.service.ts +++ b/client/src/app/shared/shared-moderation/bulk.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { RestExtractor } from '@app/core' | 4 | import { RestExtractor } from '@app/core' |
5 | import { BulkRemoveCommentsOfBody } from '@shared/models' | 5 | import { BulkRemoveCommentsOfBody } from '@peertube/peertube-models' |
6 | import { environment } from '../../../environments/environment' | 6 | import { environment } from '../../../environments/environment' |
7 | 7 | ||
8 | @Injectable() | 8 | @Injectable() |
diff --git a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts index d587a9709..042b57aa7 100644 --- a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts | |||
@@ -6,8 +6,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
6 | import { Account } from '@app/shared/shared-main' | 6 | import { Account } from '@app/shared/shared-main' |
7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
9 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 9 | import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils' |
10 | import { AbusePredefinedReasonsString } from '@shared/models' | 10 | import { AbusePredefinedReasonsString } from '@peertube/peertube-models' |
11 | import { AbuseService } from '../abuse.service' | 11 | import { AbuseService } from '../abuse.service' |
12 | 12 | ||
13 | @Component({ | 13 | @Component({ |
diff --git a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts index e35d70c8f..fd50b745a 100644 --- a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts | |||
@@ -6,8 +6,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | |||
6 | import { VideoComment } from '@app/shared/shared-video-comment' | 6 | import { VideoComment } from '@app/shared/shared-video-comment' |
7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
9 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 9 | import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils' |
10 | import { AbusePredefinedReasonsString } from '@shared/models' | 10 | import { AbusePredefinedReasonsString } from '@peertube/peertube-models' |
11 | import { AbuseService } from '../abuse.service' | 11 | import { AbuseService } from '../abuse.service' |
12 | 12 | ||
13 | @Component({ | 13 | @Component({ |
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts index 16be8e0a1..479957d21 100644 --- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts | |||
@@ -6,8 +6,8 @@ import { ABUSE_REASON_VALIDATOR } from '@app/shared/form-validators/abuse-valida | |||
6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
9 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 9 | import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils' |
10 | import { AbusePredefinedReasonsString } from '@shared/models' | 10 | import { AbusePredefinedReasonsString } from '@peertube/peertube-models' |
11 | import { Video } from '../../shared-main' | 11 | import { Video } from '../../shared-main' |
12 | import { AbuseService } from '../abuse.service' | 12 | import { AbuseService } from '../abuse.service' |
13 | 13 | ||
diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.ts b/client/src/app/shared/shared-moderation/server-blocklist.component.ts index f1bcbd561..4105645fa 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.ts | |||
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Directive, OnInit, ViewChild } from '@angular/core' | 2 | import { Directive, OnInit, ViewChild } from '@angular/core' |
3 | import { Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component' | 4 | import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component' |
5 | import { ServerBlock } from '@shared/models' | 5 | import { ServerBlock } from '@peertube/peertube-models' |
6 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' | 6 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' |
7 | 7 | ||
8 | @Directive() | 8 | @Directive() |
diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts index 34295c34a..fcada7acc 100644 --- a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts +++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts | |||
@@ -5,7 +5,7 @@ import { formatICU } from '@app/helpers' | |||
5 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 5 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
7 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 7 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
8 | import { User } from '@shared/models' | 8 | import { User } from '@peertube/peertube-models' |
9 | import { USER_BAN_REASON_VALIDATOR } from '../form-validators/user-validators' | 9 | import { USER_BAN_REASON_VALIDATOR } from '../form-validators/user-validators' |
10 | import { Account } from '../shared-main' | 10 | import { Account } from '../shared-main' |
11 | import { UserAdminService } from '../shared-users' | 11 | import { UserAdminService } from '../shared-users' |
diff --git a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts index 50dccf862..7de152e60 100644 --- a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts +++ b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core' | 2 | import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core' |
3 | import { Account, DropdownAction } from '@app/shared/shared-main' | 3 | import { Account, DropdownAction } from '@app/shared/shared-main' |
4 | import { BulkRemoveCommentsOfBody, User, UserRight } from '@shared/models' | 4 | import { BulkRemoveCommentsOfBody, User, UserRight } from '@peertube/peertube-models' |
5 | import { UserAdminService } from '../shared-users' | 5 | import { UserAdminService } from '../shared-users' |
6 | import { BlocklistService } from './blocklist.service' | 6 | import { BlocklistService } from './blocklist.service' |
7 | import { BulkService } from './bulk.service' | 7 | import { BulkService } from './bulk.service' |
diff --git a/client/src/app/shared/shared-moderation/video-block.service.ts b/client/src/app/shared/shared-moderation/video-block.service.ts index ab352a2d6..18950c92b 100644 --- a/client/src/app/shared/shared-moderation/video-block.service.ts +++ b/client/src/app/shared/shared-moderation/video-block.service.ts | |||
@@ -4,8 +4,8 @@ import { catchError, concatMap, toArray } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { arrayify } from '@shared/core-utils' | 7 | import { arrayify } from '@peertube/peertube-core-utils' |
8 | import { ResultList, VideoBlacklist, VideoBlacklistType } from '@shared/models' | 8 | import { ResultList, VideoBlacklist, VideoBlacklistType, VideoBlacklistType_Type } from '@peertube/peertube-models' |
9 | import { environment } from '../../../environments/environment' | 9 | import { environment } from '../../../environments/environment' |
10 | 10 | ||
11 | @Injectable() | 11 | @Injectable() |
@@ -22,7 +22,7 @@ export class VideoBlockService { | |||
22 | pagination: RestPagination | 22 | pagination: RestPagination |
23 | sort: SortMeta | 23 | sort: SortMeta |
24 | search?: string | 24 | search?: string |
25 | type?: VideoBlacklistType | 25 | type?: VideoBlacklistType_Type |
26 | }): Observable<ResultList<VideoBlacklist>> { | 26 | }): Observable<ResultList<VideoBlacklist>> { |
27 | const { pagination, sort, search, type } = options | 27 | const { pagination, sort, search, type } = options |
28 | 28 | ||
diff --git a/client/src/app/shared/shared-search/advanced-search.model.ts b/client/src/app/shared/shared-search/advanced-search.model.ts index 29fe3e8dc..b977a4801 100644 --- a/client/src/app/shared/shared-search/advanced-search.model.ts +++ b/client/src/app/shared/shared-search/advanced-search.model.ts | |||
@@ -6,7 +6,7 @@ import { | |||
6 | VideoChannelsSearchQuery, | 6 | VideoChannelsSearchQuery, |
7 | VideoPlaylistsSearchQuery, | 7 | VideoPlaylistsSearchQuery, |
8 | VideosSearchQuery | 8 | VideosSearchQuery |
9 | } from '@shared/models' | 9 | } from '@peertube/peertube-models' |
10 | 10 | ||
11 | export type AdvancedSearchResultType = 'videos' | 'playlists' | 'channels' | 11 | export type AdvancedSearchResultType = 'videos' | 'playlists' | 'channels' |
12 | 12 | ||
diff --git a/client/src/app/shared/shared-search/find-in-bulk.service.ts b/client/src/app/shared/shared-search/find-in-bulk.service.ts index 125d5e2b8..de57c7f64 100644 --- a/client/src/app/shared/shared-search/find-in-bulk.service.ts +++ b/client/src/app/shared/shared-search/find-in-bulk.service.ts | |||
@@ -3,11 +3,11 @@ import { Observable, Subject } from 'rxjs' | |||
3 | import { filter, first, map } from 'rxjs/operators' | 3 | import { filter, first, map } from 'rxjs/operators' |
4 | import { Injectable } from '@angular/core' | 4 | import { Injectable } from '@angular/core' |
5 | import { buildBulkObservable } from '@app/helpers' | 5 | import { buildBulkObservable } from '@app/helpers' |
6 | import { ResultList } from '@shared/models/common' | 6 | import { ResultList } from '@peertube/peertube-models' |
7 | import { Video, VideoChannel } from '../shared-main' | 7 | import { Video, VideoChannel } from '../shared-main' |
8 | import { VideoPlaylist } from '../shared-video-playlist' | 8 | import { VideoPlaylist } from '../shared-video-playlist' |
9 | import { SearchService } from './search.service' | ||
10 | import { AdvancedSearch } from './advanced-search.model' | 9 | import { AdvancedSearch } from './advanced-search.model' |
10 | import { SearchService } from './search.service' | ||
11 | 11 | ||
12 | const debugLogger = debug('peertube:search:FindInBulkService') | 12 | const debugLogger = debug('peertube:search:FindInBulkService') |
13 | 13 | ||
diff --git a/client/src/app/shared/shared-search/search.service.ts b/client/src/app/shared/shared-search/search.service.ts index ad2de0f37..281e0b4bd 100644 --- a/client/src/app/shared/shared-search/search.service.ts +++ b/client/src/app/shared/shared-search/search.service.ts | |||
@@ -9,7 +9,7 @@ import { | |||
9 | Video as VideoServerModel, | 9 | Video as VideoServerModel, |
10 | VideoChannel as VideoChannelServerModel, | 10 | VideoChannel as VideoChannelServerModel, |
11 | VideoPlaylist as VideoPlaylistServerModel | 11 | VideoPlaylist as VideoPlaylistServerModel |
12 | } from '@shared/models' | 12 | } from '@peertube/peertube-models' |
13 | import { environment } from '../../../environments/environment' | 13 | import { environment } from '../../../environments/environment' |
14 | import { VideoPlaylist, VideoPlaylistService } from '../shared-video-playlist' | 14 | import { VideoPlaylist, VideoPlaylistService } from '../shared-video-playlist' |
15 | import { AdvancedSearch } from './advanced-search.model' | 15 | import { AdvancedSearch } from './advanced-search.model' |
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.ts index b09222c3e..24c9cdeca 100644 --- a/client/src/app/shared/shared-share-modal/video-share.component.ts +++ b/client/src/app/shared/shared-share-modal/video-share.component.ts | |||
@@ -5,8 +5,8 @@ import { VideoDetails } from '@app/shared/shared-main' | |||
5 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' | 5 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' |
6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
7 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' | 7 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' |
8 | import { buildPlaylistLink, buildVideoLink, decoratePlaylistLink, decorateVideoLink } from '@shared/core-utils' | 8 | import { buildPlaylistLink, buildVideoLink, decoratePlaylistLink, decorateVideoLink } from '@peertube/peertube-core-utils' |
9 | import { VideoCaption, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' | 9 | import { VideoCaption, VideoPlaylistPrivacy, VideoPrivacy } from '@peertube/peertube-models' |
10 | 10 | ||
11 | type Customizations = { | 11 | type Customizations = { |
12 | startAtCheckbox: boolean | 12 | startAtCheckbox: boolean |
diff --git a/client/src/app/shared/shared-support-modal/support-modal.component.ts b/client/src/app/shared/shared-support-modal/support-modal.component.ts index f330228e1..d911b45d8 100644 --- a/client/src/app/shared/shared-support-modal/support-modal.component.ts +++ b/client/src/app/shared/shared-support-modal/support-modal.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, Input, ViewChild } from '@angular/core' | |||
2 | import { MarkdownService } from '@app/core' | 2 | import { MarkdownService } from '@app/core' |
3 | import { VideoDetails } from '@app/shared/shared-main' | 3 | import { VideoDetails } from '@app/shared/shared-main' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { VideoChannel } from '@shared/models' | 5 | import { VideoChannel } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-support-modal', | 8 | selector: 'my-support-modal', |
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts index ad5d30db2..c9a5c97db 100644 --- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts +++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, EventEmitter, Input, Output } from '@angular/core' | 1 | import { Component, EventEmitter, Input, Output } from '@angular/core' |
2 | import { ScreenService } from '@app/core' | 2 | import { ScreenService } from '@app/core' |
3 | import { VideoState } from '@shared/models' | 3 | import { VideoState } from '@peertube/peertube-models' |
4 | import { Video } from '../shared-main' | 4 | import { Video } from '../shared-main' |
5 | 5 | ||
6 | @Component({ | 6 | @Component({ |
diff --git a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts index c2c30d38b..08c6b6933 100644 --- a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts +++ b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts | |||
@@ -2,7 +2,7 @@ import { Subject, Subscription } from 'rxjs' | |||
2 | import { Component, Input, OnDestroy, OnInit } from '@angular/core' | 2 | import { Component, Input, OnDestroy, OnInit } from '@angular/core' |
3 | import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core' | 3 | import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core' |
4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 4 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
5 | import { HTMLServerConfig, User, UserUpdateMe } from '@shared/models' | 5 | import { HTMLServerConfig, User, UserUpdateMe } from '@peertube/peertube-models' |
6 | import { SelectOptionsItem } from 'src/types' | 6 | import { SelectOptionsItem } from 'src/types' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts index ed6e7fffd..234d5b217 100644 --- a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts +++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts | |||
@@ -4,8 +4,7 @@ import { first } from 'rxjs/operators' | |||
4 | import { Component, Input, OnDestroy, OnInit } from '@angular/core' | 4 | import { Component, Input, OnDestroy, OnInit } from '@angular/core' |
5 | import { AuthService, Notifier, ServerService, User, UserService } from '@app/core' | 5 | import { AuthService, Notifier, ServerService, User, UserService } from '@app/core' |
6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
7 | import { UserUpdateMe } from '@shared/models' | 7 | import { NSFWPolicyType, UserUpdateMe } from '@peertube/peertube-models' |
8 | import { NSFWPolicyType } from '@shared/models/videos/nsfw-policy.type' | ||
9 | 8 | ||
10 | @Component({ | 9 | @Component({ |
11 | selector: 'my-user-video-settings', | 10 | selector: 'my-user-video-settings', |
diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts index a002bf4e7..2a5751824 100644 --- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts | |||
@@ -2,7 +2,7 @@ import { concat, forkJoin, merge } from 'rxjs' | |||
2 | import { Component, Input, OnChanges, OnInit } from '@angular/core' | 2 | import { Component, Input, OnChanges, OnInit } from '@angular/core' |
3 | import { AuthService, Notifier, RedirectService } from '@app/core' | 3 | import { AuthService, Notifier, RedirectService } from '@app/core' |
4 | import { Account, VideoChannel, VideoService } from '@app/shared/shared-main' | 4 | import { Account, VideoChannel, VideoService } from '@app/shared/shared-main' |
5 | import { FeedFormat } from '@shared/models' | 5 | import { FeedFormat } from '@peertube/peertube-models' |
6 | import { UserSubscriptionService } from './user-subscription.service' | 6 | import { UserSubscriptionService } from './user-subscription.service' |
7 | 7 | ||
8 | @Component({ | 8 | @Component({ |
diff --git a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts index 9cf6b4d16..b83f7ebc5 100644 --- a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts +++ b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts | |||
@@ -6,7 +6,7 @@ import { Injectable } from '@angular/core' | |||
6 | import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' | 6 | import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' |
7 | import { buildBulkObservable } from '@app/helpers' | 7 | import { buildBulkObservable } from '@app/helpers' |
8 | import { Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' | 8 | import { Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' |
9 | import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@shared/models' | 9 | import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@peertube/peertube-models' |
10 | import { environment } from '../../../environments/environment' | 10 | import { environment } from '../../../environments/environment' |
11 | 11 | ||
12 | const debugLogger = debug('peertube:subscriptions:UserSubscriptionService') | 12 | const debugLogger = debug('peertube:subscriptions:UserSubscriptionService') |
diff --git a/client/src/app/shared/shared-users/two-factor.service.ts b/client/src/app/shared/shared-users/two-factor.service.ts index 9ff916f15..cb4450e8f 100644 --- a/client/src/app/shared/shared-users/two-factor.service.ts +++ b/client/src/app/shared/shared-users/two-factor.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { RestExtractor, UserService } from '@app/core' | 4 | import { RestExtractor, UserService } from '@app/core' |
5 | import { TwoFactorEnableResult } from '@shared/models' | 5 | import { TwoFactorEnableResult } from '@peertube/peertube-models' |
6 | 6 | ||
7 | @Injectable() | 7 | @Injectable() |
8 | export class TwoFactorService { | 8 | export class TwoFactorService { |
diff --git a/client/src/app/shared/shared-users/user-admin.service.ts b/client/src/app/shared/shared-users/user-admin.service.ts index 5842bd271..cc706343f 100644 --- a/client/src/app/shared/shared-users/user-admin.service.ts +++ b/client/src/app/shared/shared-users/user-admin.service.ts | |||
@@ -5,8 +5,8 @@ import { HttpClient, HttpParams } from '@angular/common/http' | |||
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core' |
7 | import { getBytes } from '@root-helpers/bytes' | 7 | import { getBytes } from '@root-helpers/bytes' |
8 | import { arrayify, peertubeTranslate } from '@shared/core-utils' | 8 | import { arrayify, peertubeTranslate } from '@peertube/peertube-core-utils' |
9 | import { ResultList, User as UserServerModel, UserCreate, UserUpdate } from '@shared/models' | 9 | import { ResultList, User as UserServerModel, UserCreate, UserUpdate } from '@peertube/peertube-models' |
10 | 10 | ||
11 | @Injectable() | 11 | @Injectable() |
12 | export class UserAdminService { | 12 | export class UserAdminService { |
diff --git a/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts b/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts index 9956c88a6..62683f57f 100644 --- a/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts +++ b/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { VideoCommentThreadTree as VideoCommentThreadTreeServerModel } from '@shared/models' | 1 | import { VideoCommentThreadTree as VideoCommentThreadTreeServerModel } from '@peertube/peertube-models' |
2 | import { VideoComment } from './video-comment.model' | 2 | import { VideoComment } from './video-comment.model' |
3 | 3 | ||
4 | export class VideoCommentThreadTree implements VideoCommentThreadTreeServerModel { | 4 | export class VideoCommentThreadTree implements VideoCommentThreadTreeServerModel { |
diff --git a/client/src/app/shared/shared-video-comment/video-comment.model.ts b/client/src/app/shared/shared-video-comment/video-comment.model.ts index adab4cfbd..7048ed66f 100644 --- a/client/src/app/shared/shared-video-comment/video-comment.model.ts +++ b/client/src/app/shared/shared-video-comment/video-comment.model.ts | |||
@@ -4,7 +4,7 @@ import { | |||
4 | Account as AccountInterface, | 4 | Account as AccountInterface, |
5 | VideoComment as VideoCommentServerModel, | 5 | VideoComment as VideoCommentServerModel, |
6 | VideoCommentAdmin as VideoCommentAdminServerModel | 6 | VideoCommentAdmin as VideoCommentAdminServerModel |
7 | } from '@shared/models' | 7 | } from '@peertube/peertube-models' |
8 | 8 | ||
9 | export class VideoComment implements VideoCommentServerModel { | 9 | export class VideoComment implements VideoCommentServerModel { |
10 | id: number | 10 | id: number |
diff --git a/client/src/app/shared/shared-video-comment/video-comment.service.ts b/client/src/app/shared/shared-video-comment/video-comment.service.ts index 3906652be..d1db773c4 100644 --- a/client/src/app/shared/shared-video-comment/video-comment.service.ts +++ b/client/src/app/shared/shared-video-comment/video-comment.service.ts | |||
@@ -14,7 +14,7 @@ import { | |||
14 | VideoCommentAdmin, | 14 | VideoCommentAdmin, |
15 | VideoCommentCreate, | 15 | VideoCommentCreate, |
16 | VideoCommentThreadTree as VideoCommentThreadTreeServerModel | 16 | VideoCommentThreadTree as VideoCommentThreadTreeServerModel |
17 | } from '@shared/models' | 17 | } from '@peertube/peertube-models' |
18 | import { environment } from '../../../environments/environment' | 18 | import { environment } from '../../../environments/environment' |
19 | import { VideoCommentThreadTree } from './video-comment-thread-tree.model' | 19 | import { VideoCommentThreadTree } from './video-comment-thread-tree.model' |
20 | import { VideoComment } from './video-comment.model' | 20 | import { VideoComment } from './video-comment.model' |
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.ts b/client/src/app/shared/shared-video-live/live-stream-information.component.ts index 400a6fa01..4089c88fb 100644 --- a/client/src/app/shared/shared-video-live/live-stream-information.component.ts +++ b/client/src/app/shared/shared-video-live/live-stream-information.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ElementRef, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, ViewChild } from '@angular/core' |
2 | import { Video } from '@app/shared/shared-main' | 2 | import { Video } from '@app/shared/shared-main' |
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
4 | import { LiveVideo, LiveVideoError, LiveVideoSession } from '@shared/models' | 4 | import { LiveVideo, LiveVideoError, LiveVideoErrorType, LiveVideoSession } from '@peertube/peertube-models' |
5 | import { LiveVideoService } from './live-video.service' | 5 | import { LiveVideoService } from './live-video.service' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
@@ -38,7 +38,7 @@ export class LiveStreamInformationComponent { | |||
38 | getErrorLabel (session: LiveVideoSession) { | 38 | getErrorLabel (session: LiveVideoSession) { |
39 | if (!session.error) return undefined | 39 | if (!session.error) return undefined |
40 | 40 | ||
41 | const errors: { [ id in LiveVideoError ]: string } = { | 41 | const errors: { [ id in LiveVideoErrorType ]: string } = { |
42 | [LiveVideoError.BAD_SOCKET_HEALTH]: $localize`Server too slow`, | 42 | [LiveVideoError.BAD_SOCKET_HEALTH]: $localize`Server too slow`, |
43 | [LiveVideoError.BLACKLISTED]: $localize`Live blacklisted`, | 43 | [LiveVideoError.BLACKLISTED]: $localize`Live blacklisted`, |
44 | [LiveVideoError.DURATION_EXCEEDED]: $localize`Max duration exceeded`, | 44 | [LiveVideoError.DURATION_EXCEEDED]: $localize`Max duration exceeded`, |
diff --git a/client/src/app/shared/shared-video-live/live-video.service.ts b/client/src/app/shared/shared-video-live/live-video.service.ts index 89bfd84a0..8ac0eb924 100644 --- a/client/src/app/shared/shared-video-live/live-video.service.ts +++ b/client/src/app/shared/shared-video-live/live-video.service.ts | |||
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators' | |||
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { RestExtractor } from '@app/core' | 4 | import { RestExtractor } from '@app/core' |
5 | import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models' | 5 | import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@peertube/peertube-models' |
6 | import { environment } from '../../../environments/environment' | 6 | import { environment } from '../../../environments/environment' |
7 | import { VideoService } from '../shared-main' | 7 | import { VideoService } from '../shared-main' |
8 | 8 | ||
diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts index 9891aae2e..4b3ed6e99 100644 --- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@a | |||
2 | import { AuthService, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core' | 2 | import { AuthService, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core' |
3 | import { BlocklistService, VideoBlockComponent, VideoBlockService, VideoReportComponent } from '@app/shared/shared-moderation' | 3 | import { BlocklistService, VideoBlockComponent, VideoBlockService, VideoReportComponent } from '@app/shared/shared-moderation' |
4 | import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' |
5 | import { VideoCaption } from '@shared/models' | 5 | import { VideoCaption } from '@peertube/peertube-models' |
6 | import { | 6 | import { |
7 | Actor, | 7 | Actor, |
8 | DropdownAction, | 8 | DropdownAction, |
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts index 146ea7dfe..123f40b2f 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts | |||
@@ -6,8 +6,8 @@ import { HooksService } from '@app/core' | |||
6 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
7 | import { logger } from '@root-helpers/logger' | 7 | import { logger } from '@root-helpers/logger' |
8 | import { videoRequiresFileToken } from '@root-helpers/video' | 8 | import { videoRequiresFileToken } from '@root-helpers/video' |
9 | import { objectKeysTyped, pick } from '@shared/core-utils' | 9 | import { objectKeysTyped, pick } from '@peertube/peertube-core-utils' |
10 | import { VideoCaption, VideoFile } from '@shared/models' | 10 | import { VideoCaption, VideoFile } from '@peertube/peertube-models' |
11 | import { BytesPipe, NumberFormatterPipe, VideoDetails, VideoFileTokenService, VideoService } from '../shared-main' | 11 | import { BytesPipe, NumberFormatterPipe, VideoDetails, VideoFileTokenService, VideoService } from '../shared-main' |
12 | 12 | ||
13 | type DownloadType = 'video' | 'subtitles' | 13 | type DownloadType = 'video' | 'subtitles' |
diff --git a/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts b/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts index a5da9ebf3..2826408e7 100644 --- a/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts | |||
@@ -4,7 +4,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angu | |||
4 | import { FormBuilder, FormGroup } from '@angular/forms' | 4 | import { FormBuilder, FormGroup } from '@angular/forms' |
5 | import { AuthService } from '@app/core' | 5 | import { AuthService } from '@app/core' |
6 | import { ServerService } from '@app/core/server/server.service' | 6 | import { ServerService } from '@app/core/server/server.service' |
7 | import { UserRight } from '@shared/models' | 7 | import { UserRight } from '@peertube/peertube-models' |
8 | import { PeertubeModalService } from '../shared-main' | 8 | import { PeertubeModalService } from '../shared-main' |
9 | import { VideoFilters } from './video-filters.model' | 9 | import { VideoFilters } from './video-filters.model' |
10 | 10 | ||
diff --git a/client/src/app/shared/shared-video-miniature/video-filters.model.ts b/client/src/app/shared/shared-video-miniature/video-filters.model.ts index f57a45eb1..8db17c015 100644 --- a/client/src/app/shared/shared-video-miniature/video-filters.model.ts +++ b/client/src/app/shared/shared-video-miniature/video-filters.model.ts | |||
@@ -1,8 +1,14 @@ | |||
1 | import { splitIntoArray, toBoolean } from '@app/helpers' | 1 | import { splitIntoArray, toBoolean } from '@app/helpers' |
2 | import { getAllPrivacies } from '@shared/core-utils' | 2 | import { escapeHTML, getAllPrivacies } from '@peertube/peertube-core-utils' |
3 | import { escapeHTML } from '@shared/core-utils/renderer' | 3 | import { |
4 | import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoPrivacy, VideoSortField } from '@shared/models' | 4 | BooleanBothQuery, |
5 | import { AttributesOnly } from '@shared/typescript-utils' | 5 | NSFWPolicyType, |
6 | VideoInclude, | ||
7 | VideoIncludeType, | ||
8 | VideoPrivacyType, | ||
9 | VideoSortField | ||
10 | } from '@peertube/peertube-models' | ||
11 | import { AttributesOnly } from '@peertube/peertube-typescript-utils' | ||
6 | 12 | ||
7 | type VideoFiltersKeys = { | 13 | type VideoFiltersKeys = { |
8 | [ id in keyof AttributesOnly<VideoFilters> ]: any | 14 | [ id in keyof AttributesOnly<VideoFilters> ]: any |
@@ -207,8 +213,8 @@ export class VideoFilters { | |||
207 | 213 | ||
208 | toVideosAPIObject () { | 214 | toVideosAPIObject () { |
209 | let isLocal: boolean | 215 | let isLocal: boolean |
210 | let include: VideoInclude | 216 | let include: VideoIncludeType |
211 | let privacyOneOf: VideoPrivacy[] | 217 | let privacyOneOf: VideoPrivacyType[] |
212 | 218 | ||
213 | if (this.scope === 'local') { | 219 | if (this.scope === 'local') { |
214 | isLocal = true | 220 | isLocal = true |
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts index d453f37a1..11cd6726e 100644 --- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | Output | 11 | Output |
12 | } from '@angular/core' | 12 | } from '@angular/core' |
13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' | 13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
14 | import { HTMLServerConfig, VideoExistInPlaylist, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' | 14 | import { HTMLServerConfig, VideoExistInPlaylist, VideoPlaylistType, VideoPrivacy, VideoState } from '@peertube/peertube-models' |
15 | import { LinkType } from '../../../types/link.type' | 15 | import { LinkType } from '../../../types/link.type' |
16 | import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component' | 16 | import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component' |
17 | import { Video, VideoService } from '../shared-main' | 17 | import { Video, VideoService } from '../shared-main' |
diff --git a/client/src/app/shared/shared-video-miniature/videos-list.component.ts b/client/src/app/shared/shared-video-miniature/videos-list.component.ts index 14a5abd7a..afdef5ace 100644 --- a/client/src/app/shared/shared-video-miniature/videos-list.component.ts +++ b/client/src/app/shared/shared-video-miniature/videos-list.component.ts | |||
@@ -15,8 +15,8 @@ import { | |||
15 | } from '@app/core' | 15 | } from '@app/core' |
16 | import { GlobalIconName } from '@app/shared/shared-icons' | 16 | import { GlobalIconName } from '@app/shared/shared-icons' |
17 | import { logger } from '@root-helpers/logger' | 17 | import { logger } from '@root-helpers/logger' |
18 | import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@shared/core-utils' | 18 | import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@peertube/peertube-core-utils' |
19 | import { ResultList, UserRight, VideoSortField } from '@shared/models' | 19 | import { ResultList, UserRight, VideoSortField } from '@peertube/peertube-models' |
20 | import { Syndication, Video } from '../shared-main' | 20 | import { Syndication, Video } from '../shared-main' |
21 | import { VideoFilters, VideoFilterScope } from './video-filters.model' | 21 | import { VideoFilters, VideoFilterScope } from './video-filters.model' |
22 | import { MiniatureDisplayOptions } from './video-miniature.component' | 22 | import { MiniatureDisplayOptions } from './video-miniature.component' |
diff --git a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts index 86fe502e2..286b33dd4 100644 --- a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts +++ b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts | |||
@@ -2,8 +2,8 @@ import { Observable, Subject } from 'rxjs' | |||
2 | import { AfterContentInit, Component, ContentChildren, EventEmitter, Input, Output, QueryList, TemplateRef } from '@angular/core' | 2 | import { AfterContentInit, Component, ContentChildren, EventEmitter, Input, Output, QueryList, TemplateRef } from '@angular/core' |
3 | import { ComponentPagination, Notifier, User } from '@app/core' | 3 | import { ComponentPagination, Notifier, User } from '@app/core' |
4 | import { logger } from '@root-helpers/logger' | 4 | import { logger } from '@root-helpers/logger' |
5 | import { objectKeysTyped } from '@shared/core-utils' | 5 | import { objectKeysTyped } from '@peertube/peertube-core-utils' |
6 | import { ResultList, VideosExistInPlaylists, VideoSortField } from '@shared/models' | 6 | import { ResultList, VideosExistInPlaylists, VideoSortField } from '@peertube/peertube-models' |
7 | import { PeerTubeTemplateDirective, Video } from '../shared-main' | 7 | import { PeerTubeTemplateDirective, Video } from '../shared-main' |
8 | import { MiniatureDisplayOptions } from './video-miniature.component' | 8 | import { MiniatureDisplayOptions } from './video-miniature.component' |
9 | 9 | ||
diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts index f802416a4..84173ba69 100644 --- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts | |||
@@ -4,7 +4,7 @@ import { debounceTime, filter } from 'rxjs/operators' | |||
4 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core' | 4 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core' |
5 | import { AuthService, DisableForReuseHook, Notifier } from '@app/core' | 5 | import { AuthService, DisableForReuseHook, Notifier } from '@app/core' |
6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 6 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
7 | import { secondsToTime } from '@shared/core-utils' | 7 | import { secondsToTime } from '@peertube/peertube-core-utils' |
8 | import { | 8 | import { |
9 | CachedVideoExistInPlaylist, | 9 | CachedVideoExistInPlaylist, |
10 | Video, | 10 | Video, |
@@ -12,7 +12,7 @@ import { | |||
12 | VideoPlaylistElementCreate, | 12 | VideoPlaylistElementCreate, |
13 | VideoPlaylistElementUpdate, | 13 | VideoPlaylistElementUpdate, |
14 | VideoPlaylistPrivacy | 14 | VideoPlaylistPrivacy |
15 | } from '@shared/models' | 15 | } from '@peertube/peertube-models' |
16 | import { VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR } from '../form-validators/video-playlist-validators' | 16 | import { VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR } from '../form-validators/video-playlist-validators' |
17 | import { CachedPlaylist, VideoPlaylistService } from './video-playlist.service' | 17 | import { CachedPlaylist, VideoPlaylistService } from './video-playlist.service' |
18 | 18 | ||
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts index b9a1d9623..0c0f11ecc 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts | |||
@@ -2,8 +2,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, In | |||
2 | import { AuthService, Notifier, ServerService } from '@app/core' | 2 | import { AuthService, Notifier, ServerService } from '@app/core' |
3 | import { Video, VideoService } from '@app/shared/shared-main' | 3 | import { Video, VideoService } from '@app/shared/shared-main' |
4 | import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' |
5 | import { secondsToTime } from '@shared/core-utils' | 5 | import { secondsToTime } from '@peertube/peertube-core-utils' |
6 | import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate, VideoPrivacy } from '@shared/models' | 6 | import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate, VideoPrivacy } from '@peertube/peertube-models' |
7 | import { VideoPlaylistElement } from './video-playlist-element.model' | 7 | import { VideoPlaylistElement } from './video-playlist-element.model' |
8 | import { VideoPlaylist } from './video-playlist.model' | 8 | import { VideoPlaylist } from './video-playlist.model' |
9 | import { VideoPlaylistService } from './video-playlist.service' | 9 | import { VideoPlaylistService } from './video-playlist.service' |
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts index b661378bd..16b212281 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Video } from '@app/shared/shared-main' | 1 | import { Video } from '@app/shared/shared-main' |
2 | import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType } from '@shared/models' | 2 | import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType_Type } from '@peertube/peertube-models' |
3 | 3 | ||
4 | export class VideoPlaylistElement implements ServerVideoPlaylistElement { | 4 | export class VideoPlaylistElement implements ServerVideoPlaylistElement { |
5 | id: number | 5 | id: number |
@@ -7,7 +7,7 @@ export class VideoPlaylistElement implements ServerVideoPlaylistElement { | |||
7 | startTimestamp: number | 7 | startTimestamp: number |
8 | stopTimestamp: number | 8 | stopTimestamp: number |
9 | 9 | ||
10 | type: VideoPlaylistElementType | 10 | type: VideoPlaylistElementType_Type |
11 | 11 | ||
12 | video?: Video | 12 | video?: Video |
13 | 13 | ||
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts index 6b38d9ca3..24f1041ce 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts | |||
@@ -1,15 +1,15 @@ | |||
1 | import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' |
2 | import { Actor } from '@app/shared/shared-main' | 2 | import { Actor } from '@app/shared/shared-main' |
3 | import { buildPlaylistWatchPath } from '@shared/core-utils' | 3 | import { buildPlaylistWatchPath, peertubeTranslate } from '@peertube/peertube-core-utils' |
4 | import { peertubeTranslate } from '@shared/core-utils/i18n' | ||
5 | import { | 4 | import { |
6 | AccountSummary, | 5 | AccountSummary, |
7 | VideoChannelSummary, | 6 | VideoChannelSummary, |
8 | VideoConstant, | 7 | VideoConstant, |
9 | VideoPlaylist as ServerVideoPlaylist, | 8 | VideoPlaylist as ServerVideoPlaylist, |
10 | VideoPlaylistPrivacy, | 9 | VideoPlaylistPrivacyType, |
11 | VideoPlaylistType | 10 | VideoPlaylistType, |
12 | } from '@shared/models' | 11 | VideoPlaylistType_Type |
12 | } from '@peertube/peertube-models' | ||
13 | 13 | ||
14 | export class VideoPlaylist implements ServerVideoPlaylist { | 14 | export class VideoPlaylist implements ServerVideoPlaylist { |
15 | id: number | 15 | id: number |
@@ -22,11 +22,11 @@ export class VideoPlaylist implements ServerVideoPlaylist { | |||
22 | 22 | ||
23 | displayName: string | 23 | displayName: string |
24 | description: string | 24 | description: string |
25 | privacy: VideoConstant<VideoPlaylistPrivacy> | 25 | privacy: VideoConstant<VideoPlaylistPrivacyType> |
26 | 26 | ||
27 | videosLength: number | 27 | videosLength: number |
28 | 28 | ||
29 | type: VideoConstant<VideoPlaylistType> | 29 | type: VideoConstant<VideoPlaylistType_Type> |
30 | 30 | ||
31 | createdAt: Date | string | 31 | createdAt: Date | string |
32 | updatedAt: Date | string | 32 | updatedAt: Date | string |
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts index bc9fb0d74..7f0da2be8 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts | |||
@@ -20,7 +20,7 @@ import { | |||
20 | VideoPlaylistReorder, | 20 | VideoPlaylistReorder, |
21 | VideoPlaylistUpdate, | 21 | VideoPlaylistUpdate, |
22 | VideosExistInPlaylists | 22 | VideosExistInPlaylists |
23 | } from '@shared/models' | 23 | } from '@peertube/peertube-models' |
24 | import { environment } from '../../../environments/environment' | 24 | import { environment } from '../../../environments/environment' |
25 | import { VideoPlaylistElement } from './video-playlist-element.model' | 25 | import { VideoPlaylistElement } from './video-playlist-element.model' |
26 | import { VideoPlaylist } from './video-playlist.model' | 26 | import { VideoPlaylist } from './video-playlist.model' |
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index 69ca1a566..4da681a08 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -30,7 +30,7 @@ import { PluginsManager } from '@root-helpers/plugins-manager' | |||
30 | import { copyToClipboard } from '@root-helpers/utils' | 30 | import { copyToClipboard } from '@root-helpers/utils' |
31 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' | 31 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' |
32 | import { isMobile } from '@root-helpers/web-browser' | 32 | import { isMobile } from '@root-helpers/web-browser' |
33 | import { buildVideoLink, decorateVideoLink, isDefaultLocale, pick } from '@shared/core-utils' | 33 | import { buildVideoLink, decorateVideoLink, isDefaultLocale, pick } from '@peertube/peertube-core-utils' |
34 | import { saveAverageBandwidth } from './peertube-player-local-storage' | 34 | import { saveAverageBandwidth } from './peertube-player-local-storage' |
35 | import { ControlBarOptionsBuilder, HLSOptionsBuilder, WebVideoOptionsBuilder } from './shared/player-options-builder' | 35 | import { ControlBarOptionsBuilder, HLSOptionsBuilder, WebVideoOptionsBuilder } from './shared/player-options-builder' |
36 | import { TranslationsManager } from './translations-manager' | 36 | import { TranslationsManager } from './translations-manager' |
@@ -51,6 +51,8 @@ if (PlayProgressBar.prototype.options_.children.includes('timeTooltip') !== true | |||
51 | PlayProgressBar.prototype.options_.children.push('timeTooltip') | 51 | PlayProgressBar.prototype.options_.children.push('timeTooltip') |
52 | } | 52 | } |
53 | 53 | ||
54 | export { videojs } | ||
55 | |||
54 | export class PeerTubePlayer { | 56 | export class PeerTubePlayer { |
55 | private pluginsManager: PluginsManager | 57 | private pluginsManager: PluginsManager |
56 | 58 | ||
@@ -516,9 +518,3 @@ export class PeerTubePlayer { | |||
516 | return { content } | 518 | return { content } |
517 | } | 519 | } |
518 | } | 520 | } |
519 | |||
520 | // ############################################################################ | ||
521 | |||
522 | export { | ||
523 | videojs | ||
524 | } | ||
diff --git a/client/src/assets/player/shared/common/utils.ts b/client/src/assets/player/shared/common/utils.ts index 609240626..4a7182021 100644 --- a/client/src/assets/player/shared/common/utils.ts +++ b/client/src/assets/player/shared/common/utils.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { VideoFile } from '@shared/models' | 1 | import { VideoFile } from '@peertube/peertube-models' |
2 | 2 | ||
3 | function toTitleCase (str: string) { | 3 | function toTitleCase (str: string) { |
4 | return str.charAt(0).toUpperCase() + str.slice(1) | 4 | return str.charAt(0).toUpperCase() + str.slice(1) |
diff --git a/client/src/assets/player/shared/control-bar/peertube-link-button.ts b/client/src/assets/player/shared/control-bar/peertube-link-button.ts index 8242b9cea..f93c265d6 100644 --- a/client/src/assets/player/shared/control-bar/peertube-link-button.ts +++ b/client/src/assets/player/shared/control-bar/peertube-link-button.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import videojs from 'video.js' | 1 | import videojs from 'video.js' |
2 | import { buildVideoLink, decorateVideoLink } from '@shared/core-utils' | 2 | import { buildVideoLink, decorateVideoLink } from '@peertube/peertube-core-utils' |
3 | import { PeerTubeLinkButtonOptions } from '../../types' | 3 | import { PeerTubeLinkButtonOptions } from '../../types' |
4 | 4 | ||
5 | const Component = videojs.getComponent('Component') | 5 | const Component = videojs.getComponent('Component') |
diff --git a/client/src/assets/player/shared/metrics/metrics-plugin.ts b/client/src/assets/player/shared/metrics/metrics-plugin.ts index 06ca0c2f2..0ad16338c 100644 --- a/client/src/assets/player/shared/metrics/metrics-plugin.ts +++ b/client/src/assets/player/shared/metrics/metrics-plugin.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import debug from 'debug' | 1 | import debug from 'debug' |
2 | import videojs from 'video.js' | 2 | import videojs from 'video.js' |
3 | import { PlaybackMetricCreate, VideoResolutionType } from '@peertube/peertube-models' | ||
3 | import { logger } from '@root-helpers/logger' | 4 | import { logger } from '@root-helpers/logger' |
4 | import { PlaybackMetricCreate } from '../../../../../../shared/models' | ||
5 | import { MetricsPluginOptions, PlayerNetworkInfo } from '../../types' | 5 | import { MetricsPluginOptions, PlayerNetworkInfo } from '../../types' |
6 | 6 | ||
7 | const debugLogger = debug('peertube:player:metrics') | 7 | const debugLogger = debug('peertube:player:metrics') |
@@ -102,7 +102,7 @@ class MetricsPlugin extends Plugin { | |||
102 | } | 102 | } |
103 | 103 | ||
104 | const body: PlaybackMetricCreate = { | 104 | const body: PlaybackMetricCreate = { |
105 | resolution, | 105 | resolution: resolution as VideoResolutionType, |
106 | fps, | 106 | fps, |
107 | 107 | ||
108 | playerMode: this.options_.mode(), | 108 | playerMode: this.options_.mode(), |
diff --git a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts index 8c376cd21..1e47fe486 100644 --- a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts | |||
@@ -3,7 +3,7 @@ import videojs from 'video.js' | |||
3 | import { Events, Segment } from '@peertube/p2p-media-loader-core' | 3 | import { Events, Segment } from '@peertube/p2p-media-loader-core' |
4 | import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from '@peertube/p2p-media-loader-hlsjs' | 4 | import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from '@peertube/p2p-media-loader-hlsjs' |
5 | import { logger } from '@root-helpers/logger' | 5 | import { logger } from '@root-helpers/logger' |
6 | import { addQueryParams } from '@shared/core-utils' | 6 | import { addQueryParams } from '@peertube/peertube-core-utils' |
7 | import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../../types' | 7 | import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../../types' |
8 | import { SettingsButton } from '../settings/settings-menu-button' | 8 | import { SettingsButton } from '../settings/settings-menu-button' |
9 | 9 | ||
diff --git a/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts b/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts index 9cb6344a9..75d483015 100644 --- a/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts +++ b/client/src/assets/player/shared/p2p-media-loader/segment-validator.ts | |||
@@ -2,7 +2,7 @@ import { basename } from 'path' | |||
2 | import { Segment } from '@peertube/p2p-media-loader-core' | 2 | import { Segment } from '@peertube/p2p-media-loader-core' |
3 | import { logger } from '@root-helpers/logger' | 3 | import { logger } from '@root-helpers/logger' |
4 | import { wait } from '@root-helpers/utils' | 4 | import { wait } from '@root-helpers/utils' |
5 | import { removeQueryParams } from '@shared/core-utils' | 5 | import { removeQueryParams } from '@peertube/peertube-core-utils' |
6 | import { isSameOrigin } from '../common' | 6 | import { isSameOrigin } from '../common' |
7 | 7 | ||
8 | type SegmentsJSON = { [filename: string]: string | { [byterange: string]: string } } | 8 | type SegmentsJSON = { [filename: string]: string | { [byterange: string]: string } } |
diff --git a/client/src/assets/player/shared/peertube/peertube-plugin.ts b/client/src/assets/player/shared/peertube/peertube-plugin.ts index f93593415..cf866723c 100644 --- a/client/src/assets/player/shared/peertube/peertube-plugin.ts +++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import debug from 'debug' | 1 | import debug from 'debug' |
2 | import videojs from 'video.js' | 2 | import videojs from 'video.js' |
3 | import { timeToInt } from '@peertube/peertube-core-utils' | ||
4 | import { VideoView, VideoViewEvent } from '@peertube/peertube-models' | ||
3 | import { logger } from '@root-helpers/logger' | 5 | import { logger } from '@root-helpers/logger' |
4 | import { isIOS, isMobile, isSafari } from '@root-helpers/web-browser' | 6 | import { isIOS, isMobile, isSafari } from '@root-helpers/web-browser' |
5 | import { timeToInt } from '@shared/core-utils' | ||
6 | import { VideoView, VideoViewEvent } from '@shared/models/videos' | ||
7 | import { | 7 | import { |
8 | getStoredLastSubtitle, | 8 | getStoredLastSubtitle, |
9 | getStoredMute, | 9 | getStoredMute, |
diff --git a/client/src/assets/player/shared/player-options-builder/hls-options-builder.ts b/client/src/assets/player/shared/player-options-builder/hls-options-builder.ts index fd632d90d..41198afbe 100644 --- a/client/src/assets/player/shared/player-options-builder/hls-options-builder.ts +++ b/client/src/assets/player/shared/player-options-builder/hls-options-builder.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { HybridLoaderSettings } from '@peertube/p2p-media-loader-core' | 1 | import { HybridLoaderSettings } from '@peertube/p2p-media-loader-core' |
2 | import { HlsJsEngineSettings } from '@peertube/p2p-media-loader-hlsjs' | 2 | import { HlsJsEngineSettings } from '@peertube/p2p-media-loader-hlsjs' |
3 | import { logger } from '@root-helpers/logger' | 3 | import { logger } from '@root-helpers/logger' |
4 | import { LiveVideoLatencyMode } from '@shared/models' | 4 | import { LiveVideoLatencyMode } from '@peertube/peertube-models' |
5 | import { getAverageBandwidthInStore } from '../../peertube-player-local-storage' | 5 | import { getAverageBandwidthInStore } from '../../peertube-player-local-storage' |
6 | import { P2PMediaLoader, P2PMediaLoaderPluginOptions, PeerTubePlayerContructorOptions, PeerTubePlayerLoadOptions } from '../../types' | 6 | import { P2PMediaLoader, P2PMediaLoaderPluginOptions, PeerTubePlayerContructorOptions, PeerTubePlayerLoadOptions } from '../../types' |
7 | import { getRtcConfig, isSameOrigin } from '../common' | 7 | import { getRtcConfig, isSameOrigin } from '../common' |
diff --git a/client/src/assets/player/shared/playlist/playlist-menu-item.ts b/client/src/assets/player/shared/playlist/playlist-menu-item.ts index f9366332d..66c92d9e5 100644 --- a/client/src/assets/player/shared/playlist/playlist-menu-item.ts +++ b/client/src/assets/player/shared/playlist/playlist-menu-item.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import videojs from 'video.js' | 1 | import videojs from 'video.js' |
2 | import { secondsToTime } from '@shared/core-utils' | 2 | import { secondsToTime } from '@peertube/peertube-core-utils' |
3 | import { VideoPlaylistElement } from '@shared/models' | 3 | import { VideoPlaylistElement } from '@peertube/peertube-models' |
4 | import { PlaylistItemOptions } from '../../types' | 4 | import { PlaylistItemOptions } from '../../types' |
5 | 5 | ||
6 | const Component = videojs.getComponent('Component') | 6 | const Component = videojs.getComponent('Component') |
diff --git a/client/src/assets/player/shared/playlist/playlist-menu.ts b/client/src/assets/player/shared/playlist/playlist-menu.ts index 53a5a7274..f6795390c 100644 --- a/client/src/assets/player/shared/playlist/playlist-menu.ts +++ b/client/src/assets/player/shared/playlist/playlist-menu.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import videojs from 'video.js' | 1 | import videojs from 'video.js' |
2 | import { VideoPlaylistElement } from '@shared/models' | 2 | import { VideoPlaylistElement } from '@peertube/peertube-models' |
3 | import { PlaylistPluginOptions } from '../../types' | 3 | import { PlaylistPluginOptions } from '../../types' |
4 | import { PlaylistMenuItem } from './playlist-menu-item' | 4 | import { PlaylistMenuItem } from './playlist-menu-item' |
5 | 5 | ||
diff --git a/client/src/assets/player/shared/stats/stats-card.ts b/client/src/assets/player/shared/stats/stats-card.ts index 13334d91a..fefe8483e 100644 --- a/client/src/assets/player/shared/stats/stats-card.ts +++ b/client/src/assets/player/shared/stats/stats-card.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import videojs from 'video.js' | 1 | import videojs from 'video.js' |
2 | import { logger } from '@root-helpers/logger' | 2 | import { logger } from '@root-helpers/logger' |
3 | import { secondsToTime } from '@shared/core-utils' | 3 | import { secondsToTime } from '@peertube/peertube-core-utils' |
4 | import { PlayerNetworkInfo as EventPlayerNetworkInfo } from '../../types' | 4 | import { PlayerNetworkInfo as EventPlayerNetworkInfo } from '../../types' |
5 | import { bytes } from '../common' | 5 | import { bytes } from '../common' |
6 | 6 | ||
diff --git a/client/src/assets/player/shared/web-video/web-video-plugin.ts b/client/src/assets/player/shared/web-video/web-video-plugin.ts index b839062f2..18d911108 100644 --- a/client/src/assets/player/shared/web-video/web-video-plugin.ts +++ b/client/src/assets/player/shared/web-video/web-video-plugin.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import debug from 'debug' | 1 | import debug from 'debug' |
2 | import videojs from 'video.js' | 2 | import videojs from 'video.js' |
3 | import { logger } from '@root-helpers/logger' | 3 | import { logger } from '@root-helpers/logger' |
4 | import { addQueryParams } from '@shared/core-utils' | 4 | import { addQueryParams } from '@peertube/peertube-core-utils' |
5 | import { VideoFile } from '@shared/models' | 5 | import { VideoFile } from '@peertube/peertube-models' |
6 | import { PeerTubeResolution, PlayerNetworkInfo, WebVideoPluginOptions } from '../../types' | 6 | import { PeerTubeResolution, PlayerNetworkInfo, WebVideoPluginOptions } from '../../types' |
7 | 7 | ||
8 | const debugLogger = debug('peertube:player:web-video-plugin') | 8 | const debugLogger = debug('peertube:player:web-video-plugin') |
diff --git a/client/src/assets/player/translations-manager.ts b/client/src/assets/player/translations-manager.ts index bf9c2d471..03d5dd91e 100644 --- a/client/src/assets/player/translations-manager.ts +++ b/client/src/assets/player/translations-manager.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '@peertube/peertube-core-utils' | ||
1 | import { logger } from '@root-helpers/logger' | 2 | import { logger } from '@root-helpers/logger' |
2 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '@shared/core-utils/i18n' | ||
3 | 3 | ||
4 | export class TranslationsManager { | 4 | export class TranslationsManager { |
5 | private static videojsLocaleCache: { [ path: string ]: any } = {} | 5 | private static videojsLocaleCache: { [ path: string ]: any } = {} |
diff --git a/client/src/assets/player/types/peertube-player-options.ts b/client/src/assets/player/types/peertube-player-options.ts index e1b8c7fab..352f7d8dd 100644 --- a/client/src/assets/player/types/peertube-player-options.ts +++ b/client/src/assets/player/types/peertube-player-options.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { LiveVideoLatencyModeType, VideoFile } from '@peertube/peertube-models' | ||
1 | import { PluginsManager } from '@root-helpers/plugins-manager' | 2 | import { PluginsManager } from '@root-helpers/plugins-manager' |
2 | import { LiveVideoLatencyMode, VideoFile } from '@shared/models' | ||
3 | import { PeerTubeDockPluginOptions } from '../shared/dock/peertube-dock-plugin' | 3 | import { PeerTubeDockPluginOptions } from '../shared/dock/peertube-dock-plugin' |
4 | import { PlaylistPluginOptions, VideoJSCaption, VideoJSStoryboard } from './peertube-videojs-typings' | 4 | import { PlaylistPluginOptions, VideoJSCaption, VideoJSStoryboard } from './peertube-videojs-typings' |
5 | 5 | ||
@@ -59,7 +59,7 @@ export type PeerTubePlayerLoadOptions = { | |||
59 | isLive: boolean | 59 | isLive: boolean |
60 | 60 | ||
61 | liveOptions?: { | 61 | liveOptions?: { |
62 | latencyMode: LiveVideoLatencyMode | 62 | latencyMode: LiveVideoLatencyModeType |
63 | } | 63 | } |
64 | 64 | ||
65 | videoCaptions: VideoJSCaption[] | 65 | videoCaptions: VideoJSCaption[] |
diff --git a/client/src/assets/player/types/peertube-videojs-typings.ts b/client/src/assets/player/types/peertube-videojs-typings.ts index 73b38d0d3..dae9e14c8 100644 --- a/client/src/assets/player/types/peertube-videojs-typings.ts +++ b/client/src/assets/player/types/peertube-videojs-typings.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { HlsConfig, Level } from 'hls.js' | 1 | import { HlsConfig, Level } from 'hls.js' |
2 | import videojs from 'video.js' | 2 | import videojs from 'video.js' |
3 | import { Engine } from '@peertube/p2p-media-loader-hlsjs' | 3 | import { Engine } from '@peertube/p2p-media-loader-hlsjs' |
4 | import { VideoFile, VideoPlaylist, VideoPlaylistElement } from '@shared/models' | 4 | import { VideoFile, VideoPlaylist, VideoPlaylistElement } from '@peertube/peertube-models' |
5 | import { BezelsPlugin } from '../shared/bezels/bezels-plugin' | 5 | import { BezelsPlugin } from '../shared/bezels/bezels-plugin' |
6 | import { StoryboardPlugin } from '../shared/control-bar/storyboard-plugin' | 6 | import { StoryboardPlugin } from '../shared/control-bar/storyboard-plugin' |
7 | import { PeerTubeDockPlugin, PeerTubeDockPluginOptions } from '../shared/dock/peertube-dock-plugin' | 7 | import { PeerTubeDockPlugin, PeerTubeDockPluginOptions } from '../shared/dock/peertube-dock-plugin' |
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index cc303b80b..b56e3df8f 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { HTMLServerConfig, Video, VideoFile } from '@shared/models' | 1 | import { HTMLServerConfig, Video, VideoFile } from '@peertube/peertube-models' |
2 | 2 | ||
3 | function toTitleCase (str: string) { | 3 | function toTitleCase (str: string) { |
4 | return str.charAt(0).toUpperCase() + str.slice(1) | 4 | return str.charAt(0).toUpperCase() + str.slice(1) |
diff --git a/client/src/root-helpers/logger.ts b/client/src/root-helpers/logger.ts index 8181c13f3..108228d84 100644 --- a/client/src/root-helpers/logger.ts +++ b/client/src/root-helpers/logger.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ClientLogCreate } from '@shared/models/server' | 1 | import { ClientLogCreate } from '@peertube/peertube-models' |
2 | import { peertubeLocalStorage } from './peertube-web-storage' | 2 | import { peertubeLocalStorage } from './peertube-web-storage' |
3 | import { OAuthUserTokens } from './users' | 3 | import { OAuthUserTokens } from './users' |
4 | 4 | ||
diff --git a/client/src/root-helpers/plugins-manager.ts b/client/src/root-helpers/plugins-manager.ts index fd7b5233b..e987f16d6 100644 --- a/client/src/root-helpers/plugins-manager.ts +++ b/client/src/root-helpers/plugins-manager.ts | |||
@@ -3,7 +3,7 @@ import * as debug from 'debug' | |||
3 | import { firstValueFrom, ReplaySubject } from 'rxjs' | 3 | import { firstValueFrom, ReplaySubject } from 'rxjs' |
4 | import { first, shareReplay } from 'rxjs/operators' | 4 | import { first, shareReplay } from 'rxjs/operators' |
5 | import { RegisterClientHelpers } from 'src/types/register-client-option.model' | 5 | import { RegisterClientHelpers } from 'src/types/register-client-option.model' |
6 | import { getExternalAuthHref, getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' | 6 | import { getExternalAuthHref, getHookType, internalRunHook } from '@peertube/peertube-core-utils' |
7 | import { | 7 | import { |
8 | ClientHookName, | 8 | ClientHookName, |
9 | clientHookObject, | 9 | clientHookObject, |
@@ -11,13 +11,14 @@ import { | |||
11 | HTMLServerConfig, | 11 | HTMLServerConfig, |
12 | PluginClientScope, | 12 | PluginClientScope, |
13 | PluginType, | 13 | PluginType, |
14 | PluginType_Type, | ||
14 | RegisterClientFormFieldOptions, | 15 | RegisterClientFormFieldOptions, |
15 | RegisterClientHookOptions, | 16 | RegisterClientHookOptions, |
16 | RegisterClientRouteOptions, | 17 | RegisterClientRouteOptions, |
17 | RegisterClientSettingsScriptOptions, | 18 | RegisterClientSettingsScriptOptions, |
18 | RegisterClientVideoFieldOptions, | 19 | RegisterClientVideoFieldOptions, |
19 | ServerConfigPlugin | 20 | ServerConfigPlugin |
20 | } from '@shared/models' | 21 | } from '@peertube/peertube-models' |
21 | import { environment } from '../environments/environment' | 22 | import { environment } from '../environments/environment' |
22 | import { ClientScript } from '../types' | 23 | import { ClientScript } from '../types' |
23 | import { logger } from './logger' | 24 | import { logger } from './logger' |
@@ -32,7 +33,7 @@ type Hooks = { [ name: string ]: HookStructValue[] } | |||
32 | type PluginInfo = { | 33 | type PluginInfo = { |
33 | plugin: ServerConfigPlugin | 34 | plugin: ServerConfigPlugin |
34 | clientScript: ClientScriptJSON | 35 | clientScript: ClientScriptJSON |
35 | pluginType: PluginType | 36 | pluginType: PluginType_Type |
36 | isTheme: boolean | 37 | isTheme: boolean |
37 | } | 38 | } |
38 | 39 | ||
diff --git a/client/src/root-helpers/video.ts b/client/src/root-helpers/video.ts index 4a44615fb..4ee29df13 100644 --- a/client/src/root-helpers/video.ts +++ b/client/src/root-helpers/video.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { HTMLServerConfig, Video, VideoPrivacy } from '@shared/models' | 1 | import { HTMLServerConfig, Video, VideoPrivacy, VideoPrivacyType } from '@peertube/peertube-models' |
2 | 2 | ||
3 | function buildVideoOrPlaylistEmbed (options: { | 3 | function buildVideoOrPlaylistEmbed (options: { |
4 | embedUrl: string | 4 | embedUrl: string |
@@ -42,13 +42,13 @@ function isP2PEnabled (video: Video, config: HTMLServerConfig, userP2PEnabled: b | |||
42 | } | 42 | } |
43 | 43 | ||
44 | function videoRequiresUserAuth (video: Video, videoPassword?: string) { | 44 | function videoRequiresUserAuth (video: Video, videoPassword?: string) { |
45 | return new Set([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL ]).has(video.privacy.id) || | 45 | return new Set<VideoPrivacyType>([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL ]).has(video.privacy.id) || |
46 | (video.privacy.id === VideoPrivacy.PASSWORD_PROTECTED && !videoPassword) | 46 | (video.privacy.id === VideoPrivacy.PASSWORD_PROTECTED && !videoPassword) |
47 | 47 | ||
48 | } | 48 | } |
49 | 49 | ||
50 | function videoRequiresFileToken (video: Video, videoPassword?: string) { | 50 | function videoRequiresFileToken (video: Video) { |
51 | return new Set([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL, VideoPrivacy.PASSWORD_PROTECTED ]).has(video.privacy.id) | 51 | return new Set<VideoPrivacyType>([ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL, VideoPrivacy.PASSWORD_PROTECTED ]).has(video.privacy.id) |
52 | } | 52 | } |
53 | 53 | ||
54 | export { | 54 | export { |
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 78b812ffd..e4f723079 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | VideoPlaylist, | 11 | VideoPlaylist, |
12 | VideoPlaylistElement, | 12 | VideoPlaylistElement, |
13 | VideoState | 13 | VideoState |
14 | } from '../../../../shared/models' | 14 | } from '@peertube/peertube-models' |
15 | import { PeerTubePlayer } from '../../assets/player/peertube-player' | 15 | import { PeerTubePlayer } from '../../assets/player/peertube-player' |
16 | import { TranslationsManager } from '../../assets/player/translations-manager' | 16 | import { TranslationsManager } from '../../assets/player/translations-manager' |
17 | import { getParamString, logger, videoRequiresFileToken } from '../../root-helpers' | 17 | import { getParamString, logger, videoRequiresFileToken } from '../../root-helpers' |
diff --git a/client/src/standalone/videos/shared/auth-http.ts b/client/src/standalone/videos/shared/auth-http.ts index c1e9f7750..3dfc47b88 100644 --- a/client/src/standalone/videos/shared/auth-http.ts +++ b/client/src/standalone/videos/shared/auth-http.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { HttpStatusCode, OAuth2ErrorCode, UserRefreshToken } from '../../../../../shared/models' | 1 | import { HttpStatusCode, OAuth2ErrorCode, OAuth2ErrorCodeType, UserRefreshToken } from '@peertube/peertube-models' |
2 | import { OAuthUserTokens, objectToUrlEncoded } from '../../../root-helpers' | 2 | import { OAuthUserTokens, objectToUrlEncoded } from '../../../root-helpers' |
3 | import { peertubeLocalStorage } from '../../../root-helpers/peertube-web-storage' | 3 | import { peertubeLocalStorage } from '../../../root-helpers/peertube-web-storage' |
4 | 4 | ||
@@ -66,7 +66,7 @@ export class AuthHTTP { | |||
66 | if (res.status === HttpStatusCode.UNAUTHORIZED_401) return undefined | 66 | if (res.status === HttpStatusCode.UNAUTHORIZED_401) return undefined |
67 | 67 | ||
68 | return res.json() | 68 | return res.json() |
69 | }).then((obj: UserRefreshToken & { code?: OAuth2ErrorCode }) => { | 69 | }).then((obj: UserRefreshToken & { code?: OAuth2ErrorCodeType }) => { |
70 | if (!obj || obj.code === OAuth2ErrorCode.INVALID_GRANT) { | 70 | if (!obj || obj.code === OAuth2ErrorCode.INVALID_GRANT) { |
71 | OAuthUserTokens.flushLocalStorage(peertubeLocalStorage) | 71 | OAuthUserTokens.flushLocalStorage(peertubeLocalStorage) |
72 | this.removeTokensFromHeaders() | 72 | this.removeTokensFromHeaders() |
diff --git a/client/src/standalone/videos/shared/live-manager.ts b/client/src/standalone/videos/shared/live-manager.ts index 5fac229ba..274f70d9c 100644 --- a/client/src/standalone/videos/shared/live-manager.ts +++ b/client/src/standalone/videos/shared/live-manager.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Socket } from 'socket.io-client' | 1 | import { Socket } from 'socket.io-client' |
2 | import { LiveVideoEventPayload, VideoDetails, VideoState } from '../../../../../shared/models' | 2 | import { LiveVideoEventPayload, VideoDetails, VideoState, VideoStateType } from '@peertube/peertube-models' |
3 | import { PlayerHTML } from './player-html' | 3 | import { PlayerHTML } from './player-html' |
4 | import { Translations } from './translations' | 4 | import { Translations } from './translations' |
5 | 5 | ||
@@ -49,7 +49,7 @@ export class LiveManager { | |||
49 | } | 49 | } |
50 | 50 | ||
51 | displayInfo (options: { | 51 | displayInfo (options: { |
52 | state: VideoState | 52 | state: VideoStateType |
53 | translations: Translations | 53 | translations: Translations |
54 | }) { | 54 | }) { |
55 | const { state, translations } = options | 55 | const { state, translations } = options |
diff --git a/client/src/standalone/videos/shared/peertube-plugin.ts b/client/src/standalone/videos/shared/peertube-plugin.ts index daf6f2b03..95433299e 100644 --- a/client/src/standalone/videos/shared/peertube-plugin.ts +++ b/client/src/standalone/videos/shared/peertube-plugin.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { peertubeTranslate } from '../../../../../shared/core-utils/i18n' | 1 | import { peertubeTranslate } from '@peertube/peertube-core-utils' |
2 | import { HTMLServerConfig, PublicServerSetting } from '../../../../../shared/models' | 2 | import { HTMLServerConfig, PublicServerSetting } from '@peertube/peertube-models' |
3 | import { PluginInfo, PluginsManager } from '../../../root-helpers' | 3 | import { PluginInfo, PluginsManager } from '../../../root-helpers' |
4 | import { RegisterClientHelpers } from '../../../types' | 4 | import { RegisterClientHelpers } from '../../../types' |
5 | import { AuthHTTP } from './auth-http' | 5 | import { AuthHTTP } from './auth-http' |
diff --git a/client/src/standalone/videos/shared/player-html.ts b/client/src/standalone/videos/shared/player-html.ts index 0defa0d70..ada2aaaf7 100644 --- a/client/src/standalone/videos/shared/player-html.ts +++ b/client/src/standalone/videos/shared/player-html.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { peertubeTranslate } from '../../../../../shared/core-utils/i18n' | 1 | import { peertubeTranslate } from '@peertube/peertube-core-utils' |
2 | import { logger } from '../../../root-helpers' | 2 | import { logger } from '../../../root-helpers' |
3 | import { Translations } from './translations' | 3 | import { Translations } from './translations' |
4 | 4 | ||
diff --git a/client/src/standalone/videos/shared/player-options-builder.ts b/client/src/standalone/videos/shared/player-options-builder.ts index 8a4e32444..3437ef421 100644 --- a/client/src/standalone/videos/shared/player-options-builder.ts +++ b/client/src/standalone/videos/shared/player-options-builder.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { peertubeTranslate } from '../../../../../shared/core-utils/i18n' | 1 | import { peertubeTranslate } from '@peertube/peertube-core-utils' |
2 | import { | 2 | import { |
3 | HTMLServerConfig, | 3 | HTMLServerConfig, |
4 | LiveVideo, | 4 | LiveVideo, |
@@ -9,7 +9,7 @@ import { | |||
9 | VideoPlaylistElement, | 9 | VideoPlaylistElement, |
10 | VideoState, | 10 | VideoState, |
11 | VideoStreamingPlaylistType | 11 | VideoStreamingPlaylistType |
12 | } from '../../../../../shared/models' | 12 | } from '@peertube/peertube-models' |
13 | import { HLSOptions, PeerTubePlayerContructorOptions, PeerTubePlayerLoadOptions, PlayerMode, VideoJSCaption } from '../../../assets/player' | 13 | import { HLSOptions, PeerTubePlayerContructorOptions, PeerTubePlayerLoadOptions, PlayerMode, VideoJSCaption } from '../../../assets/player' |
14 | import { | 14 | import { |
15 | getBoolOrDefault, | 15 | getBoolOrDefault, |
diff --git a/client/src/standalone/videos/shared/playlist-fetcher.ts b/client/src/standalone/videos/shared/playlist-fetcher.ts index 713d82e3a..db38e3d6c 100644 --- a/client/src/standalone/videos/shared/playlist-fetcher.ts +++ b/client/src/standalone/videos/shared/playlist-fetcher.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { HttpStatusCode, ResultList, VideoPlaylistElement } from '../../../../../shared/models' | 1 | import { HttpStatusCode, ResultList, VideoPlaylistElement } from '@peertube/peertube-models' |
2 | import { logger } from '../../../root-helpers' | 2 | import { logger } from '../../../root-helpers' |
3 | import { AuthHTTP } from './auth-http' | 3 | import { AuthHTTP } from './auth-http' |
4 | 4 | ||
diff --git a/client/src/standalone/videos/shared/playlist-tracker.ts b/client/src/standalone/videos/shared/playlist-tracker.ts index d8708826d..dc9a084b7 100644 --- a/client/src/standalone/videos/shared/playlist-tracker.ts +++ b/client/src/standalone/videos/shared/playlist-tracker.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { VideoPlaylist, VideoPlaylistElement } from '../../../../../shared/models' | 1 | import { VideoPlaylist, VideoPlaylistElement } from '@peertube/peertube-models' |
2 | import { logger } from '../../../root-helpers' | 2 | import { logger } from '../../../root-helpers' |
3 | 3 | ||
4 | export class PlaylistTracker { | 4 | export class PlaylistTracker { |
diff --git a/client/src/standalone/videos/shared/video-fetcher.ts b/client/src/standalone/videos/shared/video-fetcher.ts index 7fb94fbf3..9149d946e 100644 --- a/client/src/standalone/videos/shared/video-fetcher.ts +++ b/client/src/standalone/videos/shared/video-fetcher.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { HttpStatusCode, LiveVideo, VideoDetails, VideoToken } from '../../../../../shared/models' | 1 | import { HttpStatusCode, LiveVideo, VideoDetails, VideoToken } from '@peertube/peertube-models' |
2 | import { logger } from '../../../root-helpers' | 2 | import { logger } from '../../../root-helpers' |
3 | import { PeerTubeServerError } from '../../../types' | 3 | import { PeerTubeServerError } from '../../../types' |
4 | import { AuthHTTP } from './auth-http' | 4 | import { AuthHTTP } from './auth-http' |
diff --git a/client/src/types/job-state-client.type.ts b/client/src/types/job-state-client.type.ts index 6123678df..6697539a3 100644 --- a/client/src/types/job-state-client.type.ts +++ b/client/src/types/job-state-client.type.ts | |||
@@ -1,3 +1,3 @@ | |||
1 | import { JobState } from '@shared/models' | 1 | import { JobState } from '@peertube/peertube-models' |
2 | 2 | ||
3 | export type JobStateClient = JobState | 3 | export type JobStateClient = JobState |
diff --git a/client/src/types/job-type-client.type.ts b/client/src/types/job-type-client.type.ts index 7d51f1db2..930809081 100644 --- a/client/src/types/job-type-client.type.ts +++ b/client/src/types/job-type-client.type.ts | |||
@@ -1,3 +1,3 @@ | |||
1 | import { JobType } from '@shared/models' | 1 | import { JobType } from '@peertube/peertube-models' |
2 | 2 | ||
3 | export type JobTypeClient = 'all' | JobType | 3 | export type JobTypeClient = 'all' | JobType |
diff --git a/client/src/types/register-client-option.model.ts b/client/src/types/register-client-option.model.ts index 2c09f15a7..2336119bb 100644 --- a/client/src/types/register-client-option.model.ts +++ b/client/src/types/register-client-option.model.ts | |||
@@ -5,7 +5,7 @@ import { | |||
5 | RegisterClientSettingsScriptOptions, | 5 | RegisterClientSettingsScriptOptions, |
6 | RegisterClientVideoFieldOptions, | 6 | RegisterClientVideoFieldOptions, |
7 | ServerConfig, SettingEntries | 7 | ServerConfig, SettingEntries |
8 | } from '@shared/models' | 8 | } from '@peertube/peertube-models' |
9 | 9 | ||
10 | export type RegisterClientOptions = { | 10 | export type RegisterClientOptions = { |
11 | registerHook: (options: RegisterClientHookOptions) => void | 11 | registerHook: (options: RegisterClientHookOptions) => void |
diff --git a/client/src/types/server-error.model.ts b/client/src/types/server-error.model.ts index 4a57287fe..096deb50b 100644 --- a/client/src/types/server-error.model.ts +++ b/client/src/types/server-error.model.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import { ServerErrorCode } from '@shared/models/index' | 1 | import { ServerErrorCodeType } from '@peertube/peertube-models' |
2 | 2 | ||
3 | export class PeerTubeServerError extends Error { | 3 | export class PeerTubeServerError extends Error { |
4 | serverCode: ServerErrorCode | 4 | serverCode: ServerErrorCodeType |
5 | 5 | ||
6 | constructor (message: string, serverCode: ServerErrorCode) { | 6 | constructor (message: string, serverCode: ServerErrorCodeType) { |
7 | super(message) | 7 | super(message) |
8 | this.name = 'CustomError' | 8 | this.name = 'CustomError' |
9 | this.serverCode = serverCode | 9 | this.serverCode = serverCode |