Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions LICENSES/LicenseRef-NextcloudTrademarks.txt
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
The Nextcloud marks
Nextcloud and the Nextcloud logo is a registered trademark of Nextcloud GmbH in Germany and/or other countries.
These guidelines cover the following marks pertaining both to the product names and the logo: “Nextcloud”
and the blue/white cloud logo with or without the word Nextcloud; the service “Nextcloud Enterprise”;
and our products: “Nextcloud Files”; “Nextcloud Groupware” and “Nextcloud Talk”.
This set of marks is collectively referred to as the “Nextcloud marks.”

Use of Nextcloud logos and other marks is only permitted under the guidelines provided by the Nextcloud GmbH.
A copy can be found at https://nextcloud.com/trademarks/
17 changes: 0 additions & 17 deletions LICENSES/LicenseRef-Unsplash.txt
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
License

Unsplash visuals are made to be used freely. Our license reflects that.

* All images can be downloaded and used for free
* Commercial and non-commercial purposes
* No permission needed (though attribution is appreciated!)

What is not permitted 👎

* Images cannot be sold without significant modification.
* Compiling images from Unsplash to replicate a similar or competing service.


Longform

Unsplash grants you an irrevocable, nonexclusive, worldwide copyright license to download, copy, modify, distribute, perform, and use images from Unsplash for free, including for commercial purposes, without permission from or attributing the photographer or Unsplash. This license does not include the right to compile images from Unsplash to replicate a similar or competing service.
15 changes: 12 additions & 3 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/viewer-main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* extracted by css-entry-points-plugin */
@import './main-CvEdi1qV.chunk.css';
@import './main-D70yuWu9.chunk.css';
@import './viewerAction-60RCWKf0.chunk.css';
2 changes: 1 addition & 1 deletion js/viewer-init.mjs.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/viewer-main.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.mjs.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/services/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ export default class Viewer {
} else {
this._state.fileInfo = fileInfo
}

if (!this._state.el) {
this._state.files = list
this._state.enableSidebar = enableSidebar
Expand Down
15 changes: 15 additions & 0 deletions src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@ export default defineComponent({
return true
}

if (path === this.currentFile.filename) {
// if the path is the same as the current file, we can assume it's the same file
return true
}

if (
fileInfo && fileInfo.fileid === this.currentFile.fileid
&& fileInfo.mtime && fileInfo.mtime === this.currentFile.mtime
Expand Down Expand Up @@ -478,12 +483,18 @@ export default defineComponent({
},

files(fileList) {
if (!fileList || !Array.isArray(fileList) || fileList.length === 0) {
logger.warn('No files provided, skipping update')
return
}

// the files list changed, let's update the current opened index
const currentIndex = fileList.findIndex(file => file.filename === this.currentFile.filename)
if (currentIndex > -1) {
this.currentIndex = currentIndex
logger.debug('The files list changed, new current file index is ' + currentIndex)
}

// finally replace the fileList
this.fileList = fileList
},
Expand Down Expand Up @@ -619,6 +630,7 @@ export default defineComponent({

// do not open the same file again
if (this.isSameFile(null, path)) {
logger.debug('Viewer already opened with the same path, ignoring', { path })
return
}

Expand Down Expand Up @@ -673,6 +685,7 @@ export default defineComponent({

// do not open the same file info again
if (this.isSameFile(fileInfo)) {
logger.debug('Viewer already opened with the same fileInfo, ignoring', { fileInfo })
return
}

Expand Down Expand Up @@ -969,6 +982,8 @@ export default defineComponent({
},

cleanup() {
logger.info('Cleaning up viewer')

// reset all properties
this.currentFile = {}
this.comparisonFile = null
Expand Down
Loading