aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-31 10:42:01 +0100
committerChocobozzz <me@florianbigard.com>2018-01-31 10:42:01 +0100
commit6693df9dd60e6966186bcb7765218596de7b65c0 (patch)
treed0aa0ac674b95e19be3c2169c78fdbc11377f4ef /client/src/app/videos
parent61bbc7277501692d1520a421dff5af5d38ba6cf4 (diff)
downloadPeerTube-6693df9dd60e6966186bcb7765218596de7b65c0.tar.gz
PeerTube-6693df9dd60e6966186bcb7765218596de7b65c0.tar.zst
PeerTube-6693df9dd60e6966186bcb7765218596de7b65c0.zip
Hide description previews on mobile view
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-description.component.html2
-rw-r--r--client/src/app/videos/+video-edit/shared/video-description.component.ts5
2 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-description.component.html b/client/src/app/videos/+video-edit/shared/video-description.component.html
index 5d05467be..989292c47 100644
--- a/client/src/app/videos/+video-edit/shared/video-description.component.html
+++ b/client/src/app/videos/+video-edit/shared/video-description.component.html
@@ -3,7 +3,7 @@
3 id="description" name="description"> 3 id="description" name="description">
4</textarea> 4</textarea>
5 5
6<tabset #staticTabs class="previews"> 6<tabset *ngIf="arePreviewsDisplayed()" #staticTabs class="previews">
7 <tab heading="Truncated description preview" [innerHTML]="truncatedDescriptionHTML"></tab> 7 <tab heading="Truncated description preview" [innerHTML]="truncatedDescriptionHTML"></tab>
8 <tab heading="Complete description preview" [innerHTML]="descriptionHTML"></tab> 8 <tab heading="Complete description preview" [innerHTML]="descriptionHTML"></tab>
9</tabset> 9</tabset>
diff --git a/client/src/app/videos/+video-edit/shared/video-description.component.ts b/client/src/app/videos/+video-edit/shared/video-description.component.ts
index 34dbc21a6..eba345412 100644
--- a/client/src/app/videos/+video-edit/shared/video-description.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-description.component.ts
@@ -2,6 +2,7 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'
2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' 2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
3import 'rxjs/add/operator/debounceTime' 3import 'rxjs/add/operator/debounceTime'
4import 'rxjs/add/operator/distinctUntilChanged' 4import 'rxjs/add/operator/distinctUntilChanged'
5import { isInMobileView } from '@app/shared/misc/utils'
5import { Subject } from 'rxjs/Subject' 6import { Subject } from 'rxjs/Subject'
6import { MarkdownService } from '../../shared' 7import { MarkdownService } from '../../shared'
7import truncate from 'lodash-es/truncate' 8import truncate from 'lodash-es/truncate'
@@ -59,6 +60,10 @@ export class VideoDescriptionComponent implements ControlValueAccessor, OnInit {
59 this.descriptionChanged.next(this.description) 60 this.descriptionChanged.next(this.description)
60 } 61 }
61 62
63 arePreviewsDisplayed () {
64 return isInMobileView() === false
65 }
66
62 private updateDescriptionPreviews () { 67 private updateDescriptionPreviews () {
63 if (!this.description) return 68 if (!this.description) return
64 69