-
Notifications
You must be signed in to change notification settings - Fork 5
Fix bug not showing dappIcon #29
Conversation
| switch (app.type) { | ||
| case 'view': { | ||
| const fallbackSrc = | ||
| window.location.protocol === 'file:' ? `dapps/${app.id}/icon.png` : `${dappHost}/dapps/${app.id}/icon.png`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jacogr Can you confirm that we are not using file:// anymore?
In that case I'll just put fallbackSrc = ${dappHost}/dapps/${app.id}/icon.png
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using it for Electron. (WIP, will become important going forward)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK so I'll leave it like this
| case 'builtin': | ||
| case 'network': | ||
| default: | ||
| imageSrc = app.image; // TODO: should be `${UI_URL}${app.image}` where UI_URL=http://localhost:8180 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see parity_dappsUrl and parity_wsUrl, but no parity_uiUrl. I left it like this (app.image is something like /api/content/{hash}/icon.png), and it works fine. But the ideal scenario would be to use UI_URL given by the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI url is always window.location.host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a dapp, window.location.host give localhost:3001, and window.parent.location.host is inaccessible
Uh oh!
There was an error while loading. Please reload this page.