Client: little refractoring
This commit is contained in:
parent
c24ac1c18e
commit
1f0215a908
|
@ -6,7 +6,6 @@ import { AuthHttp, RestExtractor, RestDataSource, User } from '../../../shared';
|
|||
|
||||
@Injectable()
|
||||
export class UserService {
|
||||
// TODO: merge this constant with account
|
||||
private static BASE_USERS_URL = '/api/v1/users/';
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
.glyphicon-remove {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.add-user {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
.cell-id {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.cell-reason {
|
||||
width: 200px;
|
||||
}
|
|
@ -6,8 +6,7 @@ import { Utils, VideoAbuseService, VideoAbuse } from '../../../shared';
|
|||
|
||||
@Component({
|
||||
selector: 'my-video-abuse-list',
|
||||
templateUrl: './video-abuse-list.component.html',
|
||||
styleUrls: [ './video-abuse-list.component.scss' ]
|
||||
templateUrl: './video-abuse-list.component.html'
|
||||
})
|
||||
export class VideoAbuseListComponent {
|
||||
videoAbusesSource = null;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<menu>
|
||||
|
||||
<div class="panel-block">
|
||||
<a routerLink="/admin/users/list" routerLinkActive="active">
|
||||
<span class="hidden-xs glyphicon glyphicon-user"></span>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
export * from './loader';
|
||||
export * from './sort-field.type';
|
||||
export * from './rate-type.type';
|
||||
export * from './video.model';
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
export * from './loader.component';
|
|
@ -1,3 +1,4 @@
|
|||
export * from './loader.component';
|
||||
export * from './video-list.component';
|
||||
export * from './video-miniature.component';
|
||||
export * from './video-sort.component';
|
||||
|
|
|
@ -23,19 +23,6 @@
|
|||
|
||||
my-video-miniature {
|
||||
text-align: left;
|
||||
transition: all 0.5s ease;
|
||||
|
||||
&.ng-enter {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&.ng-enter-active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.ng-leave {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-video {
|
||||
|
|
|
@ -76,10 +76,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
|
|||
this.loading.next(true);
|
||||
this.videos = [];
|
||||
|
||||
this.changeDetector.detectChanges();
|
||||
|
||||
let observable = null;
|
||||
|
||||
if (this.search.value) {
|
||||
observable = this.videoService.searchVideos(this.search, this.pagination, this.sort);
|
||||
} else {
|
||||
|
@ -150,8 +147,6 @@ export class VideoListComponent implements OnInit, OnDestroy {
|
|||
} else {
|
||||
this.pagination.currentPage = 1;
|
||||
}
|
||||
|
||||
this.changeDetector.detectChanges();
|
||||
}
|
||||
|
||||
private navigateToNewParams() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="video-miniature" (mouseenter)="onHover()" (mouseleave)="onBlur()">
|
||||
<div class="video-miniature">
|
||||
<a
|
||||
[routerLink]="['/videos/watch', video.id]" [attr.title]="video.description"
|
||||
class="video-miniature-thumbnail"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
@import "../../../sass/pre-customizations.scss";
|
||||
|
||||
.video-miniature {
|
||||
margin-top: 30px;
|
||||
display: inline-block;
|
||||
|
@ -71,7 +69,7 @@
|
|||
}
|
||||
|
||||
.video-miniature-tags {
|
||||
// Fix for chrome when tags a long
|
||||
// Fix for chrome when tags are long
|
||||
width: 201px;
|
||||
|
||||
.video-miniature-tag {
|
||||
|
@ -81,7 +79,6 @@
|
|||
top: -2px;
|
||||
|
||||
.label {
|
||||
line-height: $line-height-base;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,6 @@ export class VideoMiniatureComponent {
|
|||
@Input() user: User;
|
||||
@Input() video: Video;
|
||||
|
||||
hovering = false;
|
||||
|
||||
constructor(
|
||||
private notificationsService: NotificationsService,
|
||||
private confirmService: ConfirmService,
|
||||
|
@ -33,14 +31,6 @@ export class VideoMiniatureComponent {
|
|||
return this.video.name;
|
||||
}
|
||||
|
||||
onBlur() {
|
||||
this.hovering = false;
|
||||
}
|
||||
|
||||
onHover() {
|
||||
this.hovering = true;
|
||||
}
|
||||
|
||||
isVideoNSFWForThisUser() {
|
||||
return this.video.isVideoNSFWForUser(this.user);
|
||||
}
|
||||
|
|
|
@ -22,12 +22,14 @@
|
|||
<div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div>
|
||||
</div>
|
||||
|
||||
<!-- P2P informations -->
|
||||
<div id="torrent-info" class="row">
|
||||
<div id="torrent-info-download" class="col-md-4 col-sm-4 col-xs-4">Download: {{ downloadSpeed | bytes }}/s</div>
|
||||
<div id="torrent-info-upload" class="col-md-4 col-sm-4 col-xs-4">Upload: {{ uploadSpeed | bytes }}/s</div>
|
||||
<div id="torrent-info-peers" class="col-md-4 col-sm-4 col-xs-4">Number of peers: {{ numPeers }}</div>
|
||||
</div>
|
||||
|
||||
<!-- Video informations -->
|
||||
<div *ngIf="video !== null" id="video-info">
|
||||
<div class="row video-name-views">
|
||||
<div class="col-xs-8 col-md-8 video-name">
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
|
||||
.embed-responsive {
|
||||
height: 500px;
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
#torrent-info {
|
||||
|
@ -25,12 +29,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.embed-responsive {
|
||||
@media screen and (max-width: 600px) {
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
#video-info {
|
||||
.video-name-views {
|
||||
font-weight: bold;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { TagInputModule } from 'ng2-tag-input';
|
|||
import { VideosRoutingModule } from './videos-routing.module';
|
||||
import { VideosComponent } from './videos.component';
|
||||
import { VideoAddComponent, VideoUpdateComponent } from './video-edit';
|
||||
import { VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list';
|
||||
import { LoaderComponent, VideoListComponent, VideoMiniatureComponent, VideoSortComponent } from './video-list';
|
||||
import {
|
||||
VideoWatchComponent,
|
||||
VideoMagnetComponent,
|
||||
|
@ -13,7 +13,7 @@ import {
|
|||
VideoShareComponent,
|
||||
WebTorrentService
|
||||
} from './video-watch';
|
||||
import { LoaderComponent, VideoService } from './shared';
|
||||
import { VideoService } from './shared';
|
||||
import { SharedModule } from '../shared';
|
||||
|
||||
@NgModule({
|
||||
|
|
Loading…
Reference in New Issue