81 lines
4.0 KiB
HTML
81 lines
4.0 KiB
HTML
{{template "header"}}
|
|
<div class="row indent-top">
|
|
<div class="col s6 offset-s3">
|
|
<ul class="tabs" id="tab">
|
|
<li class="tab col s6"><a class="active" href="#tab1">{{.Locale.TabSettings}}</a></li>
|
|
<li class="tab col s6"><a class="" href="#tab2">{{.Locale.TabBots}}</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col s6 offset-s3">
|
|
<div id="msg" class="indent-top"></div>
|
|
</div>
|
|
<div id="tab1" class="col s12">
|
|
<div class="row indent-top">
|
|
<form id="save" class="col s8 offset-s2" action="/save/" method="POST">
|
|
<input name="clientId" type="hidden" value="{{.Conn.ClientID}}">
|
|
<div class="row">
|
|
<div class="input-field col s12">
|
|
<input placeholder="API Url" id="api_url" name="api_url" type="text" class="validate" value="{{.Conn.APIURL}}">
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="input-field col s12">
|
|
<input placeholder="{{.Locale.ApiKey}}" id="api_key" name="api_key" type="text" class="validate" value="{{.Conn.APIKEY}}">
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="input-field col s12 center-align">
|
|
<button class="btn waves-effect waves-light light-blue darken-1" type="submit" name="action">
|
|
{{.Locale.ButConnect}}
|
|
<i class="material-icons right">sync</i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div id="tab2" class="col s12">
|
|
<div class="row indent-top">
|
|
<form id="add-bot" class="col s8 offset-s2" action="/add-bot/" method="POST">
|
|
<input name="clientId" type="hidden" value="{{.Conn.ClientID}}">
|
|
<div class="row">
|
|
<div class="input-field col s12">
|
|
<input placeholder="{{.Locale.TableToken}}" id="token" name="token" type="text" class="validate">
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="input-field col s12 center-align">
|
|
<button class="btn waves-effect waves-light light-blue darken-1" type="submit" name="action">
|
|
{{.Locale.AddBot}} <i class="material-icons right">add</i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<table id="bots" class="col s8 offset-s2">
|
|
<thead>
|
|
<tr>
|
|
<th>{{.Locale.TableName}}</th>
|
|
<th>{{.Locale.TableToken}}</th>
|
|
<th class="text-left">{{.Locale.TableActivity}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Bots}}
|
|
<tr>
|
|
<td>{{.Name}}</td>
|
|
<td>{{.Token}}</td>
|
|
<td>
|
|
<button class="activity-bot btn btn-small waves-effect waves-light light-blue darken-1" type="submit" name="action"
|
|
data-activity="{{.Active}}" data-token="{{.Token}}">
|
|
<i class="material-icons">{{if .Active}}pause{{else}}play_arrow{{end}}</i>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "footer"}}
|