feat: add identity and feed management (#272)
* feat(wip): add basic feed operations * ci: bump checks * ci: bump checks * feat: rework stamps and add feed functionalities * refactor: polish and fixes * feat(wip): add formulas * feat: show bzz.link for websites * feat: add stamp empty states and formatBzz * feat: add feed download * chore: update manifest-js version * feat: dev mode support with bee-js 3.1.0 (#273) * feat: dev mode support with bee-js 3.1.0 * fix: added missing package-lock.json file * build: remove PR preview * style: work on design * feat: add TroubleshootConnectionCard * build: remove depcheck Co-authored-by: Attila Gazso <agazso@gmail.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import { Box, Typography } from '@material-ui/core'
|
||||
import { ReactElement, useState } from 'react'
|
||||
import { Check, X } from 'react-feather'
|
||||
import ExpandableListItemActions from '../../components/ExpandableListItemActions'
|
||||
import { SwarmButton } from '../../components/SwarmButton'
|
||||
import { SwarmDialog } from '../../components/SwarmDialog'
|
||||
import { SwarmTextInput } from '../../components/SwarmTextInput'
|
||||
import { TitleWithClose } from '../../components/TitleWithClose'
|
||||
|
||||
interface Props {
|
||||
feedName: string
|
||||
onProceed: (password: string) => void
|
||||
onCancel: () => void
|
||||
loading: boolean
|
||||
}
|
||||
|
||||
export function FeedPasswordDialog({ feedName, onProceed, onCancel, loading }: Props): ReactElement {
|
||||
const [password, setPassword] = useState('')
|
||||
|
||||
function onProceedClick() {
|
||||
return onProceed(password)
|
||||
}
|
||||
|
||||
return (
|
||||
<SwarmDialog>
|
||||
<Box mb={4}>
|
||||
<TitleWithClose onClose={onCancel}>Update Feed</TitleWithClose>
|
||||
</Box>
|
||||
<Box mb={2}>
|
||||
<Typography>Please enter the password for “{feedName}”:</Typography>
|
||||
</Box>
|
||||
<Box mb={4}>
|
||||
<SwarmTextInput
|
||||
label="Password"
|
||||
name="password"
|
||||
onChange={event => {
|
||||
setPassword(event.target.value)
|
||||
}}
|
||||
password
|
||||
/>
|
||||
</Box>
|
||||
<ExpandableListItemActions>
|
||||
<SwarmButton iconType={Check} onClick={onProceedClick} disabled={loading} loading={loading}>
|
||||
Proceed
|
||||
</SwarmButton>
|
||||
<SwarmButton iconType={X} onClick={onCancel} cancel disabled={loading}>
|
||||
Cancel
|
||||
</SwarmButton>
|
||||
</ExpandableListItemActions>
|
||||
</SwarmDialog>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user