Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update history when opening and closing viewer
* Add the `openfile` param to the url when opening a file * update the document title from the Mime mixin * push the new url to the browser history * Also update the title and push the url when moving inside a collection * push original url to browser history state when closing the viewer fixes server#12470 Alternatives ------------ We could pop state back to where we started when closing the viewer. That way history would not contain urls for visited files. In particular when navigating through collections I think having a full history may be useful Warning ------- Adds the following warning: ``` /home/next/code/nextcloud/server/apps/viewer/src/mixins/Mime.js 111:20 warning The property or function OC.encodePath was deprecated in Nextcloud 18.0.0 ``` I tried to work around it by using encodePath from https://www.npmjs.com/package/@nextcloud/paths But no external imports are allowed in mixins. Next Steps ---------- * Handle popstate events so we can actually go back in history Signed-off-by: Azul <azul@riseup.net>
- Loading branch information