From b3ff250d3845de71075879e13d11e27112eb42e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20B=C3=B6hlke?= Date: Sat, 23 Feb 2019 16:59:01 +0100 Subject: [PATCH] WIP: show PDF, PNG and JPEG files in projector --- client/package.json | 1 + .../mediafile/mediafile-slide.component.html | 14 +++++++++++--- .../mediafile/mediafile-slide.component.ts | 12 +++++++++--- .../mediafiles/mediafile/mediafile-slide.module.ts | 8 +++++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/client/package.json b/client/package.json index ce2b4ffb8..4ba41e54c 100644 --- a/client/package.json +++ b/client/package.json @@ -51,6 +51,7 @@ "ng-pick-datetime": "^7.0.0", "ngx-file-drop": "^6.0.0", "ngx-mat-select-search": "^1.7.2", + "ng2-pdf-viewer": "^5.2.3", "ngx-papaparse": "^3.0.2", "pdfmake": "^0.1.53", "po2json": "^1.0.0-alpha", diff --git a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.html b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.html index 0aeb50f15..c0b7bb4fe 100644 --- a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.html +++ b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.html @@ -1,5 +1,13 @@
-

{{ data.data.path }}

-

{{ data.data.type }}

-

{{ data.data.media_url_prefix }}

+
+ +
+
+ +
+
+ +
diff --git a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts index cab715e8b..e62a48122 100644 --- a/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts +++ b/client/src/app/slides/mediafiles/mediafile/mediafile-slide.component.ts @@ -1,7 +1,9 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core'; +import {computed} from 'mobx-angular'; -import { BaseSlideComponent } from 'app/slides/base-slide-component'; -import { MediafileSlideData } from './mediafile-slide-data'; + +import {BaseSlideComponent} from 'app/slides/base-slide-component'; +import {MediafileSlideData} from './mediafile-slide-data'; @Component({ selector: 'os-mediafile-slide', @@ -12,4 +14,8 @@ export class MediafileSlideComponent extends BaseSlideComponent