Design signup and login pages
This commit is contained in:
parent
35fb2b68ff
commit
d235f6b0d1
|
@ -302,6 +302,7 @@ module.exports = function (options) {
|
||||||
*/
|
*/
|
||||||
new LoaderOptionsPlugin({
|
new LoaderOptionsPlugin({
|
||||||
options: {
|
options: {
|
||||||
|
context: '',
|
||||||
sassLoader: {
|
sassLoader: {
|
||||||
precision: 10,
|
precision: 10,
|
||||||
includePaths: [ helpers.root('src/sass') ]
|
includePaths: [ helpers.root('src/sass') ]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
||||||
|
|
||||||
<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">
|
<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">
|
||||||
|
|
||||||
|
<label for="new-password">Change password</label>
|
||||||
<input
|
<input
|
||||||
type="password" class="form-control" id="new-password" placeholder="Old password"
|
type="password" class="form-control" id="new-password" placeholder="Old password"
|
||||||
formControlName="new-password"
|
formControlName="new-password"
|
||||||
|
|
|
@ -1,34 +1,33 @@
|
||||||
<div class="row">
|
<div class="margin-content">
|
||||||
<div class="content-padding">
|
<div class="title-page title-page-single">
|
||||||
|
Login
|
||||||
<h3>Login</h3>
|
|
||||||
|
|
||||||
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
|
||||||
|
|
||||||
<form role="form" (ngSubmit)="login()" [formGroup]="form">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="username">Username</label>
|
|
||||||
<input
|
|
||||||
type="text" class="form-control" id="username" placeholder="Username" required
|
|
||||||
formControlName="username"
|
|
||||||
>
|
|
||||||
<div *ngIf="formErrors.username" class="alert alert-danger">
|
|
||||||
{{ formErrors.username }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="password">Password</label>
|
|
||||||
<input
|
|
||||||
type="password" class="form-control" name="password" id="password" placeholder="Password" required
|
|
||||||
formControlName="password"
|
|
||||||
>
|
|
||||||
<div *ngIf="formErrors.password" class="alert alert-danger">
|
|
||||||
{{ formErrors.password }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="submit" value="Login" class="btn btn-default" [disabled]="!form.valid">
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
||||||
|
|
||||||
|
<form role="form" (ngSubmit)="login()" [formGroup]="form">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="username">Username</label>
|
||||||
|
<input
|
||||||
|
type="text" id="username" placeholder="Username" required
|
||||||
|
formControlName="username"
|
||||||
|
>
|
||||||
|
<div *ngIf="formErrors.username" class="alert alert-danger">
|
||||||
|
{{ formErrors.username }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input
|
||||||
|
type="password" name="password" id="password" placeholder="Password" required
|
||||||
|
formControlName="password"
|
||||||
|
>
|
||||||
|
<div *ngIf="formErrors.password" class="alert alert-danger">
|
||||||
|
{{ formErrors.password }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="Login" [disabled]="!form.valid">
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
8
client/src/app/login/login.component.scss
Normal file
8
client/src/app/login/login.component.scss
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
input:not([type=submit]) {
|
||||||
|
@include peertube-input-text(340px);
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=submit] {
|
||||||
|
@include peertube-button;
|
||||||
|
}
|
|
@ -7,7 +7,8 @@ import { FormReactive } from '../shared'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-login',
|
selector: 'my-login',
|
||||||
templateUrl: './login.component.html'
|
templateUrl: './login.component.html',
|
||||||
|
styleUrls: [ './login.component.scss' ]
|
||||||
})
|
})
|
||||||
|
|
||||||
export class LoginComponent extends FormReactive implements OnInit {
|
export class LoginComponent extends FormReactive implements OnInit {
|
||||||
|
|
|
@ -54,6 +54,6 @@ export class User implements UserServerModel {
|
||||||
getAvatarPath () {
|
getAvatarPath () {
|
||||||
if (this.account && this.account.avatar) return this.account.avatar.path
|
if (this.account && this.account.avatar) return this.account.avatar.path
|
||||||
|
|
||||||
return '/client/assets/images/default-avatar.png'
|
return API_URL + '/client/assets/images/default-avatar.png'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<div class="row">
|
<div class="margin-content">
|
||||||
<div class="content-padding">
|
|
||||||
|
|
||||||
<h3>Signup</h3>
|
<div class="title-page title-page-single">
|
||||||
|
Signup
|
||||||
|
</div>
|
||||||
|
|
||||||
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
||||||
|
|
||||||
|
@ -39,8 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" value="Signup" class="btn btn-default" [disabled]="!form.valid">
|
<input type="submit" value="Signup" [disabled]="!form.valid">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
8
client/src/app/signup/signup.component.scss
Normal file
8
client/src/app/signup/signup.component.scss
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
input:not([type=submit]) {
|
||||||
|
@include peertube-input-text(340px);
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=submit] {
|
||||||
|
@include peertube-button;
|
||||||
|
}
|
|
@ -16,7 +16,8 @@ import { UserCreate } from '../../../../shared'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-signup',
|
selector: 'my-signup',
|
||||||
templateUrl: './signup.component.html'
|
templateUrl: './signup.component.html',
|
||||||
|
styleUrls: [ './signup.component.scss' ]
|
||||||
})
|
})
|
||||||
export class SignupComponent extends FormReactive implements OnInit {
|
export class SignupComponent extends FormReactive implements OnInit {
|
||||||
error: string = null
|
error: string = null
|
||||||
|
|
|
@ -20,12 +20,9 @@ input.readonly {
|
||||||
background-color: #fff !important;
|
background-color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control, .btn {
|
label {
|
||||||
border-radius: 0;
|
font-weight: $font-bold;
|
||||||
}
|
font-size: 15px;
|
||||||
|
|
||||||
.dropdown-menu {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.glyphicon-black {
|
.glyphicon-black {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user