Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add heic image support #485

Closed
wants to merge 126 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
177072a
Add heic image support
steiny2k Apr 29, 2020
3ae4a68
Add heic image support
steiny2k Apr 29, 2020
678942d
Merge branch 'heic' of github.com:steiny2k/viewer into heic
steiny2k Apr 29, 2020
bd2ede6
Merge branch 'heic' of github.com:steiny2k/viewer into heic
steiny2k Apr 29, 2020
5b69355
Merge branch 'heic' of github.com:steiny2k/viewer into heic
steiny2k Apr 29, 2020
36dcc17
[tx-robot] updated from transifex
nextcloud-bot Apr 30, 2020
ac56fe6
Bump @babel/preset-env from 7.9.5 to 7.9.6
dependabot-preview[bot] May 3, 2020
af71137
Bump vue-loader from 15.9.1 to 15.9.2
dependabot-preview[bot] May 3, 2020
068a172
Bump @babel/core from 7.9.0 to 7.9.6
dependabot-preview[bot] May 3, 2020
7c87656
Merge pull request #491 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv May 3, 2020
af58dc7
Merge pull request #490 from nextcloud/dependabot/npm_and_yarn/vue-lo…
skjnldsv May 3, 2020
bbc674d
Merge pull request #489 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv May 3, 2020
1dd0adf
[tx-robot] updated from transifex
nextcloud-bot May 4, 2020
54389b7
[tx-robot] updated from transifex
nextcloud-bot May 5, 2020
54a3b3f
Update feature_request.md
skjnldsv May 6, 2020
c1502e0
Update version on master
nickvergessen May 7, 2020
41209f9
Merge pull request #493 from nextcloud/update-master-version
skjnldsv May 7, 2020
95cc262
Bump stylelint-scss from 3.17.1 to 3.17.2
dependabot-preview[bot] May 10, 2020
5107533
Bump node-sass from 4.14.0 to 4.14.1
dependabot-preview[bot] May 10, 2020
103d629
Merge pull request #495 from nextcloud/dependabot/npm_and_yarn/stylel…
dependabot-preview[bot] May 10, 2020
a35b911
Merge pull request #496 from nextcloud/dependabot/npm_and_yarn/node-s…
dependabot-preview[bot] May 10, 2020
6795568
[tx-robot] updated from transifex
nextcloud-bot May 10, 2020
c1361bc
Use proper exit code for composer lint
MorrisJobke May 13, 2020
de0057f
Merge pull request #498 from nextcloud/fix/noid/composer-lint-command…
MorrisJobke May 14, 2020
663e8e5
[tx-robot] updated from transifex
nextcloud-bot May 17, 2020
55373b3
[tx-robot] updated from transifex
nextcloud-bot May 24, 2020
96acb8b
Bump @babel/preset-env from 7.9.6 to 7.10.2
dependabot-preview[bot] May 31, 2020
2df8561
Bump @babel/core from 7.9.6 to 7.10.2
dependabot-preview[bot] May 31, 2020
89975a4
Merge pull request #507 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Jun 5, 2020
23167ac
Merge pull request #506 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Jun 5, 2020
be2c62b
Bump @babel/plugin-proposal-class-properties from 7.8.3 to 7.10.1
dependabot-preview[bot] Jun 5, 2020
349cfb6
Merge pull request #505 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Jun 5, 2020
d90ae04
Bump @nextcloud/router from 1.0.2 to 1.1.0
dependabot-preview[bot] Jun 7, 2020
50893b2
Bump css-loader from 3.5.3 to 3.6.0
dependabot-preview[bot] Jun 14, 2020
772aea0
Merge pull request #513 from nextcloud/dependabot/npm_and_yarn/css-lo…
skjnldsv Jun 16, 2020
c17334b
Merge pull request #510 from nextcloud/dependabot/npm_and_yarn/nextcl…
skjnldsv Jun 16, 2020
256a4b7
Bump @nextcloud/auth from 1.2.3 to 1.3.0
dependabot-preview[bot] Jun 16, 2020
014d1b6
Merge pull request #511 from nextcloud/dependabot/npm_and_yarn/nextcl…
skjnldsv Jun 18, 2020
d092805
Bump eslint-plugin-import from 2.20.2 to 2.21.2
dependabot-preview[bot] Jun 18, 2020
7af2df5
[tx-robot] updated from transifex
nextcloud-bot Jun 19, 2020
b7660b7
[tx-robot] updated from transifex
nextcloud-bot Jun 20, 2020
09fe314
Bump eslint-import-resolver-webpack from 0.12.1 to 0.12.2
dependabot-preview[bot] Jun 21, 2020
caa7ba3
Bump webpack-cli from 3.3.11 to 3.3.12
dependabot-preview[bot] Jun 21, 2020
738d0bf
Bump stylelint-scss from 3.17.2 to 3.18.0
dependabot-preview[bot] Jun 21, 2020
580bc76
Bump vue-loader from 15.9.2 to 15.9.3
dependabot-preview[bot] Jun 27, 2020
e215ed0
[tx-robot] updated from transifex
nextcloud-bot Jul 3, 2020
07cd248
Bump @babel/preset-env from 7.10.2 to 7.10.4
dependabot-preview[bot] Jul 4, 2020
2eaf134
Bump sass-loader from 8.0.2 to 9.0.1
dependabot-preview[bot] Jul 4, 2020
1adc603
Bump @babel/plugin-proposal-class-properties from 7.10.1 to 7.10.4
dependabot-preview[bot] Jul 4, 2020
c212cd5
Merge pull request #526 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Jul 7, 2020
4b0c23c
Merge pull request #525 from nextcloud/dependabot/npm_and_yarn/sass-l…
skjnldsv Jul 7, 2020
00ac4ee
Merge pull request #524 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Jul 7, 2020
711c344
Merge pull request #512 from nextcloud/dependabot/npm_and_yarn/eslint…
skjnldsv Jul 7, 2020
f3d8a9a
Merge pull request #521 from nextcloud/dependabot/npm_and_yarn/vue-lo…
skjnldsv Jul 7, 2020
73d8cff
Merge pull request #518 from nextcloud/dependabot/npm_and_yarn/stylel…
skjnldsv Jul 7, 2020
97bc709
Merge pull request #516 from nextcloud/dependabot/npm_and_yarn/webpac…
skjnldsv Jul 7, 2020
d9bab0c
Merge pull request #515 from nextcloud/dependabot/npm_and_yarn/eslint…
skjnldsv Jul 7, 2020
b0ad6dc
Bump @babel/core from 7.10.2 to 7.10.4
dependabot-preview[bot] Jul 7, 2020
c96ef03
Merge pull request #523 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Jul 7, 2020
46e5943
Bump @nextcloud/vue from 1.5.0 to 2.2.0
dependabot-preview[bot] Jul 7, 2020
c9a2570
Merge pull request #527 from nextcloud/dependabot/npm_and_yarn/nextcl…
skjnldsv Jul 7, 2020
e51d988
doc: open function with a destructuring object
azul Jul 8, 2020
f67813a
Merge pull request #528 from nextcloud/doc/api-open-with-object
skjnldsv Jul 8, 2020
e624f20
[tx-robot] updated from transifex
nextcloud-bot Jul 9, 2020
12f88d9
Use IBootstrap for the app bootstrap
MorrisJobke Jul 9, 2020
f23e523
Move to webpack vue global config & bump deps
skjnldsv Jul 12, 2020
4f9a9e8
@nextcloud/[email protected]
skjnldsv Jul 13, 2020
02ab0f8
Add php cs
skjnldsv Jul 13, 2020
2bdf4eb
Merge pull request #537 from nextcloud/enh/use-webpack-global-config
skjnldsv Jul 13, 2020
48ed6fc
Merge branch 'master' into feature/noid/use-ibootstrap-for-application
skjnldsv Jul 13, 2020
205658d
Merge pull request #529 from nextcloud/feature/noid/use-ibootstrap-fo…
skjnldsv Jul 13, 2020
c1a39b6
Bump @nextcloud/webpack-vue-config from 1.0.3 to 1.1.0
dependabot-preview[bot] Jul 18, 2020
fc3984a
Bump @babel/core from 7.10.4 to 7.10.5
dependabot-preview[bot] Jul 18, 2020
7c6dff9
Merge pull request #540 from nextcloud/dependabot/npm_and_yarn/nextcl…
skjnldsv Jul 18, 2020
e293434
Use latest server docker ci
skjnldsv Jul 20, 2020
facb321
Merge pull request #541 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Jul 20, 2020
92e68f7
Fix cypress
skjnldsv Jul 20, 2020
7b47f2f
Merge pull request #544 from nextcloud/fix/cypress
skjnldsv Jul 20, 2020
4b32185
Auto calc img size and center
skjnldsv Jul 20, 2020
689ba4c
Merge pull request #543 from nextcloud/enh/image-auto-ratio
skjnldsv Jul 20, 2020
c9aa09b
Bump webpack from 4.43.0 to 4.44.0
dependabot-preview[bot] Jul 25, 2020
529b0e5
Bump regenerator-runtime from 0.13.5 to 0.13.7
dependabot-preview[bot] Jul 25, 2020
173a115
Merge pull request #550 from nextcloud/dependabot/npm_and_yarn/regene…
skjnldsv Jul 25, 2020
9872375
Merge pull request #548 from nextcloud/dependabot/npm_and_yarn/webpac…
skjnldsv Jul 25, 2020
455c3da
Bump @nextcloud/vue from 2.2.1 to 2.3.0
dependabot-preview[bot] Jul 25, 2020
8eafdca
Merge pull request #549 from nextcloud/dependabot/npm_and_yarn/nextcl…
skjnldsv Jul 25, 2020
7b89fb4
Fix github actions checkout
skjnldsv Jul 27, 2020
b2381d9
Use babel-loader-exclude-node-modules-except
skjnldsv Jul 29, 2020
d4dbf38
Remove unused phpunit
skjnldsv Jul 29, 2020
0a8bf2a
Merge pull request #553 from nextcloud/enh/babel-loader-exclude-node-…
skjnldsv Jul 29, 2020
581f06e
[Security] Bump elliptic from 6.5.2 to 6.5.3
dependabot-preview[bot] Jul 29, 2020
c5218ad
Merge pull request #555 from nextcloud/dependabot/npm_and_yarn/ellipt…
skjnldsv Jul 30, 2020
0d30fc0
Rename BabelLoaderExcludeNodeModulesExcept
skjnldsv Jul 31, 2020
fa9f6ad
Bump @babel/preset-env from 7.10.4 to 7.11.0
dependabot-preview[bot] Aug 1, 2020
7d7c65f
Bump webpack from 4.44.0 to 4.44.1
dependabot-preview[bot] Aug 1, 2020
b0eeff6
Merge pull request #559 from nextcloud/dependabot/npm_and_yarn/babel/…
dependabot-preview[bot] Aug 1, 2020
0b644b5
Bump @babel/core from 7.10.5 to 7.11.0
dependabot-preview[bot] Aug 1, 2020
d45b33d
Merge pull request #561 from nextcloud/dependabot/npm_and_yarn/webpac…
dependabot-preview[bot] Aug 1, 2020
316496d
Merge pull request #560 from nextcloud/dependabot/npm_and_yarn/babel/…
dependabot-preview[bot] Aug 1, 2020
bcf6f74
add onPrev, onNext, and onClose callbacks
azul May 11, 2020
d2ee1fa
Merge pull request #497 from azul/callbacks
skjnldsv Aug 2, 2020
65c06c4
Fix zoom
skjnldsv Jul 20, 2020
34499eb
Merge pull request #546 from nextcloud/fix/zoom
skjnldsv Aug 2, 2020
61b35e1
minor: fix fileList default
azul Aug 7, 2020
80f2b6f
Merge pull request #563 from azul/fix-filelist-default
skjnldsv Aug 7, 2020
e664c65
Bump @babel/core from 7.11.0 to 7.11.1
dependabot-preview[bot] Aug 8, 2020
9a08154
Bump webpack-merge from 5.0.9 to 5.1.1
dependabot-preview[bot] Aug 8, 2020
196ab65
Merge pull request #565 from nextcloud/dependabot/npm_and_yarn/webpac…
dependabot-preview[bot] Aug 8, 2020
bfdeb73
Merge pull request #564 from nextcloud/dependabot/npm_and_yarn/babel/…
skjnldsv Aug 8, 2020
5fd0656
Add PHP doc for event
MorrisJobke Aug 10, 2020
464369e
Merge pull request #566 from nextcloud/enh/noid/phpdoc-for-events
skjnldsv Aug 10, 2020
54e2944
Bump vue-async-computed from 3.8.2 to 3.8.3
dependabot-preview[bot] Aug 15, 2020
15012a4
Merge pull request #568 from nextcloud/dependabot/npm_and_yarn/vue-as…
dependabot-preview[bot] Aug 15, 2020
30419f7
Bump @babel/core from 7.11.1 to 7.11.4
dependabot-preview[bot] Aug 22, 2020
12ef817
Bump webpack-merge from 5.1.1 to 5.1.2
dependabot-preview[bot] Aug 22, 2020
4a721c6
Bump vue-async-computed from 3.8.3 to 3.9.0
dependabot-preview[bot] Aug 22, 2020
e867093
Merge pull request #572 from nextcloud/dependabot/npm_and_yarn/babel/…
dependabot-preview[bot] Aug 22, 2020
36795f9
Merge pull request #573 from nextcloud/dependabot/npm_and_yarn/webpac…
dependabot-preview[bot] Aug 22, 2020
3235b60
Bump @nextcloud/vue from 2.3.0 to 2.6.0
dependabot-preview[bot] Aug 22, 2020
c577368
Merge pull request #574 from nextcloud/dependabot/npm_and_yarn/nextcl…
skjnldsv Aug 22, 2020
1862025
Merge pull request #575 from nextcloud/dependabot/npm_and_yarn/vue-as…
skjnldsv Aug 22, 2020
8ed7820
Bump vue and vue-template-compiler
dependabot-preview[bot] Aug 22, 2020
c770294
Merge pull request #571 from nextcloud/dependabot/npm_and_yarn/vue-an…
skjnldsv Aug 22, 2020
fd380ea
Add heic image support
steiny2k Apr 29, 2020
ad94379
Merge branch 'heic' of github.com:steiny2k/viewer into heic
steiny2k Aug 23, 2020
adcf3af
Webpack changes for HEIC support
steiny2k Aug 23, 2020
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: 0. Needs triage, enhancement
assignees: ''

