orbitdb-archive / orbit

A distributed, serverless, peer-to-peer chat application on IPFS
MIT License
1.64k stars 116 forks source link

Fix directory view so that html pages can be "run" directly by opening them #125

Closed haadcode closed 7 years ago

haadcode commented 7 years ago

Currently when the user opens a directory which contains an index.html file and opens it, it's opened by the file's hash. It should be opened relative to the directory hash so that the page can be displayed like it would be displayed in the browser.

This means, instead of "open Qm...FileHash (index.html)" should be opened as "open Qm...DirectoryHash/index.html".

haadcode commented 7 years ago

This is now not only fixed but I made it a thing: screen shot 2016-12-07 at 15 40 24

Here you see a directory opened and if it contains index.html, Orbit will display the website in an iframe. In this case, we're opening one of the examples for ipfs-daemon (top) and start and js-ipfs instance inside Orbit. In the lower picture, you can see Orbit, in Orbit 😁 It's the very same UI as what the Electron version runs (basically that's the UI directory from Electron dropped into Orbit).

cc @jbenet, you asked for this.