<commit_before>{{ title 'Manage Crate Owners' }}

<div class="crates-heading">
  {{svg-jar "gear"}}
  <h1>Manage Crate Owners</h1>
  <h2>{{ this.crate.name }}</h2>
</div>

<div id="me-email">
  <h2>Add Owner</h2>

  <div class="row">
    <form class="email-form" {{action 'addOwner' on='submit'}}>
      <label class="label" for='new-owner-username'>
        Username
      </label>
      <Input @type="text" id="new-owner-username" @value={{this.username}} placeholder="Username" class="form-control space-right" @name="username" />

      {{#if this.error}}
        <div class='error'>
          <p class='error'>{{this.error}}</p>
        </div>
      {{/if}}

      {{#if this.invited}}
        <div class='invited'>
          <p>{{this.invited}}</p>
        </div>
      {{/if}}

      <div class="actions">
        <button id="add-owner" type="submit" class="small yellow-button space-right">Save</button>
      </div>
    </form>
  </div>
</div>

<h2>Owners</h2>

{{#if this.removed}}
  <div class='removed'>
    <p>{{this.removed}}</p>
  </div>
{{/if}}

<div class='owners white-rows'>
  {{#each this.crate.owner_team as |team|}}
    <div class='crate row' data-test-owner-team={{team.login}}>
      <LinkTo @route={{team.kind}} @model={{team.login}}>
        <UserAvatar @user={{team}} @size="medium-small" />
      </LinkTo>
      <LinkTo @route={{team.kind}} @model={{team.login}}>
        {{team.display_name}}
      </LinkTo>
      <div local-class="email-column">
        {{#if team.email}}
          {{team.email}}
        {{else}}
          &nbsp;
        {{/if}}
      </div>
      <button type="button" local-class="remove-button" data-test-remove-owner-button {{action 'removeOwner' team}}>Remove</button>
    </div>
  {{/each}}
  {{#each this.crate.owner_user as |user|}}
    <div class='crate row' data-test-owner-user={{user.login}}>
      <LinkTo @route={{user.kind}} @model={{user.login}}>
        <UserAvatar @user={{user}} @size="medium-small" />
      </LinkTo>
      <LinkTo @route={{user.kind}} @model={{user.login}}>
        {{ user.name }}
      </LinkTo>
      <div local-class="email-column">
        {{#if user.email}}
          {{user.email}}
        {{else}}
          &nbsp;
        {{/if}}
      </div>
      <button type="button" local-class="remove-button" data-test-remove-owner-button {{action 'removeOwner' user}}>Remove</button>
    </div>
  {{/each}}
</div><commit_msg>crate.owners: Simplify email address rendering<commit_after>{{ title 'Manage Crate Owners' }}

<div class="crates-heading">
  {{svg-jar "gear"}}
  <h1>Manage Crate Owners</h1>
  <h2>{{ this.crate.name }}</h2>
</div>

<div id="me-email">
  <h2>Add Owner</h2>

  <div class="row">
    <form class="email-form" {{action 'addOwner' on='submit'}}>
      <label class="label" for='new-owner-username'>
        Username
      </label>
      <Input @type="text" id="new-owner-username" @value={{this.username}} placeholder="Username" class="form-control space-right" @name="username" />

      {{#if this.error}}
        <div class='error'>
          <p class='error'>{{this.error}}</p>
        </div>
      {{/if}}

      {{#if this.invited}}
        <div class='invited'>
          <p>{{this.invited}}</p>
        </div>
      {{/if}}

      <div class="actions">
        <button id="add-owner" type="submit" class="small yellow-button space-right">Save</button>
      </div>
    </form>
  </div>
</div>

<h2>Owners</h2>

{{#if this.removed}}
  <div class='removed'>
    <p>{{this.removed}}</p>
  </div>
{{/if}}

<div class='owners white-rows'>
  {{#each this.crate.owner_team as |team|}}
    <div class='crate row' data-test-owner-team={{team.login}}>
      <LinkTo @route={{team.kind}} @model={{team.login}}>
        <UserAvatar @user={{team}} @size="medium-small" />
      </LinkTo>
      <LinkTo @route={{team.kind}} @model={{team.login}}>
        {{team.display_name}}
      </LinkTo>
      <div local-class="email-column">
        {{team.email}}
      </div>
      <button type="button" local-class="remove-button" data-test-remove-owner-button {{action 'removeOwner' team}}>Remove</button>
    </div>
  {{/each}}
  {{#each this.crate.owner_user as |user|}}
    <div class='crate row' data-test-owner-user={{user.login}}>
      <LinkTo @route={{user.kind}} @model={{user.login}}>
        <UserAvatar @user={{user}} @size="medium-small" />
      </LinkTo>
      <LinkTo @route={{user.kind}} @model={{user.login}}>
        {{ user.name }}
      </LinkTo>
      <div local-class="email-column">
        {{user.email}}
      </div>
      <button type="button" local-class="remove-button" data-test-remove-owner-button {{action 'removeOwner' user}}>Remove</button>
    </div>
  {{/each}}
</div>
{'fraction_non_alphanumeric': 0.22283648734850095, 'fraction_numerical': 0.0034020837763129915, 'mean_word_length': 2.843137254901961, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '945559', 'n_tokens_mistral': 1649, 'n_tokens_neox': 1664, 'n_words': 303}