()
| 255 | } |
| 256 | |
| 257 | render() { |
| 258 | if (this.state.exit) { |
| 259 | return <Redirect to="/keyring" />; |
| 260 | } |
| 261 | return ( |
| 262 | <div className="card-body key"> |
| 263 | <nav aria-label="breadcrumb"> |
| 264 | <ol className="breadcrumb bg-transparent p-0"> |
| 265 | <li className="breadcrumb-item"><Link to="/keyring" onClick={this.props.onKeyringChange} replace tabIndex="0"><span className="icon icon-arrow-left" aria-hidden="true"></span> {l10n.map.keyring_header}</Link></li> |
| 266 | </ol> |
| 267 | </nav> |
| 268 | <div className="card-title d-flex align-items-center justify-content-between flex-wrap"> |
| 269 | <h2 className="d-inline-flex align-items-center">{this.state.keyDetails.name} <KeyStatus className="small ml-2" status={this.state.keyDetails.status} /></h2> |
| 270 | <div className="btn-bar"> |
| 271 | {(!this.context.gnupg || this.state.keyDetails.type === 'public') && <button type="button" onClick={() => this.setState({showDeleteModal: true})} className="btn btn-secondary" title={l10n.map.key_remove_btn_title}>{l10n.map.key_remove_btn}</button>} |
| 272 | <button type="button" onClick={() => this.setState({showExportModal: true})} className="btn btn-secondary" title={l10n.map.key_export_btn_title}>{l10n.map.key_export_btn}</button> |
| 273 | {(!this.context.gnupg && this.state.keyDetails.type !== 'public') && |
| 274 | <> |
| 275 | <button type="button" onClick={() => this.setState({showRevokeModal: true})} className="btn btn-secondary" disabled={!this.state.keyDetails.validity} title={l10n.map.key_revoke_btn_title}>{l10n.map.key_revoke_btn}</button> |
no test coverage detected