From 788487140c500abeb69ca44daf3a9e26efa8d36f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Aug 2018 15:30:24 +0200 Subject: [PATCH] Move send video components inside a dedicated directory --- .../video-import-url.component.html | 0 .../video-import-url.component.scss | 6 +++--- .../video-import-url.component.ts | 18 +++++++++--------- .../video-send.ts | 15 ++++++++------- .../video-upload.component.html | 0 .../video-upload.component.scss | 6 +++--- .../video-upload.component.ts | 17 ++++++++--------- .../videos/+video-edit/video-add.component.ts | 4 ++-- .../app/videos/+video-edit/video-add.module.ts | 4 ++-- 9 files changed, 35 insertions(+), 35 deletions(-) rename client/src/app/videos/+video-edit/{ => video-add-components}/video-import-url.component.html (100%) rename client/src/app/videos/+video-edit/{ => video-add-components}/video-import-url.component.scss (82%) rename client/src/app/videos/+video-edit/{ => video-add-components}/video-import-url.component.ts (89%) rename client/src/app/videos/+video-edit/{shared => video-add-components}/video-send.ts (95%) rename client/src/app/videos/+video-edit/{ => video-add-components}/video-upload.component.html (100%) rename client/src/app/videos/+video-edit/{ => video-add-components}/video-upload.component.scss (92%) rename client/src/app/videos/+video-edit/{ => video-add-components}/video-upload.component.ts (93%) diff --git a/client/src/app/videos/+video-edit/video-import-url.component.html b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.html similarity index 100% rename from client/src/app/videos/+video-edit/video-import-url.component.html rename to client/src/app/videos/+video-edit/video-add-components/video-import-url.component.html diff --git a/client/src/app/videos/+video-edit/video-import-url.component.scss b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.scss similarity index 82% rename from client/src/app/videos/+video-edit/video-import-url.component.scss rename to client/src/app/videos/+video-edit/video-add-components/video-import-url.component.scss index 9ada9db19..5e713ab97 100644 --- a/client/src/app/videos/+video-edit/video-import-url.component.scss +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.scss @@ -1,5 +1,5 @@ -@import '_variables'; -@import '_mixins'; +@import 'variables'; +@import 'mixins'; $width-size: 190px; @@ -17,7 +17,7 @@ $width-size: 190px; margin-bottom: 25px; cursor: default; - background-image: url('../../../assets/images/video/upload.svg'); + background-image: url('../../../../assets/images/video/upload.svg'); } input[type=text] { diff --git a/client/src/app/videos/+video-edit/video-import-url.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts similarity index 89% rename from client/src/app/videos/+video-edit/video-import-url.component.ts rename to client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts index 99fcb6f00..dbe69409f 100644 --- a/client/src/app/videos/+video-edit/video-import-url.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-url.component.ts @@ -1,23 +1,23 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core' import { Router } from '@angular/router' -import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' import { NotificationsService } from 'angular2-notifications' -import { VideoPrivacy, VideoUpdate } from '../../../../../shared/models/videos' -import { AuthService, ServerService } from '../../core' -import { VideoService } from '../../shared/video/video.service' +import { VideoPrivacy, VideoUpdate } from '../../../../../../shared/models/videos' +import { AuthService, ServerService } from '../../../core' +import { VideoService } from '../../../shared/video/video.service' import { I18n } from '@ngx-translate/i18n-polyfill' -import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' -import { VideoImportService } from '@app/shared/video-import' -import { VideoEdit } from '@app/shared/video/video-edit.model' import { LoadingBarService } from '@ngx-loading-bar/core' +import { VideoSend } from '@app/videos/+video-edit/video-add-components/video-send' +import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' +import { VideoEdit } from '@app/shared/video/video-edit.model' +import { FormValidatorService } from '@app/shared' import { VideoCaptionService } from '@app/shared/video-caption' -import { VideoSend } from '@app/videos/+video-edit/shared/video-send' +import { VideoImportService } from '@app/shared/video-import' @Component({ selector: 'my-video-import-url', templateUrl: './video-import-url.component.html', styleUrls: [ - './shared/video-edit.component.scss', + '../shared/video-edit.component.scss', './video-import-url.component.scss' ] }) diff --git a/client/src/app/videos/+video-edit/shared/video-send.ts b/client/src/app/videos/+video-edit/video-add-components/video-send.ts similarity index 95% rename from client/src/app/videos/+video-edit/shared/video-send.ts rename to client/src/app/videos/+video-edit/video-add-components/video-send.ts index bc1c7a45b..efd182269 100644 --- a/client/src/app/videos/+video-edit/shared/video-send.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-send.ts @@ -1,16 +1,16 @@ -import { FormReactive } from '@app/shared' -import { OnInit } from '@angular/core' -import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' -import { populateAsyncUserVideoChannels } from '@app/shared/misc/utils' -import { VideoConstant, VideoPrivacy } from '../../../../../../shared/models/videos' -import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' +import { EventEmitter, OnInit } from '@angular/core' import { LoadingBarService } from '@ngx-loading-bar/core' import { NotificationsService } from 'angular2-notifications' +import { catchError, switchMap, tap } from 'rxjs/operators' +import { FormReactive } from '@app/shared' +import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' +import { VideoConstant, VideoPrivacy } from '../../../../../../shared' import { AuthService, ServerService } from '@app/core' import { VideoService } from '@app/shared/video/video.service' +import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' import { VideoCaptionService } from '@app/shared/video-caption' -import { catchError, switchMap, tap } from 'rxjs/operators' import { VideoEdit } from '@app/shared/video/video-edit.model' +import { populateAsyncUserVideoChannels } from '@app/shared/misc/utils' export abstract class VideoSend extends FormReactive implements OnInit, CanComponentDeactivate { @@ -21,6 +21,7 @@ export abstract class VideoSend extends FormReactive implements OnInit, CanCompo firstStepPrivacyId = 0 firstStepChannelId = 0 + abstract firstStepDone: EventEmitter protected abstract readonly DEFAULT_VIDEO_PRIVACY: VideoPrivacy protected loadingBar: LoadingBarService diff --git a/client/src/app/videos/+video-edit/video-upload.component.html b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.html similarity index 100% rename from client/src/app/videos/+video-edit/video-upload.component.html rename to client/src/app/videos/+video-edit/video-add-components/video-upload.component.html diff --git a/client/src/app/videos/+video-edit/video-upload.component.scss b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.scss similarity index 92% rename from client/src/app/videos/+video-edit/video-upload.component.scss rename to client/src/app/videos/+video-edit/video-add-components/video-upload.component.scss index 015835672..dbae5230d 100644 --- a/client/src/app/videos/+video-edit/video-upload.component.scss +++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.scss @@ -1,5 +1,5 @@ -@import '_variables'; -@import '_mixins'; +@import 'variables'; +@import 'mixins'; .peertube-select-container { @include peertube-select-container(190px); @@ -20,7 +20,7 @@ margin-bottom: 25px; cursor: default; - background-image: url('../../../assets/images/video/upload.svg'); + background-image: url('../../../../assets/images/video/upload.svg'); } .button-file { diff --git a/client/src/app/videos/+video-edit/video-upload.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts similarity index 93% rename from client/src/app/videos/+video-edit/video-upload.component.ts rename to client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts index 983af60ce..3ec89ff62 100644 --- a/client/src/app/videos/+video-edit/video-upload.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts @@ -1,26 +1,25 @@ import { HttpEventType, HttpResponse } from '@angular/common/http' import { Component, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core' import { Router } from '@angular/router' -import { UserService } from '@app/shared' -import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' import { LoadingBarService } from '@ngx-loading-bar/core' import { NotificationsService } from 'angular2-notifications' import { BytesPipe } from 'ngx-pipes' import { Subscription } from 'rxjs' -import { VideoPrivacy } from '../../../../../shared/models/videos' -import { AuthService, ServerService } from '../../core' -import { VideoEdit } from '../../shared/video/video-edit.model' -import { VideoService } from '../../shared/video/video.service' +import { VideoPrivacy } from '../../../../../../shared/models/videos' +import { AuthService, ServerService } from '../../../core' +import { VideoEdit } from '../../../shared/video/video-edit.model' +import { VideoService } from '../../../shared/video/video.service' import { I18n } from '@ngx-translate/i18n-polyfill' -import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' +import { VideoSend } from '@app/videos/+video-edit/video-add-components/video-send' +import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' +import { FormValidatorService, UserService } from '@app/shared' import { VideoCaptionService } from '@app/shared/video-caption' -import { VideoSend } from '@app/videos/+video-edit/shared/video-send' @Component({ selector: 'my-video-upload', templateUrl: './video-upload.component.html', styleUrls: [ - './shared/video-edit.component.scss', + '../shared/video-edit.component.scss', './video-upload.component.scss' ] }) diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 377ea5dd2..e74fa1f15 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts @@ -1,7 +1,7 @@ import { Component, ViewChild } from '@angular/core' import { CanComponentDeactivate } from '@app/shared/guards/can-deactivate-guard.service' -import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-import-url.component' -import { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component' +import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-add-components/video-import-url.component' +import { VideoUploadComponent } from '@app/videos/+video-edit/video-add-components/video-upload.component' import { ServerService } from '@app/core' @Component({ diff --git a/client/src/app/videos/+video-edit/video-add.module.ts b/client/src/app/videos/+video-edit/video-add.module.ts index dd1a3875d..a1324b397 100644 --- a/client/src/app/videos/+video-edit/video-add.module.ts +++ b/client/src/app/videos/+video-edit/video-add.module.ts @@ -5,8 +5,8 @@ import { VideoEditModule } from './shared/video-edit.module' import { VideoAddRoutingModule } from './video-add-routing.module' import { VideoAddComponent } from './video-add.component' import { CanDeactivateGuard } from '../../shared/guards/can-deactivate-guard.service' -import { VideoUploadComponent } from '@app/videos/+video-edit/video-upload.component' -import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-import-url.component' +import { VideoUploadComponent } from '@app/videos/+video-edit/video-add-components/video-upload.component' +import { VideoImportUrlComponent } from '@app/videos/+video-edit/video-add-components/video-import-url.component' @NgModule({ imports: [ -- 2.25.1