2017-03-26 05:31:47 +02:00
{% extends 'site_layout.html.j2' %}
2017-07-14 06:04:04 +02:00
{% set title="Administrate Guild: " + guild['name'] %}
2017-03-26 05:31:47 +02:00
2017-04-23 08:55:03 +02:00
{% block additional_head_elements %}
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/administrate_guild.css') }}">
{% endblock %}
2017-03-26 05:31:47 +02:00
{% block content %}
<h1>Administrating: {{ guild['name'] }}</h1>
<p class="flow-text">For this server, you are allowed the following actions:
{% for permission in permissions %}
{{ permission }}
{% if not loop.last %}
,
{% endif %}
{% endfor %}
.</p>
<div class="row">
<div class="col s12">
<h2 class="header">Embed URLs</h2>
<div class="card horizontal black-text indigo lighten-5 z-depth-3 hoverable">
<div class="card-stacked">
<div class="card-content">
<p class="flow-text">Direct Link</p>
2017-03-26 10:04:15 +02:00
<input readonly value="{{ url_for("embed.guild_embed", guild_id=guild['id'], _external=True) }}" id="disabled" type="text" onClick="this.setSelectionRange(0, this.value.length)">
2017-03-26 05:31:47 +02:00
<p class="flow-text">iFrame Embed</p>
2017-05-11 04:34:30 +02:00
<input readonly value="<iframe src="{{ url_for("embed.guild_embed", guild_id=guild['id'], _external=True) }}" height="600" width="800" frameborder="0"></iframe>" id="disabled" type="text" onClick="this.setSelectionRange(0, this.value.length)">
2017-03-26 05:31:47 +02:00
</div>
</div>
</div>
</div>
{% if "Manage Embed Settings" in permissions %}
<div class="col s12">
<h2 class="header">Embed Settings</h2>
<div class="card horizontal black-text indigo lighten-5 z-depth-3 hoverable">
<div class="card-stacked">
<div class="card-content">
2017-05-09 02:55:07 +02:00
2017-03-26 05:31:47 +02:00
<p class="flow-text">Unauthenticated (Guest) Users</p>
2017-03-26 10:04:15 +02:00
<div class="switch">
<label>
Disable
2017-05-08 21:13:53 +02:00
<input type="checkbox" id="unauth_users" name="unauth_users" {% if guild['unauth_users'] %}checked{% endif %} >
2017-03-26 10:04:15 +02:00
<span class="lever"></span>
Enable
</label>
</div>
2017-06-09 06:22:33 +02:00
<br>
<p class="flow-text">Toggle Visitor Mode</p>
<p>Visitors are able to view the channels that @everyone has access to. However, they are not able to send messages until they login using the usual methods.</p>
<div class="switch">
<label>
Disable
<input type="checkbox" id="visitor_view" name="visitor_view" {% if guild['visitor_view'] %}checked{% endif %} >
<span class="lever"></span>
Enable
</label>
</div>
2017-05-09 02:55:07 +02:00
2017-08-27 23:41:36 +02:00
<br>
<p class="flow-text">Toggle Webhooks Messages</p>
<p>Instead of sending user messages directly from the Titan bot, webhook messages allows Titan to take advantage of the built-in webhooks to create messages that looks more real. Reading messages in Discord can be <a href="{{ url_for('static', filename='img/webhook_comparison.png') }}" target="_blank" title="A quick comparison between having webhook messages enabled vs disabled for a text channel">20% more cooler</a>!</p>
<div class="switch">
<label>
Disable
<input type="checkbox" id="webhook_messages" name="webhook_messages" {% if guild['webhook_messages'] %}checked{% endif %} >
<span class="lever"></span>
Enable
</label>
</div>
2017-05-09 02:55:07 +02:00
<br>
<p class="flow-text">Chat Links</p>
<div class="switch">
<label>
Disable
<input type="checkbox" id="chat_links" name="chat_links" {% if guild['chat_links'] %}checked{% endif %} >
<span class="lever"></span>
Enable
</label>
</div>
<br>
<p class="flow-text">Render Links as an Embed</p>
<p>(if possible)</p>
<div class="switch">
<label>
Disable
<input type="checkbox" id="bracket_links" name="bracket_links" {% if guild['bracket_links'] %}checked{% endif %} >
<span class="lever"></span>
Enable
</label>
</div>
<br>
<p class="flow-text">Message mentions limit</p>
<p>(-1 to have no limit - enter to submit)</p>
<input id="mentions_limit" type="number" value="{{ guild['mentions_limit'] }}">
2017-06-04 07:31:45 +02:00
<br>
<p class="flow-text">Custom Discord.io Link</p>
<p>Because we are a partner with <a href="https://discord.io" target="_blank">Discord.io</a>, we enable you to enter your custom discord.io link and replace the discord.gg link on the embed!</p>
<p>(Leave blank if none - enter to submit)</p>
<input id="discordio" value="{{ guild['discordio'] }}">
2017-03-26 05:31:47 +02:00
</div>
</div>
</div>
</div>
{% endif %}
{% if "Ban Members" in permissions or "Kick Members" in permissions %}
<div class="col s12">
<h2 class="header">Moderate Unauthenticated Members</h2>
<div class="card horizontal black-text indigo lighten-5 z-depth-3 hoverable">
2017-04-09 20:05:34 +02:00
<div class="card-stacked" style="overflow-x: hidden;">
2017-03-26 05:31:47 +02:00
<div class="card-content">
2017-04-09 20:05:34 +02:00
<div class="row">
<div class="col s12">
<p class="flow-text">Select Action</p>
<table class="striped responsive-table">
<thead>
<tr>
<th>Kick User</th>
<th>Ban User</th>
<th>Username</th>
<th>Discrim</th>
<th>Last Visit</th>
2017-04-12 09:36:05 +02:00
<th>IP Address Hash</th>
2017-04-09 20:05:34 +02:00
<th>Banned Timestamp</th>
<th>Banned by</th>
<th>Banned Reason</th>
<th>Ban Lifted by</th>
2017-04-23 08:55:03 +02:00
<th>Recent Aliases</th>
2017-04-09 20:05:34 +02:00
</tr>
</thead>
<tbody>
{% for member in members %}
<tr>
<td><a class="waves-effect waves-light btn orange" {% if "Kick Members" not in permissions or member["kicked"] %}disabled{% endif %} onclick='revoke_user( "{{ guild['id'] }}" , {{ member['id'] }} )' >Kick</a></td>
{% if not member["banned"] %}
<td><a class="waves-effect waves-light btn red" {% if "Ban Members" not in permissions %}disabled{% endif %} {% if "Ban Members" in permissions %} onclick='initiate_ban( "{{ guild['id'] }}" , {{ member['id'] }} )' {% endif %} >Ban</a></td>
{% else %}
<td><a class="waves-effect waves-light btn red lighten-2" {% if "Ban Members" not in permissions %}disabled{% endif %} {% if "Ban Members" in permissions %} onclick='remove_ban( "{{ guild['id'] }}" , {{ member['id'] }} )' {% endif %} >Lift</a></td>
{% endif %}
<td>{{ member['username'] }}</td>
<td>{{ member['discrim'] }}</td>
<td>{{ member['last_visit'] }}</td>
<td>{{ member['ip'] }}</td>
<td>{{ member['banned_timestamp'] }}</td>
<td>{{ member['banned_by'] }}</td>
<td>{{ member['banned_reason'] }}</td>
<td>{{ member['ban_lifted_by'] }}</td>
2017-04-23 08:55:03 +02:00
<td>
<ul>
{% if member['aliases']|length > 0 %}
{% for alias in member['aliases'] %}
<li>{{ alias }}</li>
{% endfor %}
{% else %}
<li>None</li>
{% endif %}
</ul>
</td>
2017-04-09 20:05:34 +02:00
</tr>
{% endfor %}
</tbody>
</table>
2017-04-23 08:55:03 +02:00
<p>Note that all bans are by IP. Seeing duplicates? It is because users are generated a unique session on each browser load. (Though we try to remove/concat any duplicates IP hashes)</p>
2017-04-09 20:05:34 +02:00
</div>
</div>
2017-03-26 05:31:47 +02:00
</div>
</div>
</div>
{% endif %}
2017-04-09 20:05:34 +02:00
</div>
2017-07-23 00:09:35 +02:00
<br><hr>
{% include 'card_commands.html.j2' %}
{% include 'card_queryparams.html.j2' %}
2017-08-05 20:01:20 +02:00
{% include 'card_webhookmsgs.html.j2' %}
2017-03-26 05:31:47 +02:00
{% endblock %}
2017-03-26 10:04:15 +02:00
{% block script %}
<script type="text/javascript" src="{{ url_for('static', filename='js/administrate_guild.js') }}"></script>
{% endblock %}