Skip to content

Commit cca0c16

Browse files
authored
Merge pull request #1378 from nextcloud/dependabot/npm_and_yarn/nextcloud/vue-7.0.0-beta.4
build(deps): bump @nextcloud/vue from 6.0.0-beta.4 to 7.0.0-beta.4
2 parents a021da7 + 3fc1547 commit cca0c16

File tree

12 files changed

+67
-48
lines changed

12 files changed

+67
-48
lines changed

cypress/e2e/single-file-share.cy.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*/
2222

23-
import { randHash } from '../utils/'
23+
import { randHash } from '../utils/index.js'
2424
const randUser = randHash()
2525

2626
describe('See shared folder with link share', function() {
@@ -30,27 +30,32 @@ describe('See shared folder with link share', function() {
3030
before(function() {
3131
cy.nextcloudCreateUser(randUser, 'password')
3232
cy.login(randUser, 'password')
33+
3334
cy.uploadFile('image1.jpg', 'image/jpeg')
3435
cy.uploadFile('video1.mp4', 'video/mp4')
35-
cy.createLinkShare('/image1.jpg').then(token => imageToken = token)
36-
cy.createLinkShare('/video1.mp4').then(token => videoToken = token)
36+
cy.createLinkShare('/image1.jpg').then(token => { imageToken = token })
37+
cy.createLinkShare('/video1.mp4').then(token => { videoToken = token })
38+
3739
cy.logout()
3840
})
3941

40-
41-
it('opens the shared image in the viewer', function() {
42+
it('Opens the shared image in the viewer', function() {
4243
cy.visit(`/s/${imageToken}`)
44+
4345
cy.get('#imgframe img').should('be.visible')
4446
cy.get('#imgframe > #viewer').should('be.visible')
45-
cy.scrollTo('bottom')
47+
48+
cy.scrollTo('bottom', { ensureScrollable: false })
4649
cy.get('a#downloadFile').should('be.visible')
4750
})
4851

49-
it('opens the shared video in the viewer', function() {
52+
it('Opens the shared video in the viewer', function() {
5053
cy.visit(`/s/${videoToken}`)
54+
5155
cy.get('#imgframe .plyr').should('be.visible')
5256
cy.get('#imgframe > #viewer').should('be.visible')
53-
cy.scrollTo('bottom')
57+
58+
cy.scrollTo('bottom', { ensureScrollable: false })
5459
cy.get('a#downloadFile').should('be.visible')
5560
})
5661
})
113 Bytes
Loading
-918 Bytes
Loading
-71 Bytes
Loading
-267 Bytes
Loading

js/viewer-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/viewer-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 38 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "viewer",
33
"description": "Simple file viewer with slideshow for media",
4-
"version": "1.9.0",
4+
"version": "2.0.0",
55
"author": "John Molakvoæ <skjnldsv@protonmail.com>",
66
"contributors": [
77
"John Molakvoæ <skjnldsv@protonmail.com>"
@@ -48,7 +48,7 @@
4848
"@nextcloud/logger": "^2.3.0",
4949
"@nextcloud/paths": "^2.1.0",
5050
"@nextcloud/router": "^2.0.0",
51-
"@nextcloud/vue": "^6.0.0-beta.4",
51+
"@nextcloud/vue": "^7.0.0-beta.4",
5252
"@skjnldsv/vue-plyr": "^7.3.0",
5353
"camelcase": "^7.0.0",
5454
"debounce": "^1.2.1",
@@ -77,7 +77,7 @@
7777
"@nextcloud/stylelint-config": "^2.2.0",
7878
"@nextcloud/webpack-vue-config": "^5.3.0",
7979
"babel-loader-exclude-node-modules-except": "^1.2.1",
80-
"cypress": "^10.6.0",
80+
"cypress": "^10.8.0",
8181
"cypress-visual-regression": "^1.7.0",
8282
"eslint-plugin-cypress": "^2.12.1",
8383
"jest": "^28.1.3",

src/components/Images.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,18 @@ export default {
9494
9595
asyncComputed: {
9696
data() {
97+
if (this.mime === 'image/svg+xml') {
98+
return this.getBase64FromImage()
99+
}
100+
97101
if (this.source) {
98102
return this.source
99103
}
100104
101-
switch (this.mime) {
102-
case 'image/svg+xml':
103-
return this.getBase64FromImage()
104-
case 'image/gif':
105-
return this.davPath
106-
default:
107-
return this.previewpath
105+
if (this.mime === 'image/gif') {
106+
return this.src
108107
}
108+
return this.previewPath
109109
},
110110
},
111111
watch: {
@@ -137,7 +137,7 @@ export default {
137137
* @return {string}
138138
*/
139139
async getBase64FromImage() {
140-
const file = await axios.get(this.davPath)
140+
const file = await axios.get(this.src)
141141
return `data:${this.mime};base64,${btoa(file.data)}`
142142
},
143143

0 commit comments

Comments
 (0)