diff options
-rw-r--r-- | frontend/index.html | 4 | ||||
-rw-r--r-- | frontend/js/app.js | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/frontend/index.html b/frontend/index.html index 1905894..3a2f7f7 100644 --- a/frontend/index.html +++ b/frontend/index.html | |||
@@ -96,8 +96,8 @@ | |||
96 | 96 | ||
97 | <div v-show="!busy && session.valid" v-cloak> | 97 | <div v-show="!busy && session.valid" v-cloak> |
98 | <center> | 98 | <center> |
99 | <el-table :data="entries" style="max-width: 1280px;width: 100%" height="100%" empty-text="Folder is emtpy" :default-sort="{ prop: 'filePath', order: 'descending' }" @row-click="open"> | 99 | <el-table :data="entries" style="max-width: 1280px; width: 100%" height="100%" empty-text="Folder is emtpy" :default-sort="{ prop: 'filePath', order: 'descending' }" @row-click="open"> |
100 | <el-table-column prop="previewUrl" label="Type" width="100px" sortable> | 100 | <el-table-column prop="previewUrl" label="Type" width="80px" sortable> |
101 | <template slot-scope="scope"> | 101 | <template slot-scope="scope"> |
102 | <el-image v-bind:src="scope.row.previewUrl" class="list-icon" style="width: 32px; height: 32px" fit="cover"></el-image> | 102 | <el-image v-bind:src="scope.row.previewUrl" class="list-icon" style="width: 32px; height: 32px" fit="cover"></el-image> |
103 | </template> | 103 | </template> |
diff --git a/frontend/js/app.js b/frontend/js/app.js index 9ce073e..f532bc1 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js | |||
@@ -150,7 +150,15 @@ function open(row, column, event) { | |||
150 | app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath)); | 150 | app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath)); |
151 | app.previewDrawerVisible = true | 151 | app.previewDrawerVisible = true |
152 | 152 | ||
153 | // window.open(encode(path)); | 153 | // need to wait for DOM element to exist |
154 | setTimeout(function () { | ||
155 | $('iframe').on('load', function (e) { | ||
156 | if (!e.target.contentWindow.document.body) return; | ||
157 | |||
158 | e.target.contentWindow.document.body.style.display = 'flex' | ||
159 | e.target.contentWindow.document.body.style.justifyContent = 'center' | ||
160 | }); | ||
161 | }, 0); | ||
154 | } | 162 | } |
155 | 163 | ||
156 | function uploadFiles(files) { | 164 | function uploadFiles(files) { |