Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
remko48 committed Jan 27, 2025
1 parent fad234b commit a5284d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/object/ObjectDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,14 @@ export default {
openFolder(url) {
// Parse the encoded URL by replacing escaped characters
const decodedUrl = url.replace(/\\\//g, '/')
// Ensure URL starts with forward slash
const normalizedUrl = decodedUrl.startsWith('/') ? decodedUrl : '/' + decodedUrl
// Construct the proper Nextcloud Files app URL with the normalized path
// Use window.location.origin to get the current domain instead of hardcoding
const nextcloudUrl = `${window.location.origin}/index.php/apps/files/files?dir=${encodeURIComponent(normalizedUrl)}`
// Open URL in new tab
window.open(nextcloudUrl, '_blank')
},
Expand Down

0 comments on commit a5284d4

Please sign in to comment.