]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add account settings new design
authorChocobozzz <florian.bigard@gmail.com>
Fri, 1 Dec 2017 16:38:26 +0000 (17:38 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Fri, 1 Dec 2017 16:38:26 +0000 (17:38 +0100)
34 files changed:
client/src/app/+admin/users/shared/user.service.ts
client/src/app/account/account-change-password/account-change-password.component.html [deleted file]
client/src/app/account/account-details/account-details.component.html [deleted file]
client/src/app/account/account-routing.module.ts
client/src/app/account/account-settings/account-change-password/account-change-password.component.html [new file with mode: 0644]
client/src/app/account/account-settings/account-change-password/account-change-password.component.scss [new file with mode: 0644]
client/src/app/account/account-settings/account-change-password/account-change-password.component.ts [moved from client/src/app/account/account-change-password/account-change-password.component.ts with 88% similarity]
client/src/app/account/account-settings/account-change-password/index.ts [moved from client/src/app/account/account-change-password/index.ts with 100% similarity]
client/src/app/account/account-settings/account-details/account-details.component.html [new file with mode: 0644]
client/src/app/account/account-settings/account-details/account-details.component.scss [new file with mode: 0644]
client/src/app/account/account-settings/account-details/account-details.component.ts [moved from client/src/app/account/account-details/account-details.component.ts with 78% similarity]
client/src/app/account/account-settings/account-details/index.ts [moved from client/src/app/account/account-details/index.ts with 100% similarity]
client/src/app/account/account-settings/account-settings.component.html [new file with mode: 0644]
client/src/app/account/account-settings/account-settings.component.scss [new file with mode: 0644]
client/src/app/account/account-settings/account-settings.component.ts [new file with mode: 0644]
client/src/app/account/account.component.html
client/src/app/account/account.component.scss
client/src/app/account/account.component.ts
client/src/app/account/account.module.ts
client/src/app/app.component.scss
client/src/app/menu/menu.component.html
client/src/app/menu/menu.component.scss
client/src/app/shared/search/search.component.scss
client/src/app/videos/video-list/index.ts
client/src/app/videos/video-list/my-videos.component.ts [deleted file]
client/src/app/videos/video-list/shared/abstract-video-list.html
client/src/app/videos/video-list/shared/abstract-video-list.scss
client/src/app/videos/video-list/shared/abstract-video-list.ts
client/src/app/videos/videos-routing.module.ts
client/src/app/videos/videos.module.ts
client/src/sass/_mixins.scss
client/src/sass/_variables.scss
client/src/sass/application.scss
client/src/sass/pre-customizations.scss

index e4bd5df3770d9179f9ea797d1206ad317c58b561..dc77cc1d8dbdb993cd412183ed276bcb74b70c89 100644 (file)
@@ -1,14 +1,12 @@
-import { Injectable } from '@angular/core'
 import { HttpClient, HttpParams } from '@angular/common/http'
-import { Observable } from 'rxjs/Observable'
+import { Injectable } from '@angular/core'
+import { BytesPipe } from 'ngx-pipes'
+import { SortMeta } from 'primeng/components/common/sortmeta'
 import 'rxjs/add/operator/catch'
 import 'rxjs/add/operator/map'
-
-import { SortMeta } from 'primeng/components/common/sortmeta'
-import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'
-
-import { RestExtractor, User, RestPagination, RestService } from '../../../shared'
-import { UserCreate, UserUpdate, ResultList } from '../../../../../../shared'
+import { Observable } from 'rxjs/Observable'
+import { ResultList, UserCreate, UserUpdate } from '../../../../../../shared'
+import { RestExtractor, RestPagination, RestService, User } from '../../../shared'
 
 @Injectable()
 export class UserService {
diff --git a/client/src/app/account/account-change-password/account-change-password.component.html b/client/src/app/account/account-change-password/account-change-password.component.html
deleted file mode 100644 (file)
index 92d9f90..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
-
-<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">
-  <div class="form-group">
-    <label for="new-password">New password</label>
-    <input
-      type="password" class="form-control" id="new-password"
-      formControlName="new-password"
-    >
-    <div *ngIf="formErrors['new-password']" class="alert alert-danger">
-      {{ formErrors['new-password'] }}
-    </div>
-  </div>
-
-  <div class="form-group">
-    <label for="name">Confirm new password</label>
-    <input
-      type="password" class="form-control" id="new-confirmed-password"
-      formControlName="new-confirmed-password"
-    >
-  </div>
-
-  <input type="submit" value="Change password" class="btn btn-default" [disabled]="!form.valid">
-</form>
diff --git a/client/src/app/account/account-details/account-details.component.html b/client/src/app/account/account-details/account-details.component.html
deleted file mode 100644 (file)
index 8f4f176..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
-
-<form role="form" (ngSubmit)="updateDetails()" [formGroup]="form">
-  <div class="form-group">
-    <input
-      type="checkbox" id="displayNSFW"
-      formControlName="displayNSFW"
-    >
-    <label for="displayNSFW">Display videos that contain mature or explicit content</label>
-    <div *ngIf="formErrors['displayNSFW']" class="alert alert-danger">
-      {{ formErrors['displayNSFW'] }}
-    </div>
-  </div>
-
-  <input type="submit" value="Update" class="btn btn-default" [disabled]="!form.valid">
-</form>
index 74d9aa03e6abb0e21a3786a83888b0a82142a709..2e9de1cfb19dacd7c5c57c9782749e73a929f0a8 100644 (file)
@@ -5,17 +5,33 @@ import { MetaGuard } from '@ngx-meta/core'
 
 import { LoginGuard } from '../core'
 import { AccountComponent } from './account.component'
+import { AccountSettingsComponent } from './account-settings/account-settings.component'
 
 const accountRoutes: Routes = [
   {
     path: 'account',
     component: AccountComponent,
-    canActivate: [ MetaGuard, LoginGuard ],
-    data: {
-      meta: {
-        title: 'My account'
-      }
-    }
+    canActivateChild: [ MetaGuard, LoginGuard ],
+    children: [
+      {
+        path: 'settings',
+        component: AccountSettingsComponent,
+        data: {
+          meta: {
+            title: 'Account settings'
+          }
+        }
+      },
+      // {
+      //   path: 'videos',
+      //   component: AccountVideosComponent,
+      //   data: {
+      //     meta: {
+      //       title: 'Account videos'
+      //     }
+      //   }
+      // }
+    ]
   }
 ]
 
diff --git a/client/src/app/account/account-settings/account-change-password/account-change-password.component.html b/client/src/app/account/account-settings/account-change-password/account-change-password.component.html
new file mode 100644 (file)
index 0000000..bfb5521
--- /dev/null
@@ -0,0 +1,18 @@
+<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
+
+<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">
+  <input
+    type="password" class="form-control" id="new-password" placeholder="Old password"
+    formControlName="new-password"
+  >
+  <div *ngIf="formErrors['new-password']" class="alert alert-danger">
+    {{ formErrors['new-password'] }}
+  </div>
+
+  <input
+    type="password" id="new-confirmed-password" placeholder="New password"
+    formControlName="new-confirmed-password"
+  >
+
+  <input type="submit" value="Change password" [disabled]="!form.valid">
+</form>
diff --git a/client/src/app/account/account-settings/account-change-password/account-change-password.component.scss b/client/src/app/account/account-settings/account-change-password/account-change-password.component.scss
new file mode 100644 (file)
index 0000000..593355b
--- /dev/null
@@ -0,0 +1,9 @@
+input[type=password] {
+  @include peertube-input-text(340px);
+  display: block;
+  margin-bottom: 10px;
+}
+
+input[type=submit] {
+  @include peertube-button;
+}
similarity index 88%
rename from client/src/app/account/account-change-password/account-change-password.component.ts
rename to client/src/app/account/account-settings/account-change-password/account-change-password.component.ts
index 69edec54bdc6639113522c3816d5927d738ba10f..8979e17349f89731535effcb33912227e18141b1 100644 (file)
@@ -1,16 +1,13 @@
 import { Component, OnInit } from '@angular/core'
 import { FormBuilder, FormGroup } from '@angular/forms'
-import { Router } from '@angular/router'
-
 import { NotificationsService } from 'angular2-notifications'
-
-import { FormReactive, UserService, USER_PASSWORD } from '../../shared'
+import { FormReactive, USER_PASSWORD, UserService } from '../../../shared'
 
 @Component({
   selector: 'my-account-change-password',
-  templateUrl: './account-change-password.component.html'
+  templateUrl: './account-change-password.component.html',
+  styleUrls: [ './account-change-password.component.scss' ]
 })
-
 export class AccountChangePasswordComponent extends FormReactive implements OnInit {
   error: string = null
 
diff --git a/client/src/app/account/account-settings/account-details/account-details.component.html b/client/src/app/account/account-settings/account-details/account-details.component.html
new file mode 100644 (file)
index 0000000..c3cf6b6
--- /dev/null
@@ -0,0 +1,14 @@
+<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
+
+<form role="form" (ngSubmit)="updateDetails()" [formGroup]="form">
+  <input
+    type="checkbox" id="displayNSFW"
+    formControlName="displayNSFW"
+  >
+  <label for="displayNSFW">Display videos that contain mature or explicit content</label>
+  <div *ngIf="formErrors['displayNSFW']" class="alert alert-danger">
+    {{ formErrors['displayNSFW'] }}
+  </div>
+
+  <input type="submit" value="Update" [disabled]="!form.valid">
+</form>
diff --git a/client/src/app/account/account-settings/account-details/account-details.component.scss b/client/src/app/account/account-settings/account-details/account-details.component.scss
new file mode 100644 (file)
index 0000000..b1810d4
--- /dev/null
@@ -0,0 +1,11 @@
+label {
+  font-size: 15px;
+  font-weight: $font-regular;
+  margin-left: 5px;
+}
+
+input[type=submit] {
+  @include peertube-button;
+
+  display: block;
+}
similarity index 78%
rename from client/src/app/account/account-details/account-details.component.ts
rename to client/src/app/account/account-settings/account-details/account-details.component.ts
index d7a6e6871a53978ca483e8b304b7983be7a50636..d835c53e502440b5b333bd84be17069c984bb596 100644 (file)
@@ -1,21 +1,14 @@
-import { Component, OnInit, Input } from '@angular/core'
+import { Component, Input, OnInit } from '@angular/core'
 import { FormBuilder, FormGroup } from '@angular/forms'
-import { Router } from '@angular/router'
-
 import { NotificationsService } from 'angular2-notifications'
-
-import { AuthService } from '../../core'
-import {
-  FormReactive,
-  User,
-  UserService,
-  USER_PASSWORD
-} from '../../shared'
-import { UserUpdateMe } from '../../../../../shared'
+import { UserUpdateMe } from '../../../../../../shared'
+import { AuthService } from '../../../core'
+import { FormReactive, User, UserService } from '../../../shared'
 
 @Component({
   selector: 'my-account-details',
-  templateUrl: './account-details.component.html'
+  templateUrl: './account-details.component.html',
+  styleUrls: [ './account-details.component.scss' ]
 })
 
 export class AccountDetailsComponent extends FormReactive implements OnInit {
diff --git a/client/src/app/account/account-settings/account-settings.component.html b/client/src/app/account/account-settings/account-settings.component.html
new file mode 100644 (file)
index 0000000..2509eb5
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="user-info">
+  {{ user.username }}
+</div>
+
+<div class="account-title">Account settings</div>
+<my-account-change-password></my-account-change-password>
+
+<div class="account-title">Filtering</div>
+<my-account-details [user]="user"></my-account-details>
diff --git a/client/src/app/account/account-settings/account-settings.component.scss b/client/src/app/account/account-settings/account-settings.component.scss
new file mode 100644 (file)
index 0000000..a082263
--- /dev/null
@@ -0,0 +1,13 @@
+.user-info {
+  font-size: 20px;
+  font-weight: $font-bold;
+}
+
+.account-title {
+  text-transform: uppercase;
+  color: $orange-color;
+  font-weight: $font-bold;
+  font-size: 13px;
+  margin-top: 55px;
+  margin-bottom: 30px;
+}
diff --git a/client/src/app/account/account-settings/account-settings.component.ts b/client/src/app/account/account-settings/account-settings.component.ts
new file mode 100644 (file)
index 0000000..c3b670e
--- /dev/null
@@ -0,0 +1,18 @@
+import { Component, OnInit } from '@angular/core'
+import { User } from '../../shared'
+import { AuthService } from '../../core'
+
+@Component({
+  selector: 'my-account-settings',
+  templateUrl: './account-settings.component.html',
+  styleUrls: [ './account-settings.component.scss' ]
+})
+export class AccountSettingsComponent implements OnInit {
+  user: User = null
+
+  constructor (private authService: AuthService) {}
+
+  ngOnInit () {
+    this.user = this.authService.getUser()
+  }
+}
index 177e54999e3e6ec542f9b3ecfbb12efea671a427..d82a4ca4d69316ac3bc95689c0019b2d721825a9 100644 (file)
@@ -1,25 +1,11 @@
 <div class="row">
-  <div class="content-padding">
-    <h3>Account</h3>
+  <div class="sub-menu">
+    <a routerLink="/account/settings" routerLinkActive="active" class="title-page">My account</a>
 
-    <div class="col-md-6 col-sm-12">
-      <div class="panel panel-default">
-        <div class="panel-heading">Change password</div>
-
-        <div class="panel-body">
-          <my-account-change-password></my-account-change-password>
-        </div>
-      </div>
-    </div>
-
-    <div class="col-md-6 col-sm-12">
-      <div class="panel panel-default">
-        <div class="panel-heading">Update my informations</div>
+    <a routerLink="/account/videos" routerLinkActive="active" class="title-page">My videos</a>
+  </div>
 
-        <div class="panel-body">
-          <my-account-details [user]="user"></my-account-details>
-        </div>
-      </div>
-    </div>
+  <div class="margin-content">
+    <router-outlet></router-outlet>
   </div>
 </div>
index 61b80d0a72174e7101ecd8afddd2d3348b538840..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,3 +0,0 @@
-.panel {
-  margin-top: 40px;
-}
index 929934f67adad77b38506205b0170e9cb86d2eb9..3d3677ab09b106f506a483906ae4e57d4b1b7dc5 100644 (file)
@@ -1,28 +1,8 @@
-import { Component, OnInit } from '@angular/core'
-import { FormBuilder, FormGroup } from '@angular/forms'
-import { Router } from '@angular/router'
-
-import { NotificationsService } from 'angular2-notifications'
-
-import { AuthService } from '../core'
-import {
-  FormReactive,
-  User,
-  UserService,
-  USER_PASSWORD
-} from '../shared'
+import { Component } from '@angular/core'
 
 @Component({
   selector: 'my-account',
   templateUrl: './account.component.html',
   styleUrls: [ './account.component.scss' ]
 })
-export class AccountComponent implements OnInit {
-  user: User = null
-
-  constructor (private authService: AuthService) {}
-
-  ngOnInit () {
-    this.user = this.authService.getUser()
-  }
-}
+export class AccountComponent {}
index 380e9d2354d74a2458b9348a83e38e8e5bf1b9f2..ff444ddeb15ec43d1e868e8e92891d9585ab0956 100644 (file)
@@ -1,11 +1,11 @@
 import { NgModule } from '@angular/core'
-
+import { SharedModule } from '../shared'
 import { AccountRoutingModule } from './account-routing.module'
+import { AccountChangePasswordComponent } from './account-settings/account-change-password/account-change-password.component'
+import { AccountDetailsComponent } from './account-settings/account-details/account-details.component'
+import { AccountSettingsComponent } from './account-settings/account-settings.component'
 import { AccountComponent } from './account.component'
-import { AccountChangePasswordComponent } from './account-change-password'
-import { AccountDetailsComponent } from './account-details'
 import { AccountService } from './account.service'
-import { SharedModule } from '../shared'
 
 @NgModule({
   imports: [
@@ -15,6 +15,7 @@ import { SharedModule } from '../shared'
 
   declarations: [
     AccountComponent,
+    AccountSettingsComponent,
     AccountChangePasswordComponent,
     AccountDetailsComponent
   ],
index f245d05631e6ab81ffd6b69664f9356cfb6f5f08..1baffa5c8e7653e24b05e7cf71d1e3e37da52dde 100644 (file)
@@ -2,14 +2,6 @@
   min-height: calc(100vh - #{$header-height} - #{$footer-height} - #{$footer-margin});
 }
 
-.main-col {
-  margin-left: $menu-width;
-
-  &.expanded {
-    margin-left: 0;
-  }
-}
-
 .sub-header-container {
   margin-top: $header-height;
 }
index 21f8d8ba46bec2dd84109865adc7e0bcec7348e8..0ed8ec518473ede42ebedcbd16993363018c4b57 100644 (file)
@@ -1,7 +1,7 @@
 <menu>
   <div *ngIf="isLoggedIn" class="logged-in-block">
     <div class="logged-in-info">
-      <div class="logged-in-username">{{ user.username  }}</div>
+      <a routerLink="/account/settings" class="logged-in-username">{{ user.username  }}</a>
       <div class="logged-in-email">{{ user.email }}</div>
     </div>
 
index 2c21067334ceb67663598dce4349a9d30b40bd15..9d67ca66c6217de89237fe36d11f2ffcbe175cc2 100644 (file)
@@ -28,6 +28,10 @@ menu {
       .logged-in-username {
         font-size: 16px;
         font-weight: $font-semibold;
+        color: $menu-color;
+        cursor: pointer;
+
+        @include disable-default-a-behaviour;
       }
 
       .logged-in-email {
@@ -57,6 +61,12 @@ menu {
       width: 190px;
       border-radius: 3px;
       text-align: center;
+      color: $menu-color;
+      display: block;
+      cursor: pointer;
+      margin-bottom: 15px;
+
+      @include disable-default-a-behaviour;
 
       &.login-button {
         background-color: $orange-color;
@@ -82,6 +92,13 @@ menu {
 
     a {
       display: flex;
+      color: $menu-color;
+      cursor: pointer;
+      height: 22px;
+      line-height: 22px;
+      font-size: 16px;
+      margin-bottom: 15px;
+      @include disable-default-a-behaviour;
 
       .icon {
         width: 22px;
@@ -113,16 +130,4 @@ menu {
       }
     }
   }
-
-  a {
-    color: $menu-color;
-    height: 22px;
-    line-height: 22px;
-    display: block;
-    font-size: 16px;
-    cursor: pointer;
-    margin-bottom: 15px;
-
-    @include disable-default-a-behaviour;
-  }
 }
index ffd891904247465429268478d8fd84fb30b81661..191d3d597167bb7e0b6d3eb63d146f6923fa0fdf 100644 (file)
@@ -1,13 +1,7 @@
 #search-video {
-  display: inline-block;
-  height: $button-height;
-  width: $search-input-width;
+  @include peertube-input-text($search-input-width);
   margin-right: 15px;
   padding-right: 25px; // For the search icon
-  background: #fff;
-  border: 1px solid #C6C6C6;
-  border-radius: 3px;
-  padding-left: 15px;
 
   &::placeholder {
     color: #000;
 }
 
 .upload-button {
-  display: inline-block;
-  color: #fff;
-  font-weight: $font-semibold;
-  font-size: 15px;
-  height: $button-height;
-  line-height: $button-height;
-  border-radius: 3px;
-  text-align: center;
-  margin-right: 25px;
-  background-color: $orange-color;
-  padding: 0 17px 0 13px;
+  @include peertube-button-link;
 
-  @include disable-default-a-behaviour;
+  margin-right: 25px;
 
   .icon.icon-upload {
     display: inline-block;
index a5a60364acb37d31ba872013afd8ae1e8bb55c3e..594e31984c489456dda7098d13136b12adaab612 100644 (file)
@@ -1,4 +1,3 @@
-export * from './my-videos.component'
 export * from './video-recently-added.component'
 export * from './video-trending.component'
 export * from './shared'
diff --git a/client/src/app/videos/video-list/my-videos.component.ts b/client/src/app/videos/video-list/my-videos.component.ts
deleted file mode 100644 (file)
index 146db82..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-import { Component, OnDestroy, OnInit } from '@angular/core'
-import { ActivatedRoute, Router } from '@angular/router'
-
-import { NotificationsService } from 'angular2-notifications'
-
-import { AbstractVideoList } from './shared'
-import { VideoService } from '../shared'
-
-@Component({
-  selector: 'my-videos',
-  styleUrls: [ './shared/abstract-video-list.scss' ],
-  templateUrl: './shared/abstract-video-list.html'
-})
-export class MyVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
-
-  constructor (
-    protected router: Router,
-    protected route: ActivatedRoute,
-    protected notificationsService: NotificationsService,
-    private videoService: VideoService
-  ) {
-    super()
-  }
-
-  ngOnInit () {
-    super.ngOnInit()
-  }
-
-  ngOnDestroy () {
-    super.ngOnDestroy()
-  }
-
-  getVideosObservable () {
-    return this.videoService.getMyVideos(this.pagination, this.sort)
-  }
-}
index 69e16319efdb5d1da35fcfe1268167a5a6067e5c..bd4f6b1f8247f4c2805521d29170feda576df834 100644 (file)
@@ -1,18 +1,19 @@
-<div class="title-page">
-  {{ titlePage }}
-</div>
+<div class="margin-content">
+  <div class="title-page title-page-single">
+    {{ titlePage }}
+  </div>
 
-<div
-  class="videos-miniatures"
-  infiniteScroll
-  [infiniteScrollUpDistance]="1.5"
-  [infiniteScrollDistance]="0.5"
-  (scrolled)="onNearOfBottom()"
-  (scrolledUp)="onNearOfTop()"
->
-  <my-video-miniature
-    class="ng-animate"
-    *ngFor="let video of videos" [video]="video" [user]="user" [currentSort]="sort"
+  <div
+    infiniteScroll
+    [infiniteScrollUpDistance]="1.5"
+    [infiniteScrollDistance]="0.5"
+    (scrolled)="onNearOfBottom()"
+    (scrolledUp)="onNearOfTop()"
   >
-  </my-video-miniature>
+    <my-video-miniature
+      class="ng-animate"
+      *ngFor="let video of videos" [video]="video" [user]="user" [currentSort]="sort"
+    >
+    </my-video-miniature>
+  </div>
 </div>
index de174802b868d3ad319c40dbee569fccd5283970..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,23 +0,0 @@
-.videos-info {
-  @media screen and (max-width: 400px) {
-    margin-left: 0;
-  }
-
-  border-bottom: 1px solid #f1f1f1;
-  height: 40px;
-  line-height: 40px;
-
-  .videos-total-results {
-    font-size: 13px;
-  }
-
-  my-loader {
-    display: inline-block;
-    margin-left: 5px;
-  }
-}
-
-pagination {
-  display: block;
-  text-align: center;
-}
index 44cdc1d9fce1809bd2810132ccdd00c91f48c3aa..a684ffef43f28a76c6680c88cc31d1772a7d6642 100644 (file)
@@ -36,7 +36,9 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
   }
 
   ngOnDestroy () {
-    this.subActivatedRoute.unsubscribe()
+    if (this.subActivatedRoute) {
+      this.subActivatedRoute.unsubscribe()
+    }
   }
 
   onNearOfTop () {
index 1f894df7a384fee7e76c49d70a2f8e28113f0726..204851c81ecd8326f44dde1eaa22f604bb2666ac 100644 (file)
@@ -1,7 +1,6 @@
 import { NgModule } from '@angular/core'
 import { RouterModule, Routes } from '@angular/router'
 import { MetaGuard } from '@ngx-meta/core'
-import { MyVideosComponent } from './video-list'
 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
 import { VideoTrendingComponent } from './video-list/video-trending.component'
 import { VideosComponent } from './videos.component'
@@ -17,15 +16,6 @@ const videosRoutes: Routes = [
         pathMatch: 'full',
         redirectTo: 'recently-added'
       },
-      {
-        path: 'mine',
-        component: MyVideosComponent,
-        data: {
-          meta: {
-            title: 'My videos'
-          }
-        }
-      },
       {
         path: 'trending',
         component: VideoTrendingComponent,
index f3981d27523429439df4ecfaf16aff9c3dad51ef..1d61941581042e68dd968ef0402c6fb754158f71 100644 (file)
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'
 import { InfiniteScrollModule } from 'ngx-infinite-scroll'
 import { SharedModule } from '../shared'
 import { VideoService } from './shared'
-import { MyVideosComponent, VideoMiniatureComponent } from './video-list'
+import { VideoMiniatureComponent } from './video-list'
 import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
 import { VideoTrendingComponent } from './video-list/video-trending.component'
 import { VideosRoutingModule } from './videos-routing.module'
@@ -20,7 +20,6 @@ import { VideosComponent } from './videos.component'
 
     VideoTrendingComponent,
     VideoRecentlyAddedComponent,
-    MyVideosComponent,
     VideoMiniatureComponent
   ],
 
index 681657d905c4bc73b6c1befcea2109dc1445b957..5798b8f6ead25e450c210d8fb30d363ce90b20b4 100644 (file)
@@ -4,3 +4,38 @@
     outline: none !important;
   }
 }
+
+@mixin peertube-input-text($width) {
+  display: inline-block;
+  height: $button-height;
+  width: $width;
+  background: #fff;
+  border: 1px solid #C6C6C6;
+  border-radius: 3px;
+  padding-left: 15px;
+
+  &::placeholder {
+    color: #585858;
+  }
+}
+
+@mixin peertube-button {
+  border: none;
+  color: #fff;
+  font-weight: $font-semibold;
+  font-size: 15px;
+  height: $button-height;
+  line-height: $button-height;
+  border-radius: 3px;
+  text-align: center;
+  background-color: $orange-color;
+  padding: 0 17px 0 13px;
+  cursor: pointer;
+}
+
+@mixin peertube-button-link {
+  display: inline-block;
+
+  @include peertube-button;
+  @include disable-default-a-behaviour;
+}
index e32b374621eebbf6e15c031a78e4e71c8ae43001..d05452367754be9228503a089a14319e99ce6556 100644 (file)
@@ -8,6 +8,8 @@ $orange-color: #F1680D;
 $black-background: #000;
 $grey-background: #f6f2f2;
 
+$expanded-horizontal-margins: 150px;
+
 $button-height: 30px;
 
 $header-height: 50px;
index fc61a22da5bd01687e4c60913e9790f91b9ed34b..db63db5f5070ec194cbfab8dd98f475f2875de5f 100644 (file)
@@ -33,14 +33,50 @@ input.readonly {
 }
 
 .main-col {
-  padding: 30px;
+  margin-left: $menu-width;
 
   .title-page {
+    color: #000;
     font-size: 16px;
-    font-weight: $font-bold;
     display: inline-block;
-    border-bottom: 2px solid $orange-color;
-    margin-bottom: 25px;
+    margin-right: 55px;
+    font-weight: $font-semibold;
+    @include disable-default-a-behaviour;
+
+    &.active, &.title-page-single {
+      border-bottom: 2px solid $orange-color;
+      font-weight: $font-bold;
+      margin-top: 30px;
+      margin-bottom: 25px;
+    }
+  }
+
+  .margin-content {
+    margin-left: 10px;
+    margin-right: 10px;
+  }
+
+  .sub-menu {
+    background-color: #F7F7F7;
+    width: 100%;
+    height: 81px;
+    margin-bottom: 30px;
+    display: flex;
+    align-items: center;
+  }
+
+  // Override some properties if the main content is expanded (no menu on the left)
+  &.expanded {
+    margin-left: 0;
+
+    .margin-content {
+      margin-left: $expanded-horizontal-margins;
+      margin-right: $expanded-horizontal-margins;
+    }
+
+    .sub-menu {
+      padding-left: $expanded-horizontal-margins;
+    }
   }
 }
 
index 693489828e8b31aaa4949a399459a7c836b036c1..52eef50f288cd029e8e73ad10d29820cf2000c5e 100644 (file)
@@ -1,4 +1,5 @@
 @import '_variables.scss';
+@import '_mixins.scss';
 
 $bootstrap-sass-asset-helper: false !default;
 //