-
Notifications
You must be signed in to change notification settings - Fork 324
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
feat: support ipfs daemon --offline #936
base: main
Are you sure you want to change the base?
Conversation
…S daemon is running in offline mode
This changes the meaning of offlinePeerCount to be the state when peerCount is 0, and adds explicit apiDownPeerCount equal -1 to indicate state where extension is unable to read peerCount and has to assume API is down.
This way webui is present in local repo, even when no p2p transfer can happen to fetch it
Thank you @BrianBelhumeur! Your comments from #790 (comment) were really useful and prompted me to refactor a few things (added them to this PR):
|
@lidel Thanks for all the help! I looked through the commits you provided... makes sense. Looks like the online/offline issue affects several parts of the code. Happy to park until there's a resolution to ipfs/ipfs-webui#853 |
There appear to be quite a few conflicts to getting this merged. I'm not terribly familiar with Javascript, so how bad are these conflicts that we're looking at? I'll just quickly mention that I'll often run IPFS with --offline purely out of paranoia and instead use it as a personal archive, so I'm fairly excited to see this issue resolved. |
IIRC this is blocked by ipfs/ipfs-webui#853 (comment) |
This is a fix for #790
When the IPFS daemon is running in offline mode, pinning should still be enabled in the extension.
This fix functions by replacing
isIpfsOnline
withisApiAvailable
to allow pinning actions in the Tools menu and in-page context menu.