Working better :)

Former-commit-id: 935ee3c7cceb4deb31965501a80c202a0034da52 [formerly 3a68553e1ac0af9dad51bd2b8eab1152959a4dc2] [formerly 596f9d6676cceafac0e9fe66a9137683482c2685 [formerly 191b31e977]]
Former-commit-id: f0179a58c53f057f1b6f0f19b40fc2308b0edd15 [formerly 5151c85d599e8b3772dabab24973004105c29881]
Former-commit-id: c28c7b95e5ea1b1d9ae2af046f49cc5ffa848385
This commit is contained in:
Henrique Dias
2017-07-03 11:04:14 +01:00
parent 54461e3cd6
commit 8b98abedea
17 changed files with 99 additions and 54 deletions

View File

@@ -12,18 +12,18 @@
</div>
<div class="preview">
<img v-if="req.data.type == 'image'" :src="raw()">
<audio v-else-if="req.data.type == 'audio'" :src="raw()" controls></audio>
<video v-else-if="req.data.type == 'video'" :src="raw()" controls>
<img v-if="req.type == 'image'" :src="raw()">
<audio v-else-if="req.type == 'audio'" :src="raw()" controls></audio>
<video v-else-if="req.type == 'video'" :src="raw()" controls>
Sorry, your browser doesn't support embedded videos,
but don't worry, you can <a href="?download=true">download it</a>
and watch it with your favorite video player!
</video>
<object v-else-if="req.data.extension == '.pdf'" class="pdf" :data="raw()"></object>
<a v-else-if="req.data.type == 'blob'" href="?download=true">
<object v-else-if="req.extension == '.pdf'" class="pdf" :data="raw()"></object>
<a v-else-if="req.type == 'blob'" href="?download=true">
<h2 class="message">Download <i class="material-icons">file_download</i></h2>
</a>
<pre v-else >{{ req.data.content }}</pre>
<pre v-else >{{ req.content }}</pre>
</div>
</div>
</template>
@@ -47,7 +47,7 @@ export default {
computed: mapState(['req']),
methods: {
raw: function () {
return this.req.data.url + '?raw=true'
return this.req.url + '?raw=true'
},
back: function (event) {
let url = page.removeLastDir(window.location.pathname) + '/'