|
@ -46,13 +46,7 @@ const Address = styled(Box).attrs({ |
|
|
cursor: text; |
|
|
cursor: text; |
|
|
user-select: text; |
|
|
user-select: text; |
|
|
width: 325px; |
|
|
width: 325px; |
|
|
` |
|
|
text-align: center; |
|
|
|
|
|
|
|
|
const Ellipsis = styled.span` |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
` |
|
|
` |
|
|
|
|
|
|
|
|
type Props = StepProps & { |
|
|
type Props = StepProps & { |
|
@ -69,7 +63,7 @@ class StepFullFirmwareInstall extends PureComponent<Props, State> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
componentDidMount() { |
|
|
componentDidMount() { |
|
|
this.install() |
|
|
// this.install()
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
componentWillUnmount() { |
|
|
componentWillUnmount() { |
|
@ -123,6 +117,18 @@ class StepFullFirmwareInstall extends PureComponent<Props, State> { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
formatHashName = (hash: string): string[] => { |
|
|
|
|
|
if (!hash) { |
|
|
|
|
|
return [] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const length = hash.length |
|
|
|
|
|
const half = Math.ceil(length / 2) |
|
|
|
|
|
const start = hash.slice(0, half) |
|
|
|
|
|
const end = hash.slice(half) |
|
|
|
|
|
return [start, end] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
renderBody = () => { |
|
|
renderBody = () => { |
|
|
const { installing } = this.state |
|
|
const { installing } = this.state |
|
|
const { t, firmware } = this.props |
|
|
const { t, firmware } = this.props |
|
@ -141,7 +147,7 @@ class StepFullFirmwareInstall extends PureComponent<Props, State> { |
|
|
{t('app:manager.modal.identifier')} |
|
|
{t('app:manager.modal.identifier')} |
|
|
</Text> |
|
|
</Text> |
|
|
<Address> |
|
|
<Address> |
|
|
<Ellipsis>{firmware && firmware.hash}</Ellipsis> |
|
|
{firmware && firmware.hash && this.formatHashName(firmware.hash).join('\n')} |
|
|
</Address> |
|
|
</Address> |
|
|
</Box> |
|
|
</Box> |
|
|
<Box mt={5}> |
|
|
<Box mt={5}> |
|
|