diff options
author | Johannes Zellner <johannes@cloudron.io> | 2020-03-03 17:59:17 +0100 |
---|---|---|
committer | Johannes Zellner <johannes@cloudron.io> | 2020-03-03 17:59:17 +0100 |
commit | 2d28c88dd7a6765a6d2ed54758bbb4c3da999331 (patch) | |
tree | 32e7b6f58bc1bdd54aa9b5be6fe8cfb0649bc34c | |
parent | 313dfe99cf8f763b36f333c5072e2430a6b7941f (diff) | |
download | Surfer-2d28c88dd7a6765a6d2ed54758bbb4c3da999331.tar.gz Surfer-2d28c88dd7a6765a6d2ed54758bbb4c3da999331.tar.zst Surfer-2d28c88dd7a6765a6d2ed54758bbb4c3da999331.zip |
Carry over public.html fixes to index.html
-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) { |