zulip/static/templates/bot_avatar_row.hbs

51 lines
2.5 KiB
Handlebars

<li class="bot-information-box white-box">
<div class="image overflow-hidden">
<img src="{{avatar_url}}" class="avatar" />
<div class="details">
<div class="name">{{name}}</div>
{{#if is_active}}
<div class="edit-bot-buttons">
<button type="submit" class="btn open_edit_bot_form" data-sidebar-form="edit-bot" title="{{t 'Edit bot' }}" data-email="{{email}}">
<i class="fa fa-pencil blue" aria-hidden="true"></i>
</button>
<a type="submit" download="{{zuliprc}}" class="btn download_bot_zuliprc" title="{{t 'Download zuliprc' }}" data-email="{{email}}">
<i class="fa fa-download sea-green" aria-hidden="true"></i>
</a>
<button type="submit" id="copy_zuliprc" class="btn copy_zuliprc" title="{{t 'Copy zuliprc' }}">
<i class="fa fa-clipboard copy-gold"></i>
</button>
<button type="submit" class="btn delete_bot" title="{{t 'Delete bot' }}" data-user-id="{{user_id}}">
<i class="fa fa-trash-o danger-red" aria-hidden="true"></i>
</button>
</div>
{{/if}}
</div>
</div>
<div class="bot_info" data-user-id="{{user_id}}">
<div class="type">
<div class="field">{{t "Bot type" }}</div>
<div class="value">{{type}}</div>
</div>
<div class="email">
<div class="field">{{t "Bot email" }}</div>
<div class="value">{{email}}</div>
</div>
{{#if is_active}}
<div class="api_key">
<span class="field">{{t "API key" }}</span>
<div class="api-key-value-and-button no-select">
<!-- have the `.text-select` in `.no-select` so that the value doesn't have trailing whitespace. -->
<span class="value text-select">{{api_key}}</span>
<button type="submit" class="button no-style btn-secondary regenerate_bot_api_key" title="{{t 'Generate new API key' }}" data-user-id="{{user_id}}">
<i class="fa fa-refresh" aria-hidden="true"></i>
</button>
</div>
<div class="api_key_error text-error"></div>
</div>
{{else}}
<button class="button round btn-warning reactivate_bot" title="{{t 'Reactivate bot' }}" data-user-id="{{user_id}}">{{t "Reactivate bot" }}</button>
{{/if}}
<div class="bot_error alert alert-error hide"></div>
</div>
</li>