Skip to content

Commit

Permalink
Merge pull request #68 from jamebal/master
Browse files Browse the repository at this point in the history
bump version to v2.7.0
  • Loading branch information
jamebal authored Mar 19, 2024
2 parents 2b327b4 + 41f984b commit 7ee64b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/preview/ImageViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<script>
import fileConfig from '@/utils/file-config'
import {mapState} from 'vuex'
import store from '@/store'
export default {
name: "ImageViewer",
Expand Down Expand Up @@ -74,7 +75,7 @@ export default {
hide: function (e) {
},
hidden: function () {
this.$store.dispatch('updateMessage', { event: 'updateImageViewerStatus' })
store.dispatch('updateMessage', { event: 'updateImageViewerStatus' })
},
view: function (e) {
},
Expand Down
5 changes: 4 additions & 1 deletion src/utils/file-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ export default {
},
// 预览文件的url
previewUrl: function(username, file, token, shareToken) {
let owner
let owner = null
if (username !== store.getters.name || localStorage.getItem('mountFileOwner') !== undefined) {
owner = localStorage.getItem('mountFileOwner')
} else {
owner = username
}
if (owner == null) {
owner = store.getters.name
}
let fileUrl = `${this.baseUrl}/file/${owner}${encodeURI(file.path)}${encodeURI(file.name)}`
fileUrl = fileUrl.replace(/%5C/g, '/')
if (token) {
Expand Down

0 comments on commit 7ee64b0

Please sign in to comment.