catena icon indicating copy to clipboard operation
catena copied to clipboard

Support routing in the web client

Open pixelspark opened this issue 8 years ago • 2 comments

Allow specific pages to be selected using URL routing:

  • /welcome
  • /data/[db]/[q]
  • /blocks/[blockid]
  • /identity/[pubhash]

Use window.history.pushState.

pixelspark avatar Dec 04 '17 08:12 pixelspark

Needs a global routing or state object from which current selections etc. are loaded. The object should also support updating, e.g.

{
mainTab: "identities",
selectMainTab(name) { this.$set('mainTab', name); updateURL(); }
updateURL() { window.location.hash = mainTab+"/"+... }
}

pixelspark avatar Dec 04 '17 20:12 pixelspark

Implemented for tabs, can be extended to reach within tabs. At some point we should switch to using e.g. vue-router.

pixelspark avatar Dec 07 '17 10:12 pixelspark