Skip to content

Commit f8ac305

Browse files
authored
fix(ui): replace IPFS API with Kubo RPC (#2267)
This aims to finish our UX migration from "ipfs daemon" being IPFS, and making it explicitly clear that there is no "IPFS API", but we use "Kubo daemon" and "Kubo RPC API". Many users are not aware that 99% of their interactions with IPFS depend on Kubo, and if things go wrong, they are not sure what "Kubo RPC" is. This PR replaces "IPFS API" with "Kubo RPC" to make it more clear what components are at play, and what terms to use when looking for help.
1 parent cfaf534 commit f8ac305

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

cors-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ set -e
88
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[$ALLOW_ORIGINS]"
99
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
1010

11-
echo "IPFS API CORS headers configured for $ALLOW_ORIGINS"
11+
echo "Kubo RPC CORS headers configured for $ALLOW_ORIGINS"
1212
echo "Please restart your IPFS daemon"

public/locales/en/app.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"done": "Done"
3535
},
3636
"cliModal": {
37-
"description": "Paste the following into your terminal to do this task in IPFS via the command line. Remember that you'll need to replace placeholders with your specific parameters."
37+
"description": "Paste the following into your terminal to do this task in Kubo via the command line. Remember that you'll need to replace placeholders with your specific parameters."
3838
},
3939
"nav": {
4040
"bugsLink": "Report a bug",
@@ -43,7 +43,7 @@
4343
"status": {
4444
"connectedToIpfs": "Connected to IPFS",
4545
"connectingToIpfs": "Connecting to IPFS…",
46-
"couldNotConnect": "Could not connect to the IPFS API"
46+
"couldNotConnect": "Could not connect to the Kubo RPC"
4747
},
4848
"apiAddressForm": {
4949
"placeholder": "Enter a URL (http://127.0.0.1:5001) or a Multiaddr (/ip4/127.0.0.1/tcp/5001)"
@@ -60,7 +60,7 @@
6060
"advanced": "Advanced",
6161
"agent": "Agent",
6262
"api": "Kubo RPC",
63-
"apiAddress": "RPC API address",
63+
"apiAddress": "Kubo RPC API address",
6464
"blocks": "Blocks",
6565
"connection": "Connection",
6666
"downSpeed": "Incoming",

public/locales/en/notify.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"ipfsApiRequestFailed": "Could not connect. Please check if your daemon is running.",
33
"windowIpfsRequestFailed": "IPFS request failed. Please check your IPFS Companion settings.",
4-
"ipfsInvalidApiAddress": "The provided IPFS API address is invalid.",
5-
"ipfsConnectSuccess": "Successfully connected to the IPFS API address",
6-
"ipfsConnectFail": "Unable to connect to the provided IPFS API address",
4+
"ipfsInvalidApiAddress": "The provided Kubo RPC address is invalid.",
5+
"ipfsConnectSuccess": "Successfully connected to the Kubo RPC address",
6+
"ipfsConnectFail": "Unable to connect to the provided Kubo RPC address",
77
"ipfsPinFailReason": "Unable to set pinning at {serviceName}: {errorMsg}",
88
"ipfsPinSucceedReason": "Successfully pinned at {serviceName}",
99
"ipfsUnpinSucceedReason": "Successfully unpinned from {serviceName}",

public/locales/en/status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"step2": {
2626
"title": "Connection status",
27-
"paragraph1": "Click this icon from anywhere in the app to return to the Status page. If you lose your connection to the IPFS API, the icon will turn red.",
27+
"paragraph1": "Click this icon from anywhere in the app to return to the Status page. If you lose your connection to the Kubo RPC, the icon will turn red.",
2828
"paragraph2": "If you need to configure a custom API address for your node, just click the \"Edit\" link next to where the API address is listed on this page."
2929
},
3030
"step3": {

public/locales/en/welcome.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
},
77
"notConnected": {
88
"paragraph1": "<0>Check out the installation guide in the <1>IPFS Docs</1>, or try these common fixes:</0>",
9-
"paragraph2": "<0>Is your IPFS daemon running? Try starting or restarting it from your terminal:</0>",
10-
"paragraph3": "<0>Is your IPFS API configured to allow <1>cross-origin (CORS) requests</1>? If not, run these commands and then start your daemon from the terminal:</0>",
11-
"paragraph4": "<0>Is your IPFS API on a port other than 5001? If your node is configured with a <1>custom API address</1>, enter it here.</0>"
9+
"paragraph2": "<0>Is your IPFS daemon running? Try starting or restarting Kubo from your terminal:</0>",
10+
"paragraph3": "<0>Is your Kubo RPC API configured to allow <1>cross-origin (CORS) requests</1>? If not, run these commands and then start your daemon from the terminal:</0>",
11+
"paragraph4": "<0>Is your Kubo RPC API on a port other than 5001? If your node is configured with a <1>custom API address</1>, enter it here.</0>"
1212
},
1313
"aboutIpfs": {
1414
"header": "What is IPFS?",
@@ -31,7 +31,7 @@
3131
"step1": {
3232
"title": "Welcome page",
3333
"paragraph1": "This page lets you know if you're connected to IPFS, and offers ideas for things you can do in this app.",
34-
"paragraph2": "If you aren't connected to the IPFS API, this page also appears in place of some other pages, with hints for how to get connected.",
34+
"paragraph2": "If you aren't connected to the Kubo RPC API, this page also appears in place of some other pages, with hints for how to get connected.",
3535
"paragraph3": "You can visit this page from anywhere in the app by clicking the IPFS cube logo in the navigation bar."
3636
}
3737
}

src/bundles/ipfs-provider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ const actions = {
412412
})
413413

414414
if (!result) {
415-
throw Error(`Could not connect to the IPFS API (${apiAddress})`)
415+
throw Error(`Could not connect to the Kubo RPC (${apiAddress})`)
416416
} else {
417417
return result
418418
}
@@ -440,7 +440,7 @@ const actions = {
440440
await writeSetting('ipfsApi', apiAddress)
441441
context.dispatch({ type: ACTIONS.IPFS_API_ADDRESS_UPDATED, payload: apiAddress })
442442

443-
// Sends action to indicate we're going to try to update the IPFS API address.
443+
// Sends action to indicate we're going to try to update the Kubo RPC address.
444444
// There is logic to retry doTryInitIpfs in bundles/retry-init.js, so
445445
// we're triggering the PENDING_FIRST_CONNECTION action here to avoid blocking
446446
// the UI while we automatically retry.

src/components/is-not-connected/IsNotConnected.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ const IsNotConnected = ({ t, apiUrl, connected, sameOrigin, ipfsApiAddress, doUp
2929
</Trans>
3030
<ol className='pl3 pt2'>
3131
<Trans i18nKey='notConnected.paragraph2' t={t}>
32-
<li className='mb3'>Is your IPFS daemon running? Try starting or restarting it from your terminal:</li>
32+
<li className='mb3'>Is your IPFS daemon running? Try starting or restarting Kubo from your terminal:</li>
3333
</Trans>
3434
<Shell title='Any Shell'>
3535
<code className='db'><b className='no-select'>$ </b>ipfs daemon</code>
3636
<code className='db'>Initializing daemon...</code>
37-
<code className='db'>API server listening on /ip4/127.0.0.1/tcp/5001</code>
37+
<code className='db'>RPC API server listening on /ip4/127.0.0.1/tcp/5001</code>
3838
</Shell>
3939
{ !sameOrigin && (
4040
<div>
4141
<Trans i18nKey='notConnected.paragraph3' t={t}>
42-
<li className='mb3 mt4'>Is your IPFS API configured to allow <a className='link blue' href='https://github.com/ipfs/ipfs-webui#configure-kubo-rpc-api-cors-headers'>cross-origin (CORS) requests</a>? If not, run these commands and then start your daemon from the terminal:</li>
42+
<li className='mb3 mt4'>Is your Kubo RPC API configured to allow <a className='link blue' href='https://github.com/ipfs/ipfs-webui#configure-kubo-rpc-api-cors-headers'>cross-origin (CORS) requests</a>? If not, run these commands and then start your daemon from the terminal:</li>
4343
</Trans>
4444
<div className='br1 overflow-hidden'>
4545
<div className='f7 mb0 sans-serif charcoal pv1 pl2 bg-black-20 flex items-center overflow-x-auto'>
@@ -77,7 +77,7 @@ const IsNotConnected = ({ t, apiUrl, connected, sameOrigin, ipfsApiAddress, doUp
7777
</div>
7878
)}
7979
<Trans i18nKey='notConnected.paragraph4' t={t}>
80-
<li className='mt4 mb3'>Is your IPFS API on a port other than 5001? If your node is configured with a <a className='link blue' href='https://github.com/ipfs/kubo/blob/master/docs/config.md#addresses' target='_blank' rel='noopener noreferrer'>custom API address</a>, enter it here.</li>
80+
<li className='mt4 mb3'>Is your Kubo RPC on a port other than 5001? If your node is configured with a <a className='link blue' href='https://github.com/ipfs/kubo/blob/master/docs/config.md#addresses' target='_blank' rel='noopener noreferrer'>custom RPC API address</a>, enter it here.</li>
8181
</Trans>
8282
<ApiAddressForm
8383
t={t}

src/settings/SettingsPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const SettingsPage = ({
4242
<title>{t('title')} | IPFS</title>
4343
</Helmet>
4444

45-
{/* Enable a full screen loader after updating to a new IPFS API address.
45+
{/* Enable a full screen loader after updating to a new Kubo RPC address.
4646
* Will not show on consequent retries after a failure.
4747
*/}
4848
{ ipfsPendingFirstConnection

0 commit comments

Comments
 (0)