cyclosproject / cyclos4-ui

A modern, simple and intuitive frontend for users of Cyclos
MIT License
43 stars 33 forks source link

Implement a path to redirect from a location #377

Closed luisfpg closed 4 years ago

luisfpg commented 4 years ago

Cyclos generates server-side links to locations. We should implement a URL handling such as /redirect/:location?id=value, which correctly redirects to the correct page. Currently the logic for notifications (which is the same idea) is in ApiHelper.notificationData(notification). The component that will implement the URL should call that method, or that method to resolve to the final URL, then call router.navigateByUrl(). Don't forget to replace the history instead of pushing to it. Also, we need to update the script https://github.com/cyclosproject/cyclos4-ui#generating-links-on-the-cyclos-backend-that-point-to-the-frontend to also include a case for LinkType.NOTIFICATION.