aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-05 16:48:26 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-05 16:48:26 +0100
commitd235f6b0d1054a2a3451dacade927caefce8f30c (patch)
treedd6377523df36fd7c308e39f59724981fdb6f831
parent35fb2b68ff9cd9b755dae6f073c32a97dc237e35 (diff)
downloadPeerTube-d235f6b0d1054a2a3451dacade927caefce8f30c.tar.gz
PeerTube-d235f6b0d1054a2a3451dacade927caefce8f30c.tar.zst
PeerTube-d235f6b0d1054a2a3451dacade927caefce8f30c.zip
Design signup and login pages
-rw-r--r--client/config/webpack.common.js1
-rw-r--r--client/src/app/account/account-settings/account-change-password/account-change-password.component.html2
-rw-r--r--client/src/app/login/login.component.html53
-rw-r--r--client/src/app/login/login.component.scss8
-rw-r--r--client/src/app/login/login.component.ts3
-rw-r--r--client/src/app/shared/users/user.model.ts2
-rw-r--r--client/src/app/signup/signup.component.html10
-rw-r--r--client/src/app/signup/signup.component.scss8
-rw-r--r--client/src/app/signup/signup.component.ts3
-rw-r--r--client/src/sass/application.scss9
10 files changed, 58 insertions, 41 deletions
diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js
index c37516271..f387b44f9 100644
--- a/client/config/webpack.common.js
+++ b/client/config/webpack.common.js
@@ -302,6 +302,7 @@ module.exports = function (options) {
302 */ 302 */
303 new LoaderOptionsPlugin({ 303 new LoaderOptionsPlugin({
304 options: { 304 options: {
305 context: '',
305 sassLoader: { 306 sassLoader: {
306 precision: 10, 307 precision: 10,
307 includePaths: [ helpers.root('src/sass') ] 308 includePaths: [ helpers.root('src/sass') ]
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
index bfb55218f..c57e705f9 100644
--- 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
@@ -1,6 +1,8 @@
1<div *ngIf="error" class="alert alert-danger">{{ error }}</div> 1<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
2 2
3<form role="form" (ngSubmit)="changePassword()" [formGroup]="form"> 3<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">
4
5 <label for="new-password">Change password</label>
4 <input 6 <input
5 type="password" class="form-control" id="new-password" placeholder="Old password" 7 type="password" class="form-control" id="new-password" placeholder="Old password"
6 formControlName="new-password" 8 formControlName="new-password"
diff --git a/client/src/app/login/login.component.html b/client/src/app/login/login.component.html
index bcea0a27a..82b70c98c 100644
--- a/client/src/app/login/login.component.html
+++ b/client/src/app/login/login.component.html
@@ -1,34 +1,33 @@
1<div class="row"> 1<div class="margin-content">
2 <div class="content-padding"> 2 <div class="title-page title-page-single">
3 3 Login
4 <h3>Login</h3> 4 </div>
5 5
6 <div *ngIf="error" class="alert alert-danger">{{ error }}</div> 6 <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
7 7
8 <form role="form" (ngSubmit)="login()" [formGroup]="form"> 8 <form role="form" (ngSubmit)="login()" [formGroup]="form">
9 <div class="form-group"> 9 <div class="form-group">
10 <label for="username">Username</label> 10 <label for="username">Username</label>
11 <input 11 <input
12 type="text" class="form-control" id="username" placeholder="Username" required 12 type="text" id="username" placeholder="Username" required
13 formControlName="username" 13 formControlName="username"
14 > 14 >
15 <div *ngIf="formErrors.username" class="alert alert-danger"> 15 <div *ngIf="formErrors.username" class="alert alert-danger">
16 {{ formErrors.username }} 16 {{ formErrors.username }}
17 </div>
18 </div> 17 </div>
18 </div>
19 19
20 <div class="form-group"> 20 <div class="form-group">
21 <label for="password">Password</label> 21 <label for="password">Password</label>
22 <input 22 <input
23 type="password" class="form-control" name="password" id="password" placeholder="Password" required 23 type="password" name="password" id="password" placeholder="Password" required
24 formControlName="password" 24 formControlName="password"
25 > 25 >
26 <div *ngIf="formErrors.password" class="alert alert-danger"> 26 <div *ngIf="formErrors.password" class="alert alert-danger">
27 {{ formErrors.password }} 27 {{ formErrors.password }}
28 </div>
29 </div> 28 </div>
29 </div>
30 30
31 <input type="submit" value="Login" class="btn btn-default" [disabled]="!form.valid"> 31 <input type="submit" value="Login" [disabled]="!form.valid">
32 </form> 32 </form>
33 </div>
34</div> 33</div>
diff --git a/client/src/app/login/login.component.scss b/client/src/app/login/login.component.scss
new file mode 100644
index 000000000..fd6981c59
--- /dev/null
+++ b/client/src/app/login/login.component.scss
@@ -0,0 +1,8 @@
1input:not([type=submit]) {
2 @include peertube-input-text(340px);
3 display: block;
4}
5
6input[type=submit] {
7 @include peertube-button;
8}
diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts
index 32dc9e36f..dfede5924 100644
--- a/client/src/app/login/login.component.ts
+++ b/client/src/app/login/login.component.ts
@@ -7,7 +7,8 @@ import { FormReactive } from '../shared'
7 7
8@Component({ 8@Component({
9 selector: 'my-login', 9 selector: 'my-login',
10 templateUrl: './login.component.html' 10 templateUrl: './login.component.html',
11 styleUrls: [ './login.component.scss' ]
11}) 12})
12 13
13export class LoginComponent extends FormReactive implements OnInit { 14export class LoginComponent extends FormReactive implements OnInit {
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index 9364ae721..b1c323114 100644
--- a/client/src/app/shared/users/user.model.ts
+++ b/client/src/app/shared/users/user.model.ts
@@ -54,6 +54,6 @@ export class User implements UserServerModel {
54 getAvatarPath () { 54 getAvatarPath () {
55 if (this.account && this.account.avatar) return this.account.avatar.path 55 if (this.account && this.account.avatar) return this.account.avatar.path
56 56
57 return '/client/assets/images/default-avatar.png' 57 return API_URL + '/client/assets/images/default-avatar.png'
58 } 58 }
59} 59}
diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html
index b8b7826eb..1e9f7f949 100644
--- a/client/src/app/signup/signup.component.html
+++ b/client/src/app/signup/signup.component.html
@@ -1,7 +1,8 @@
1<div class="row"> 1<div class="margin-content">
2 <div class="content-padding">
3 2
4 <h3>Signup</h3> 3 <div class="title-page title-page-single">
4 Signup
5 </div>
5 6
6 <div *ngIf="error" class="alert alert-danger">{{ error }}</div> 7 <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
7 8
@@ -39,8 +40,7 @@
39 </div> 40 </div>
40 </div> 41 </div>
41 42
42 <input type="submit" value="Signup" class="btn btn-default" [disabled]="!form.valid"> 43 <input type="submit" value="Signup" [disabled]="!form.valid">
43 </form> 44 </form>
44 45
45 </div>
46</div> 46</div>
diff --git a/client/src/app/signup/signup.component.scss b/client/src/app/signup/signup.component.scss
new file mode 100644
index 000000000..fd6981c59
--- /dev/null
+++ b/client/src/app/signup/signup.component.scss
@@ -0,0 +1,8 @@
1input:not([type=submit]) {
2 @include peertube-input-text(340px);
3 display: block;
4}
5
6input[type=submit] {
7 @include peertube-button;
8}
diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts
index 28e1ed0a8..13390a32a 100644
--- a/client/src/app/signup/signup.component.ts
+++ b/client/src/app/signup/signup.component.ts
@@ -16,7 +16,8 @@ import { UserCreate } from '../../../../shared'
16 16
17@Component({ 17@Component({
18 selector: 'my-signup', 18 selector: 'my-signup',
19 templateUrl: './signup.component.html' 19 templateUrl: './signup.component.html',
20 styleUrls: [ './signup.component.scss' ]
20}) 21})
21export class SignupComponent extends FormReactive implements OnInit { 22export class SignupComponent extends FormReactive implements OnInit {
22 error: string = null 23 error: string = null
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss
index 5e401f93b..4c5c0202c 100644
--- a/client/src/sass/application.scss
+++ b/client/src/sass/application.scss
@@ -20,12 +20,9 @@ input.readonly {
20 background-color: #fff !important; 20 background-color: #fff !important;
21} 21}
22 22
23.form-control, .btn { 23label {
24 border-radius: 0; 24 font-weight: $font-bold;
25} 25 font-size: 15px;
26
27.dropdown-menu {
28 border-radius: 0;
29} 26}
30 27
31.glyphicon-black { 28.glyphicon-black {