message: Cleanup Generator::showActionButton()
diff: @@ -140,6 +140,7 @@ class Generator extends preact.Component {
  request_recipient_address: request.recipient
  }).getText();
  if (response_type === 'admonition') {
  + // TODO @zner0L: I don't think this is used anywhere.
  prev.request_data['via'] = request.via;
  prev.request_data['recipient_address'] = request.recipient;
  }
  @@ -439,50 +440,44 @@ class Generator extends preact.Component {
  }
  getActionButton() {
  - let action_button = (
  + return this.state.request_data.transport_medium === 'email' ? (
  <a
  - id="download-button"
  - className={'button' + (this.state.download_active ? '' : ' disabled') + ' button-primary'}
  - href={this.state.blob_url}
  - download={this.state.download_filename}
  + id="sendmail-button"
  + className={'button' + (this.state.blob_url ? '' : ' disabled') + ' button-primary'}
  + href={this.getMailtoLink()}
  onClick={e => {
  - if (!this.state.download_active) {
  + if (!this.state.blob_url) {
  e.preventDefault();
  } else {
  this.storeRequest();
  this.setState({ request_done: true });
  }
  }}>
  - <Text id="download-pdf" />
  + <Text id="send-email" />
  &nbsp;&nbsp;
  - <span className="icon icon-download" />
  + <span className="icon icon-email" />
  </a>
  - );
  -
  - if (this.state.request_data.transport_medium === 'email') {
  - action_button = (
  + ) : (
  <a
  - id="sendmail-button"
  - className={'button' + (this.state.blob_url ? '' : ' disabled') + ' button-primary'}
  - href={this.getMailtoLink()}
  + id="download-button"
  + className={'button' + (this.state.download_active ? '' : ' disabled') + ' button-primary'}
  + href={this.state.blob_url}
  + download={this.state.download_filename}
  onClick={e => {
  - if (!this.state.blob_url) {
  + if (!this.state.download_active) {
  e.preventDefault();
  } else {
  this.storeRequest();
  this.setState({ request_done: true });
  }
  }}>
  - <Text id="send-email" />
  + <Text id="download-pdf" />
  &nbsp;&nbsp;
  - <span className="icon icon-email" />
  + <span className="icon icon-download" />
  </a>
  );
  }
  - return action_button;
  - }
  -
  getMailtoLink() {
  return (
  'mailto:' +
  