Conversation
Copilot
AI
changed the title
[WIP] Integrate photophere viewer app into Nextcloud viewer
feat: integrate photosphere viewer with Nextcloud Viewer app (OCA.Viewer)
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The app previously rendered photosphere images in a custom full-page iframe overlay. This integrates it into the Nextcloud universal Viewer app (
OCA.Viewer) so photospheres open inside the standard viewer modal.New: Vue component + viewer handler registration
src/components/PhotoSphereViewer.vue— Vue 3 component wrapping@photo-sphere-viewer/coredirectly (no iframe). Reads XMP metadata (cropping config etc.) from thefiles-photospheres-xmp-metadataDAV attribute already present on the file Node, and renders the panorama into an inline<div>.src/viewerHandler.js— Registers the component withOCA.Vieweron load:canHandleFileensures regular JPEGs fall through to the default image viewer — only files carrying photosphere XMP metadata are intercepted.Modified: fileAction.js delegate to OCA.Viewer
_actionHandlernow callsOCA.Viewer.open({ path, fileInfo })whenOCA.Vieweris present, which triggers the registered component above. The iframe path is retained as a fallback for environments where the viewer app is absent.Build / PHP wiring
webpack.js: addedvue-loaderrule +VueLoaderPlugin;viewerHandleradded as an entry point.AddScriptsAndStylesListener.php: loadsviewerHandlerafter the viewer app (same dependency ordering asfileAction).package.json:vue-loader ^17as devDependency.viewerHandleris also enqueued.