2016-10-06 20:34:07 +02:00
|
|
|
<div id="bot-settings" class="settings-section" data-name="your-bots">
|
2016-10-05 02:19:14 +02:00
|
|
|
|
|
|
|
<div class="settings-section-title">
|
|
|
|
<i class="icon-vector-github settings-section-icon"></i>
|
2017-01-17 02:26:22 +01:00
|
|
|
{{t "Your bots" }}
|
2016-10-05 02:19:14 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="bot-settings-form">
|
|
|
|
{{#tr this}}
|
|
|
|
<p class="bot-settings-note padded-container">
|
|
|
|
Looking for our <a href="/integrations" target="_blank">Integrations</a>
|
|
|
|
or <a href="{{ server_uri }}/api" target="_blank">API</a> documentation?
|
|
|
|
</p>
|
|
|
|
{{/tr}}
|
|
|
|
|
2017-02-25 20:14:47 +01:00
|
|
|
<ul class="nav nav-tabs nav-justified" id="bots_lists_navbar">
|
|
|
|
<li class="active active-bots-tab"><a>{{t "Active bots" }}</a></li>
|
|
|
|
<li class="inactive-bots-tab"><a>{{t "Inactive bots" }}</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ol class="bots_list" id="active_bots_list">
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
<ol class="bots_list" id="inactive_bots_list">
|
2016-10-05 02:19:14 +02:00
|
|
|
</ol>
|
2017-02-25 20:14:47 +01:00
|
|
|
|
2016-10-05 02:19:14 +02:00
|
|
|
<div id="bot_table_error" class="alert alert-error hide"></div>
|
|
|
|
|
|
|
|
<div class="add-new-bot-box grey-bg">
|
|
|
|
<form id="create_bot_form" class="form-horizontal no-padding">
|
2017-01-17 02:42:23 +01:00
|
|
|
<h4 class="new-bot-section-title light no-margin">Add a new bot</h4>
|
2016-10-05 02:19:14 +02:00
|
|
|
<div class="new-bot-form">
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="create_bot_name">{{t "Full name" }}</label>
|
|
|
|
<input type="text" name="bot_name" id="create_bot_name" class="required"
|
2017-03-09 01:01:06 +01:00
|
|
|
maxlength=100 placeholder="{{t 'Cookie Bot' }}" value="" />
|
2016-10-05 02:19:14 +02:00
|
|
|
<div><label for="create_bot_name" generated="true" class="text-error"></label></div>
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="bot_short_name">{{t "Username" }}</label>
|
|
|
|
<input type="text" name="bot_short_name" id="create_bot_short_name" class="required bot_local_part"
|
2017-03-09 01:01:06 +01:00
|
|
|
placeholder="cookie" value="" />
|
2017-03-05 04:17:12 +01:00
|
|
|
-bot@{{ page_params.realm_bot_domain }}
|
2016-10-05 02:19:14 +02:00
|
|
|
<div>
|
|
|
|
<label for="create_bot_short_name" generated="true" class="text-error"></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="input-group new-bot-ui">
|
|
|
|
<label for="create_bot_default_sending_stream">{{t "Send to stream" }}</label>
|
|
|
|
<select name="bot_default_sending_stream" id="create_bot_default_sending_stream"></select>
|
|
|
|
</div>
|
|
|
|
<div class="input-group new-bot-ui">
|
|
|
|
<label for="create_bot_default_events_register_stream">{{t "Listen on" }}</label>
|
|
|
|
<select name="bot_default_events_register_stream" id="create_bot_default_events_register_stream"></select>
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
|
|
<div id="bot_avatar_file"></div>
|
|
|
|
<input type="file" name="bot_avatar_file_input" class="notvisible" id="bot_avatar_file_input" value="{{t 'Upload avatar' }}" />
|
|
|
|
<button class="btn btn-default display-none" id="bot_avatar_clear_button">{{t "Clear avatar" }}</button>
|
|
|
|
<button class="button white" id="bot_avatar_upload_button">{{t "Customize avatar" }}</button> ({{t "Optional" }})
|
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<div id="bot_avatar_file_input_error" class="text-error"></div>
|
|
|
|
</p>
|
2017-01-17 02:26:42 +01:00
|
|
|
<input type="submit" class="button sea-green" id="create_bot_button" value="{{t 'Create bot' }}" />
|
2016-10-05 02:19:14 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr class="settings_separator" />
|
|
|
|
|
|
|
|
<div class="form-horizontal" id="api_key_button_box">
|
|
|
|
<div class="input-group side-padded-container">
|
|
|
|
{{#tr this}}
|
|
|
|
<p class="api-key-note">For most bots using the API, you'll want to give each bot
|
|
|
|
its own name and API key using the above section. But if you
|
|
|
|
want to write a bot that can access your own private
|
|
|
|
messages, you should use your personal API key.
|
|
|
|
</p>
|
|
|
|
{{/tr}}
|
|
|
|
<button class="button white" id="api_key_button">{{t "Show/change your API key" }}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-11-15 17:55:20 +01:00
|
|
|
<div id="get_api_key_box" class="side-padded-container">
|
2016-10-05 02:19:14 +02:00
|
|
|
{{#tr this}}
|
|
|
|
<p>Please re-enter your password to confirm your identity.
|
|
|
|
(<a href="/accounts/password/reset/" target="_blank">Forgotten it?</a>)</p>
|
|
|
|
{{/tr}}
|
|
|
|
<form action="/json/fetch_api_key" method="post" class="form-horizontal">
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="password" class="control-label">{{t "Current password" }}</label>
|
|
|
|
<input type="password" autocomplete="off"
|
|
|
|
name="password" id="get_api_key_password" value="" />
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<input type="submit" name="view_api_key" value="{{t 'Get API key' }}"
|
|
|
|
class="btn btn-primary" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2016-11-15 17:55:20 +01:00
|
|
|
<div id="show_api_key_box" class="side-padded-container">
|
2016-10-05 02:19:14 +02:00
|
|
|
<p>{{t "Your API key:" }}</p>
|
|
|
|
<p><b><span id="api_key_value"></span></b></p>
|
|
|
|
<button type="submit" class="btn btn-primary regenerate_api_key">
|
2017-03-08 13:37:43 +01:00
|
|
|
{{t "Generate new API key" }}
|
2016-10-05 02:19:14 +02:00
|
|
|
</button>
|
2016-12-07 18:38:59 +01:00
|
|
|
<a id="download_zuliprc" download="{{zuliprc}}" class="btn btn-success">
|
|
|
|
{{t "Download .zuliprc" }}
|
|
|
|
</a>
|
2016-10-05 02:19:14 +02:00
|
|
|
<div id="user_api_key_error text-error">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|