From d54290ab3555cc1c0c55d8816f5419bbfadc682f Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Sun, 15 Oct 2023 18:47:21 +0200 Subject: [PATCH 1/2] enhancement: preview image presentation use a more user friendly image preview and take care that images are no longer cropped --- ...enhancement-preview-app-image-presentation | 8 ++ packages/web-app-preview/package.json | 1 + packages/web-app-preview/src/App.vue | 121 ++++++++---------- .../src/components/MediaControls.vue | 5 +- .../src/components/Sources/MediaImage.vue | 64 ++++++++- packages/web-pkg/package.json | 3 +- .../src/services/preview/previewService.ts | 12 +- .../web-pkg/src/services/preview/types.ts | 7 + pnpm-lock.yaml | 22 +++- 9 files changed, 158 insertions(+), 85 deletions(-) create mode 100644 changelog/unreleased/enhancement-preview-app-image-presentation diff --git a/changelog/unreleased/enhancement-preview-app-image-presentation b/changelog/unreleased/enhancement-preview-app-image-presentation new file mode 100644 index 00000000000..dead001dca6 --- /dev/null +++ b/changelog/unreleased/enhancement-preview-app-image-presentation @@ -0,0 +1,8 @@ +Enhancement: Preview image presentation + +We've updated the preview app to have a more user friendly image browsing experience, +image zooming, rotation and movement is smoother, images are no longer cropped. + +https://github.com/owncloud/web/pull/9806 +https://github.com/owncloud/ocis/pull/7409 +https://github.com/owncloud/web/issues/7728 diff --git a/packages/web-app-preview/package.json b/packages/web-app-preview/package.json index 0c6344515bf..b2ef627e9ad 100644 --- a/packages/web-app-preview/package.json +++ b/packages/web-app-preview/package.json @@ -5,6 +5,7 @@ "description": "ownCloud Web Preview", "license": "AGPL-3.0", "devDependencies": { + "@panzoom/panzoom": "^4.5.1", "web-test-helpers": "workspace:*" }, "peerDependencies": { diff --git a/packages/web-app-preview/src/App.vue b/packages/web-app-preview/src/App.vue index 93bb440d21a..94c0f7fb9fe 100644 --- a/packages/web-app-preview/src/App.vue +++ b/packages/web-app-preview/src/App.vue @@ -29,50 +29,49 @@ :accessible-label="$gettext('Failed to load media file')" /> - diff --git a/packages/web-app-preview/src/components/MediaControls.vue b/packages/web-app-preview/src/components/MediaControls.vue index c69905c50a9..855f74bae22 100644 --- a/packages/web-app-preview/src/components/MediaControls.vue +++ b/packages/web-app-preview/src/components/MediaControls.vue @@ -1,8 +1,5 @@