From 4da35bdfb082f619c929e748ba8429074f01d309 Mon Sep 17 00:00:00 2001 From: SumukhaKV Date: Thu, 24 May 2018 15:07:21 +0530 Subject: [PATCH 1/4] Add stats.size and stats.birthtime to get metadata of each file --- gok/gok.controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gok/gok.controller.js b/gok/gok.controller.js index 6a1305b..2f80043 100644 --- a/gok/gok.controller.js +++ b/gok/gok.controller.js @@ -54,7 +54,9 @@ let prepareDetailedFileList = (parentDirPath, fileList) => { // Other file details can be added as and when required return { name : stats.name, - isDirectory : stats.isDirectory + isDirectory : stats.isDirectory, + size : stats.size, + uploadedOn : stats.birthtime.toLocalDateString() } }) .catch((error) => { From 2257e96bf02e31e6700fb65ef541414f902178dd Mon Sep 17 00:00:00 2001 From: SumukhaKV Date: Thu, 24 May 2018 15:13:59 +0530 Subject: [PATCH 2/4] Add metadata of each file. Add HTML viewer using iframe. Increase the size modal close icon. Fit Player to screen size. Fixes #2, #5, #13 and #14 --- ui/src/components/ContentArea.js | 36 ++++++++++++++++++++++++++++---- ui/src/components/style.css | 13 ++++++++---- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/ui/src/components/ContentArea.js b/ui/src/components/ContentArea.js index e31c472..19a4c3e 100644 --- a/ui/src/components/ContentArea.js +++ b/ui/src/components/ContentArea.js @@ -39,6 +39,8 @@ const VideoPlayer = (props) => { controls autoPlay src={props.src} + height={window.innerHeight - 60} + width={window.innerWidth - 60} /> ) } @@ -96,6 +98,20 @@ class ContentArea extends Component { /> ); break; + case '.html': + fileViewer = ( +
+