<label for="new-password">Change password</label>
<input
- type="password" class="form-control" id="new-password" placeholder="Old password"
- formControlName="new-password"
+ type="password" id="new-password" placeholder="New password"
+ formControlName="new-password" [ngClass]="{ 'input-error': formErrors['new-password'] }"
>
- <div *ngIf="formErrors['new-password']" class="alert alert-danger">
+ <div *ngIf="formErrors['new-password']" class="form-error">
{{ formErrors['new-password'] }}
</div>
<input
- type="password" id="new-confirmed-password" placeholder="New password"
+ type="password" id="new-confirmed-password" placeholder="Confirm new password"
formControlName="new-confirmed-password"
>
input[type=password] {
@include peertube-input-text(340px);
display: block;
- margin-bottom: 10px;
+
+ &#new-confirmed-password {
+ margin-top: 15px;
+ }
}
input[type=submit] {
@include peertube-button;
+ margin-top: 15px;
}
+
{{ formErrors['displayNSFW'] }}
</div>
- <input type="submit" value="Update" [disabled]="!form.valid">
+ <input type="submit" value="Save" [disabled]="!form.valid">
</form>
@include peertube-button;
display: block;
+ margin-top: 15px;
}
<div
infiniteScroll
[infiniteScrollDistance]="0.5"
+ [infiniteScrollUpDistance]="1.5"
(scrolled)="onNearOfBottom()"
+ (scrolledUp)="onNearOfTop()"
>
<div class="video" *ngFor="let video of videos">
<my-video-thumbnail [video]="video"></my-video-thumbnail>
display: flex;
height: 130px;
padding-bottom: 20px;
- margin-bottom: 20px;
- border-bottom: 1px solid #C6C6C6;
+
+ &:not(:last-child) {
+ margin-bottom: 20px;
+ border-bottom: 1px solid #C6C6C6;
+ }
my-video-thumbnail {
margin-right: 10px;
<label for="username">Username</label>
<input
type="text" id="username" placeholder="Username" required
- formControlName="username"
+ formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
>
- <div *ngIf="formErrors.username" class="alert alert-danger">
+ <div *ngIf="formErrors.username" class="form-error">
{{ formErrors.username }}
</div>
</div>
<label for="password">Password</label>
<input
type="password" name="password" id="password" placeholder="Password" required
- formControlName="password"
+ formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
>
- <div *ngIf="formErrors.password" class="alert alert-danger">
+ <div *ngIf="formErrors.password" class="form-error">
{{ formErrors.password }}
</div>
</div>
// Subscribe to route changes
const routeParams = this.route.snapshot.params
this.loadRouteParams(routeParams)
+
if (this.loadOnInit === true) this.loadMoreVideos('after')
}
observable.subscribe(
({ videos, totalVideos }) => {
+ // Paging is too high, return to the first one
+ if (totalVideos <= ((this.pagination.currentPage - 1) * this.pagination.itemsPerPage)) {
+ this.pagination.currentPage = 1
+ this.setNewRouteParams()
+ return this.reloadVideos()
+ }
+
this.loadedPages[this.pagination.currentPage] = true
this.pagination.totalItems = totalVideos
<label for="username">Username</label>
<input
type="text" class="form-control" id="username" placeholder="Username"
- formControlName="username"
+ formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
>
- <div *ngIf="formErrors.username" class="alert alert-danger">
+ <div *ngIf="formErrors.username" class="form-error">
{{ formErrors.username }}
</div>
</div>
<label for="email">Email</label>
<input
type="text" class="form-control" id="email" placeholder="Email"
- formControlName="email"
+ formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }"
>
- <div *ngIf="formErrors.email" class="alert alert-danger">
+ <div *ngIf="formErrors.email" class="form-error">
{{ formErrors.email }}
</div>
</div>
<label for="password">Password</label>
<input
type="password" class="form-control" id="password" placeholder="Password"
- formControlName="password"
+ formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
>
- <div *ngIf="formErrors.password" class="alert alert-danger">
+ <div *ngIf="formErrors.password" class="form-error">
{{ formErrors.password }}
</div>
</div>
$black-background: #000;
$grey-background: #f6f2f2;
+$red-error: #FF0000;
$expanded-horizontal-margins: 150px;
$not-expanded-horizontal-margins: 30px;
font-size: 15px;
}
+.form-error {
+ display: block;
+ color: $red-error;
+ margin-top: 5px;
+}
+
+.input-error {
+ border-color: $red-error !important;
+}
+
.glyphicon-black {
color: black;
}