Skip to content

Commit 40085bd

Browse files
committed
fix: refine wording in ui for data and cid
1 parent b01db3a commit 40085bd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

web/script.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,28 +150,28 @@ function formatMaddrOutput (multiaddr, respObj) {
150150
// Bitswap
151151
if (respObj.DataAvailableOverBitswap?.Enabled === true) {
152152
if (respObj.DataAvailableOverBitswap?.Error !== "") {
153-
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>There was an error downloading the CID from the peer via Bitswap: <span class='font-mono'>${respObj.DataAvailableOverBitswap.Error}</span></span></div>`
153+
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>There was an error downloading the data for the CID from the peer via Bitswap: <span class='font-mono'>${respObj.DataAvailableOverBitswap.Error}</span></span></div>`
154154
} else if (respObj.DataAvailableOverBitswap?.Responded !== true) {
155-
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>The peer did not quickly respond if it had the CID over Bitswap</span></div>`
155+
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>The peer did not quickly respond if it had the data for the CID over Bitswap</span></div>`
156156
} else if (respObj.DataAvailableOverBitswap?.Found === true) {
157-
outHtml += `<div class='bg-green-100 border-l-4 border-green-500 text-green-700 p-4 rounded flex items-center'>${iconCheck}<span>The peer responded that it has the CID over Bitswap</span></div>`
157+
outHtml += `<div class='bg-green-100 border-l-4 border-green-500 text-green-700 p-4 rounded flex items-center'>${iconCheck}<span>The peer responded that it has the data for the CID over Bitswap</span></div>`
158158
} else {
159-
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>The peer responded that it does not have the CID over Bitswap</span></div>`
159+
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>The peer responded that it does not have the data for the CID over Bitswap</span></div>`
160160
}
161161
}
162162

163163
// HTTP
164164
if (respObj.DataAvailableOverHTTP?.Enabled === true) {
165165
if (respObj.DataAvailableOverHTTP?.Error !== "") {
166-
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>There was an error downloading the CID via HTTP: <span class='font-mono'>${respObj.DataAvailableOverHTTP.Error}</span></span></div>`
166+
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>There was an error downloading the data for the CID via HTTP: <span class='font-mono'>${respObj.DataAvailableOverHTTP.Error}</span></span></div>`
167167
}
168168

169169
if (respObj.DataAvailableOverHTTP?.Connected !== true) {
170170
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>HTTP connection was unsuccessful to the HTTP endpoint</span></div>`
171171
} else if (respObj.DataAvailableOverHTTP?.Found === true) {
172-
outHtml += `<div class='bg-green-100 border-l-4 border-green-500 text-green-700 p-4 rounded flex items-center'>${iconCheck}<span>The HTTP endpoint responded that it has the CID</span></div>`
172+
outHtml += `<div class='bg-green-100 border-l-4 border-green-500 text-green-700 p-4 rounded flex items-center'>${iconCheck}<span>The HTTP endpoint responded that it has the data for the CID</span></div>`
173173
} else {
174-
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>The HTTP endpoint responded that it does not have the CID</span></div>`
174+
outHtml += `<div class='bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded flex items-center'>${iconCross}<span>The HTTP endpoint responded that it does not have the data for the CID</span></div>`
175175
}
176176
}
177177
outHtml += '</div>'

0 commit comments

Comments
 (0)