Design signup and login pages

pull/159/head
Chocobozzz 2017-12-05 16:48:26 +01:00
parent 35fb2b68ff
commit d235f6b0d1
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
10 changed files with 63 additions and 46 deletions

View File

@ -302,6 +302,7 @@ module.exports = function (options) {
*/
new LoaderOptionsPlugin({
options: {
context: '',
sassLoader: {
precision: 10,
includePaths: [ helpers.root('src/sass') ]

View File

@ -1,6 +1,8 @@
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
<form role="form" (ngSubmit)="changePassword()" [formGroup]="form">
<label for="new-password">Change password</label>
<input
type="password" class="form-control" id="new-password" placeholder="Old password"
formControlName="new-password"

View File

@ -1,34 +1,33 @@
<div class="row">
<div class="content-padding">
<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 class="margin-content">
<div class="title-page title-page-single">
Login
</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>

View File

@ -0,0 +1,8 @@
input:not([type=submit]) {
@include peertube-input-text(340px);
display: block;
}
input[type=submit] {
@include peertube-button;
}

View File

@ -7,7 +7,8 @@ import { FormReactive } from '../shared'
@Component({
selector: 'my-login',
templateUrl: './login.component.html'
templateUrl: './login.component.html',
styleUrls: [ './login.component.scss' ]
})
export class LoginComponent extends FormReactive implements OnInit {

View File

@ -54,6 +54,6 @@ export class User implements UserServerModel {
getAvatarPath () {
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'
}
}

View File

@ -1,7 +1,8 @@
<div class="row">
<div class="content-padding">
<div class="margin-content">
<h3>Signup</h3>
<div class="title-page title-page-single">
Signup
</div>
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
@ -39,8 +40,7 @@
</div>
</div>
<input type="submit" value="Signup" class="btn btn-default" [disabled]="!form.valid">
<input type="submit" value="Signup" [disabled]="!form.valid">
</form>
</div>
</div>

View File

@ -0,0 +1,8 @@
input:not([type=submit]) {
@include peertube-input-text(340px);
display: block;
}
input[type=submit] {
@include peertube-button;
}

View File

@ -16,7 +16,8 @@ import { UserCreate } from '../../../../shared'
@Component({
selector: 'my-signup',
templateUrl: './signup.component.html'
templateUrl: './signup.component.html',
styleUrls: [ './signup.component.scss' ]
})
export class SignupComponent extends FormReactive implements OnInit {
error: string = null

View File

@ -20,12 +20,9 @@ input.readonly {
background-color: #fff !important;
}
.form-control, .btn {
border-radius: 0;
}
.dropdown-menu {
border-radius: 0;
label {
font-weight: $font-bold;
font-size: 15px;
}
.glyphicon-black {