---
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
APP_NAME: viewer
CYPRESS_baseUrl: http://127.0.0.1:8080/index.php

jobs:
cypress:
Expand Down Expand Up @@ -65,8 +66,13 @@ jobs:
run: |
mkdir data
./occ maintenance:install --verbose --database sqlite --admin-user admin --admin-pass admin
./occ app:enable ${{ env.APP_NAME }}
php -S localhost:8080 &
./occ app:enable $APP_NAME
php -S 0.0.0.0:8080 &

- name: Wait for server
run: |
npm install -g wait-on
wait-on -i 500 -t 240000 $CYPRESS_baseUrl

- name: Cypress run
uses: cypress-io/github-action@v1
Expand All @@ -76,8 +82,5 @@ jobs:
# cypress env
working-directory: apps/${{ env.APP_NAME }}
ci-build-id: ${{ github.sha }}-${{ github.run_number }}
# wait for server before running
wait-on: "http://localhost:8080"
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_baseUrl: http://localhost:8080/index.php
54 changes: 50 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,70 @@ jobs:
- name: Lint
run: composer run lint

php-cs-fixer:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.4']

name: cs php${{ matrix.php-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Install dependencies
run: composer i

- name: Run coding standards check
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

node:
runs-on: ubuntu-latest

strategy:
matrix:
node-versions: [12.x]
node-version: [12.x]

name: node${{ matrix.node-versions }}
name: eslint node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-versions }}
- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-versions: ${{ matrix.node-versions }}
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

