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

Files page remove pin button broken #607

Closed
ku1ik opened this issue Nov 30, 2017 · 14 comments
Closed

Files page remove pin button broken #607

ku1ik opened this issue Nov 30, 2017 · 14 comments

Comments

@ku1ik
Copy link

ku1ik commented Nov 30, 2017

Version information:

go-ipfs version: 0.4.13
Browser: Firefox, Chrome (reproducible on all)

Type: Bug

Severity: Low

Description:

The X remove buttons on the Files page of the web ui are broken. If you click any of them, then the web UI goes to the front page (because the remove button is a link to "#" and the preventDefault() method is never called on the click event object), and this error appears in the console: "TypeError: t.preventDefault is not a function"

(I just copied it from ipfs/kubo#4269 and updated go-ipfs version to the one I use)

@hacdias
Copy link
Member

hacdias commented Nov 30, 2017

Hello @sickill! Thanks for reporting this! 😄 Fortunately, I can tell you that the latest version of WebUI (the one in this repository) doesn't contain this issue anymore. I think this should be closed. /cc @diasdavid

@daviddias
Copy link
Member

@whyrusleeping @lgierth @Kubuxu can we ship the new (fixed) webui with the next release of go-ipfs?

@ghost
Copy link

ghost commented Nov 30, 2017

Sure! Pin it, then update core/corehttp/webui.go

@daviddias
Copy link
Member

@hacdias wanna do the honors? @lgierth can @hacdias have pinbot perms?

@ghost
Copy link

ghost commented Dec 1, 2017

@diasdavid !befriend <nick> pin

@daviddias
Copy link
Member

@lgierth I tried but it didn't work:

image

@daviddias
Copy link
Member

@hacdias you are now a pinbot friend. Wanna update go-ipfs hash?

Also, wanna add this route to js-ipfs daemon?

@hacdias
Copy link
Member

hacdias commented Dec 2, 2017

@diasdavid

@hacdias you are now a pinbot friend. Wanna update go-ipfs hash?

Sure, but how? I know I have to pin an hash with a name. The name is go-ipfs, right? But what will be the hash in this case?

Also, wanna add this route to js-ipfs daemon?

Yes, but where? I'm not yet familiarized with everything 😛

@daviddias
Copy link
Member

For go-ipfs

@hacdias on the root of this repo do npm run build (see https://github.com/ipfs/webui#building) that will create a folder. Then do ipfs add -r dist and make sure your daemon is on.

With your daemon on go to pinbot and do !pin <the hash you got from ipfs add -r> webui

Once that is finished, you can now submit a PR to https://github.com/ipfs/go-ipfs/blob/master/core/corehttp/webui.go

For js-ipfs

Add a route here for /webui https://github.com/ipfs/js-ipfs/blob/master/src/http/gateway/routes/gateway.js

@hacdias
Copy link
Member

hacdias commented Dec 2, 2017

For go-ipfs

Done! ipfs/kubo#4449

For js-ipfs

I'll see that later hopefully 😄

@hacdias
Copy link
Member

hacdias commented Dec 2, 2017

@diasdavid, adding a route for /webui on gateway.js won't work since /webui tries to connect to the API in that same domain in that same port. It tries to connect to the API on 127.0.0.1:9090 instead of 127.0.0.1:5002.

The same happens with go-ipfs, but go-ipfs has /webui also available on :5001 so it works. Am I doing something wrong?

@daviddias
Copy link
Member

@hacdias you got it right. You should indeed create that endpoint on the API which is on the folder next to the gateway -> https://github.com/ipfs/js-ipfs/tree/master/src/http/api

@hacdias
Copy link
Member

hacdias commented Dec 2, 2017

@diasdavid done: ipfs/js-ipfs#1124 🎈

@daviddias
Copy link
Member

Thank you @hacdias ! :D Closing this issue then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants