params = this.restService.addRestGetParams(params, pagination, sort)
return this.authHttp.get<ResultList<Job>>(JobService.BASE_JOB_URL + '/' + state, { params })
- .map(res => this.restExtractor.convertResultListDateToHuman(res))
+ .map(res => this.restExtractor.convertResultListDateToHuman(res, [ 'createdAt', 'updatedAt' ]))
.map(res => this.restExtractor.applyToResultListData(res, this.prettyPrintData))
.catch(err => this.restExtractor.handleError(err))
}
@include peertube-button-file(160px);
margin-top: 10px;
+ margin-bottom: 5px;
}
.file-max-size {
import { Component, OnInit } from '@angular/core'
import { NavigationEnd, Router } from '@angular/router'
import { AuthService, ServerService } from '@app/core'
+import { isInMobileView } from '@app/shared/misc/utils'
@Component({
selector: 'my-app',
this.serverService.loadVideoPrivacies()
// Do not display menu on small screens
- if (window.innerWidth < 600) {
+ if (isInMobileView()) {
this.isMenuDisplayed = false
}
this.router.events.subscribe(
e => {
// User clicked on a link in the menu, change the page
- if (e instanceof NavigationEnd && window.innerWidth < 600) {
+ if (e instanceof NavigationEnd && isInMobileView()) {
this.isMenuDisplayed = false
}
}
id="description" name="description">
</textarea>
-<tabset #staticTabs class="previews">
+<tabset *ngIf="arePreviewsDisplayed()" #staticTabs class="previews">
<tab heading="Truncated description preview" [innerHTML]="truncatedDescriptionHTML"></tab>
<tab heading="Complete description preview" [innerHTML]="descriptionHTML"></tab>
</tabset>
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
import 'rxjs/add/operator/debounceTime'
import 'rxjs/add/operator/distinctUntilChanged'
+import { isInMobileView } from '@app/shared/misc/utils'
import { Subject } from 'rxjs/Subject'
import { MarkdownService } from '../../shared'
import truncate from 'lodash-es/truncate'
this.descriptionChanged.next(this.description)
}
+ arePreviewsDisplayed () {
+ return isInMobileView() === false
+ }
+
private updateDescriptionPreviews () {
if (!this.description) return
.tab-link {
display: flex !important;
align-items: center;
- height: 30px !important;
+ min-height: 30px !important;
padding: 0 15px;
}
&, &.expanded {
.margin-content {
- margin-left: 10px;
- margin-right: 10px;
+ margin-left: 15px;
+ margin-right: 15px;
}
.sub-menu {
font-weight: $font-regular;
margin-left: 5px;
cursor: pointer;
+ display: inline;
}
}