bump version to v2.7.0

This commit is contained in:
jmal 2024-03-19 20:20:26 +08:00
parent 2b327b4ed4
commit 41f984ba1f
2 changed files with 6 additions and 2 deletions

View File

@ -19,6 +19,7 @@
<script> <script>
import fileConfig from '@/utils/file-config' import fileConfig from '@/utils/file-config'
import {mapState} from 'vuex' import {mapState} from 'vuex'
import store from '@/store'
export default { export default {
name: "ImageViewer", name: "ImageViewer",
@ -74,7 +75,7 @@ export default {
hide: function (e) { hide: function (e) {
}, },
hidden: function () { hidden: function () {
this.$store.dispatch('updateMessage', { event: 'updateImageViewerStatus' }) store.dispatch('updateMessage', { event: 'updateImageViewerStatus' })
}, },
view: function (e) { view: function (e) {
}, },

View File

@ -21,12 +21,15 @@ export default {
}, },
// 预览文件的url // 预览文件的url
previewUrl: function(username, file, token, shareToken) { previewUrl: function(username, file, token, shareToken) {
let owner let owner = null
if (username !== store.getters.name || localStorage.getItem('mountFileOwner') !== undefined) { if (username !== store.getters.name || localStorage.getItem('mountFileOwner') !== undefined) {
owner = localStorage.getItem('mountFileOwner') owner = localStorage.getItem('mountFileOwner')
} else { } else {
owner = username owner = username
} }
if (owner == null) {
owner = store.getters.name
}
let fileUrl = `${this.baseUrl}/file/${owner}${encodeURI(file.path)}${encodeURI(file.name)}` let fileUrl = `${this.baseUrl}/file/${owner}${encodeURI(file.path)}${encodeURI(file.name)}`
fileUrl = fileUrl.replace(/%5C/g, '/') fileUrl = fileUrl.replace(/%5C/g, '/')
if (token) { if (token) {