From 6693df9dd60e6966186bcb7765218596de7b65c0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 31 Jan 2018 10:42:01 +0100 Subject: Hide description previews on mobile view --- .../app/videos/+video-edit/shared/video-description.component.html | 2 +- .../src/app/videos/+video-edit/shared/video-description.component.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'client/src/app/videos/+video-edit/shared') 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 @@ id="description" name="description"> - + 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' 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' @@ -59,6 +60,10 @@ export class VideoDescriptionComponent implements ControlValueAccessor, OnInit { this.descriptionChanged.next(this.description) } + arePreviewsDisplayed () { + return isInMobileView() === false + } + private updateDescriptionPreviews () { if (!this.description) return -- cgit v1.2.3