Merge pull request #1124 from ramiresviana/fixes-4

This commit is contained in:
Oleg Lobanov 2020-10-21 16:37:39 +02:00 committed by GitHub
commit c9b36ba32e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -35,6 +35,7 @@ var (
func init() {
cobra.OnInitialize(initConfig)
cobra.MousetrapHelpText = ""
rootCmd.SetVersionTemplate("File Browser version {{printf \"%s\" .Version}}\n")

View File

@ -16,6 +16,11 @@ export default async function search (base, query) {
data = data.map((item) => {
item.url = `/files${base}` + url.encodePath(item.path)
if (item.dir) {
item.url += '/'
}
return item
})

View File

@ -368,7 +368,7 @@ export default {
}
let files = await upload.scanFiles(dt)
let path = this.$route.path + base
let path = this.$route.path.endsWith('/') ? this.$route.path + base : this.$route.path + '/' + base
let items = this.req.items
if (base !== '') {
@ -409,7 +409,7 @@ export default {
}
}
let path = this.$route.path
let path = this.$route.path.endsWith('/') ? this.$route.path : this.$route.path + '/'
let conflict = upload.checkConflict(files, this.req.items)
if (conflict) {

View File

@ -52,7 +52,7 @@
but don't worry, you can <a :href="download">download it</a>
and watch it with your favorite video player!
</video>
<object v-else-if="req.extension == '.pdf'" class="pdf" :data="raw"></object>
<object v-else-if="req.extension.toLowerCase() == '.pdf'" class="pdf" :data="raw"></object>
<a v-else-if="req.type == 'blob'" :href="download">
<h2 class="message">{{ $t('buttons.download') }} <i class="material-icons">file_download</i></h2>
</a>