mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 16:32:15 +00:00
added prettier
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
<template>
|
||||
<div class="h-screen flex justify-center items-center">
|
||||
<div class="flex h-screen items-center justify-center">
|
||||
<div>
|
||||
<ItemGrid
|
||||
v-if="sharedFile"
|
||||
:entry="sharedFile"
|
||||
:highlight="true"
|
||||
:mobile-handler="true"
|
||||
/>
|
||||
<ItemGrid v-if="sharedFile" :entry="sharedFile" :highlight="true" :mobile-handler="true" />
|
||||
|
||||
<ButtonBase @click.native="download" button-style="theme">
|
||||
{{ $t('page_shared.download_file') }}
|
||||
@@ -16,35 +11,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ButtonBase from "../../components/FilesView/ButtonBase";
|
||||
import ItemGrid from "../../components/FilesView/ItemGrid"
|
||||
import {mapGetters} from "vuex"
|
||||
import ButtonBase from '../../components/FilesView/ButtonBase'
|
||||
import ItemGrid from '../../components/FilesView/ItemGrid'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'SharedSingleItem',
|
||||
components: {
|
||||
ButtonBase,
|
||||
ItemGrid,
|
||||
export default {
|
||||
name: 'SharedSingleItem',
|
||||
components: {
|
||||
ButtonBase,
|
||||
ItemGrid,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['sharedDetail', 'sharedFile']),
|
||||
},
|
||||
methods: {
|
||||
download() {
|
||||
this.$downloadFile(this.sharedFile.data.attributes.file_url, this.sharedFile.data.attributes.name + '.' + this.sharedFile.data.attributes.mimetype)
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sharedDetail',
|
||||
'sharedFile',
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
download() {
|
||||
this.$downloadFile(this.sharedFile.data.attributes.file_url, this.sharedFile.data.attributes.name + '.' + this.sharedFile.data.attributes.mimetype)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (!this.sharedDetail) {
|
||||
this.$store.dispatch('getShareDetail', this.$route.params.token).then(() => {
|
||||
this.$store.dispatch('getSingleFile')
|
||||
})
|
||||
} else {
|
||||
},
|
||||
mounted() {
|
||||
if (!this.sharedDetail) {
|
||||
this.$store.dispatch('getShareDetail', this.$route.params.token).then(() => {
|
||||
this.$store.dispatch('getSingleFile')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$store.dispatch('getSingleFile')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user