stylelint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

name: stylelint node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run stylelint
8 changes: 4 additions & 4 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:

strategy:
matrix:
node-versions: [12.x]
node-version: [12.x]

name: node${{ matrix.node-versions }}
name: node${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-versions }}
- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-versions: ${{ matrix.node-versions }}
node-version: ${{ matrix.node-version }}

- name: Install dependencies & build
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ coverage/

cypress/screenshots
cypress/snapshots
vendor
.php_cs.cache
17 changes: 17 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

require_once './vendor/autoload.php';

use Nextcloud\CodingStandard\Config;

$config = new Config();
$config
->getFinder()
->notPath('build')
->notPath('l10n')
->notPath('src')
->notPath('vendor')
->in(__DIR__);
return $config;
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,24 @@ This will load all the necessary scripts and make the Viewer accessible trough j
### Open a file
1. Open a file and let the viewer fetch the folder data
```js
OCA.Viewer.open('/path/to/file.jpg')
OCA.Viewer.open({path: '/path/to/file.jpg'})
```
2. Open a file and profide a list of files
```js
OCA.Viewer.open('/path/to/file.jpg', [
{
basename: 'file.jpg',
filename: '/path/to/file.jpg',
OCA.Viewer.open({
path: '/path/to/file.jpg',
list: [
{
basename: 'file.jpg',
filename: '/path/to/file.jpg',
...
},
...
},
...
])
],
})
```
The second parametter requires an array of fileinfo. You can check how we generate a fileinfo object [here](https://github.com/nextcloud/viewer/blob/master/src/utils/fileUtils.js#L97) from a dav PROPFIND request data. There is currently no dedicated package for it, but this is coming. You can check the [photos](https://github.com/nextcloud/photos) repository where we also uses it.
The list parameter requires an array of fileinfo. You can check how we generate a fileinfo object [here](https://github.com/nextcloud/viewer/blob/master/src/utils/fileUtils.js#L97) from a dav PROPFIND request data. There is currently no dedicated package for it, but this is coming. You can check the [photos](https://github.com/nextcloud/photos) repository where we also uses it.

### Close the viewer
```js
OCA.Viewer.close()
Expand Down
27 changes: 0 additions & 27 deletions appinfo/app.php

This file was deleted.

4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<name>Viewer</name>
<summary>Simple file viewer with slideshow for media</summary>
<description><![CDATA[Show your latest holiday photos and videos like in the movies, show a glimpse of your latest novel directly from your nextcloud, choose the best GIF of your collection thanks to the direct preview of your favorites files and many more!]]></description>
<version>1.3.0</version>
<version>1.4.0</version>
<licence>agpl</licence>
<author mail="[email protected]">John Molakvoæ</author>
<namespace>Viewer</namespace>
<category>tools</category>
<bugs>https://github.com/nextcloud/viewer</bugs>
<screenshot>https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Viewer/viewer.png</screenshot>
<dependencies>
<nextcloud min-version="19" max-version="19" />
<nextcloud min-version="20" max-version="20" />
</dependencies>
<default_enable />
</info>
23 changes: 13 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "nextcloud/viewer",
"description": "Lint config for nextcloud/viewer",
"license": "MIT",
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
}
"name": "nextcloud/viewer",
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true
},
"scripts": {
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
},
"require-dev": {
"nextcloud/coding-standard": "^0.3.0"
}
}
Loading