fix: update documentation message for file access clarification (#221)
* fix: update documentation message for file access clarification * fix(ui): upload message only for upload
This commit is contained in:
committed by
Bálint Ujvári
parent
fa8a26e80d
commit
ae63615c7c
@@ -20,11 +20,7 @@ export function AssetSummary({ reference }: Props): ReactElement {
|
||||
{isHash && <ExpandableListItemKey label="Swarm hash" value={reference || ''} />}
|
||||
{!isHash && <ExpandableListItemLink label="ENS" value={reference || ''} />}
|
||||
</Box>
|
||||
<DocumentationText>
|
||||
The Swarm Gateway is graciously provided by the Swarm Foundation. This service is under development and provided
|
||||
for testing purposes only. Learn more at{' '}
|
||||
<a href="https://gateway.ethswarm.org/">https://gateway.ethswarm.org/</a>.
|
||||
</DocumentationText>
|
||||
<DocumentationText>Files are accessed through your configured Bee API endpoint.</DocumentationText>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { saveAs } from 'file-saver'
|
||||
import JSZip from 'jszip'
|
||||
import { useSnackbar } from 'notistack'
|
||||
import { ReactElement, useContext, useEffect, useRef, useState } from 'react'
|
||||
import { useNavigate, useParams } from 'react-router-dom'
|
||||
import { useLocation, useNavigate, useParams } from 'react-router-dom'
|
||||
|
||||
import { HistoryHeader } from '../../components/HistoryHeader'
|
||||
import { Loading } from '../../components/Loading'
|
||||
@@ -26,6 +26,8 @@ export function Share(): ReactElement {
|
||||
const { status } = useContext(BeeContext)
|
||||
|
||||
const { hash } = useParams()
|
||||
const location = useLocation()
|
||||
const fromUpload = Boolean(location.state?.fromUpload)
|
||||
|
||||
const navigate = useNavigate()
|
||||
const { enqueueSnackbar } = useSnackbar()
|
||||
@@ -239,9 +241,11 @@ export function Share(): ReactElement {
|
||||
<Box mb={4}>
|
||||
<AssetSummary isWebsite={metadata?.isWebsite} reference={hash} />
|
||||
</Box>
|
||||
{fromUpload && (
|
||||
<Box mb={4}>
|
||||
<AssetSyncing reference={hash} />
|
||||
</Box>
|
||||
)}
|
||||
<DownloadActionBar
|
||||
onOpen={onOpen}
|
||||
onCancel={onClose}
|
||||
|
||||
@@ -120,7 +120,7 @@ export function Upload(): ReactElement {
|
||||
putHistory(LocalStorageKeys.uploadHistory, hash.reference.toHex(), getAssetNameFromFiles(files))
|
||||
|
||||
if (uploadOrigin.origin === FileOrigin.Upload) {
|
||||
navigate(ROUTES.HASH.replace(':hash', hash.reference.toHex()), { replace: true })
|
||||
navigate(ROUTES.HASH.replace(':hash', hash.reference.toHex()), { replace: true, state: { fromUpload: true } })
|
||||
} else {
|
||||
updateFeed(beeApi, identity as Identity, hash.reference, stamp.batchID, password as string).then(() => {
|
||||
persistIdentity(identities, identity as Identity)
|
||||
|
||||
Reference in New Issue
Block a user