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

update history when opening and closing viewer #488

Closed
wants to merge 1 commit into from

Commits on Apr 30, 2020

  1. 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>
    azul committed Apr 30, 2020
    Configuration menu
    Copy the full SHA
    45a9036 View commit details
    Browse the repository at this point in the history