Commit 6cd2cd20 authored by jnbhm's avatar jnbhm
Browse files

Added preview for image and video

parent b7549033
Pipeline #112371 passed with stage
in 11 seconds
......@@ -17,8 +17,22 @@
.q-pa-sm.meida-item.custom-hover(v-if="prop.node.size" @click.native="cacheNewCell(prop.node)")
q-icon(:name="prop.node.icon || 'insert_drive_file'" size="24px" class="q-mr-sm")
span.q-pr-md.q-pb-md {{ prop.node.label }}
q-item(v-if="prop.node.metadata['content-type'].slice(0,5) === 'image'" @click.native="cacheNewCell(prop.node)")
img.q-pa-md(:src="getAssetUrl(prop.node)" :alt="prop.node.title")
// Image Preview
q-item(
v-if="prop.node.metadata['content-type'].slice(0,5) === 'image'"
@click.native="cacheNewCell(prop.node)"
)
img.q-pt-sm(:src="getAssetUrl(prop.node)" :alt="prop.node.title")
// Video Preview
q-item(
v-if="prop.node.metadata['content-type'].slice(0,5) === 'video'"
@click.native="cacheNewCell(prop.node)"
)
video.q-pt-sm(
:src="getAssetUrl(prop.node)"
:type="prop.node.metadata['content-type']"
:alt="prop.node.title"
)
.q-pa-sm(v-else)
q-icon(:name="prop.node.icon || 'insert_drive_file'" size="24px" class="q-mr-sm")
span.q-pr-md.q-pb-md {{ prop.node.label }}
......@@ -161,7 +175,7 @@ export default {
</script>
<style lang="stylus" scoped>
img
img, video
max-width 100%
max-height 150px
</style>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment