diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-31 14:34:36 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-08-11 15:02:33 +0200 |
commit | 3a4992633ee62d5edfbb484d9c6bcb3cf158489d (patch) | |
tree | e4510b39bdac9c318fdb4b47018d08f15368b8f0 /client/src/app/shared | |
parent | 04d1da5621d25d59bd5fa1543b725c497bf5d9a8 (diff) | |
download | PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.tar.gz PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.tar.zst PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.zip |
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge
conflicts, but it's a major step forward:
* Server can be faster at startup because imports() are async and we can
easily lazy import big modules
* Angular doesn't seem to support ES import (with .js extension), so we
had to correctly organize peertube into a monorepo:
* Use yarn workspace feature
* Use typescript reference projects for dependencies
* Shared projects have been moved into "packages", each one is now a
node module (with a dedicated package.json/tsconfig.json)
* server/tools have been moved into apps/ and is now a dedicated app
bundled and published on NPM so users don't have to build peertube
cli tools manually
* server/tests have been moved into packages/ so we don't compile
them every time we want to run the server
* Use isolatedModule option:
* Had to move from const enum to const
(https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
* Had to explictely specify "type" imports when used in decorators
* Prefer tsx (that uses esbuild under the hood) instead of ts-node to
load typescript files (tests with mocha or scripts):
* To reduce test complexity as esbuild doesn't support decorator
metadata, we only test server files that do not import server
models
* We still build tests files into js files for a faster CI
* Remove unmaintained peertube CLI import script
* Removed some barrels to speed up execution (less imports)
Diffstat (limited to 'client/src/app/shared')
89 files changed, 155 insertions, 151 deletions
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' |