Add IP debug to the login modal (#114)

This commit is contained in:
Wruczek 2019-03-01 06:12:11 +01:00
parent 6cff15964f
commit 119443bbe8
2 changed files with 25 additions and 8 deletions

View File

@ -151,6 +151,8 @@ body {
white-space: nowrap; white-space: nowrap;
} }
/* Login modal */
#loginModal .select-account .list-group .list-group-item { #loginModal .select-account .list-group .list-group-item {
cursor: pointer; cursor: pointer;
display: flex; display: flex;
@ -167,6 +169,13 @@ body {
font-size: 100%; font-size: 100%;
} }
#loginModal .loginDebugInfo {
position: absolute;
bottom: 3px;
right: 3px;
line-height: 1em;
}
/* Bans page */ /* Bans page */
.ban-alert { .ban-alert {
@ -183,7 +192,7 @@ body {
font-family: var(--font-family-monospace); font-family: var(--font-family-monospace);
} }
/* Responsive datatables styles */ /* Responsive DataTables styles */
table.dataTable>tbody>tr.child ul.dtr-details>li:first-child { table.dataTable>tbody>tr.child ul.dtr-details>li:first-child {
padding-top: 0; padding-top: 0;
@ -337,7 +346,7 @@ table.dataTable > tbody > tr.child td.child {
} }
/* No top spacing on the first group */ /* No top spacing on the first group */
/* Thats why I've put that extra DIV that wraps all groups */ /* That's why I've put that extra DIV that wraps all groups */
.admin-status.admin-status-grouped div:first-child .group-name { .admin-status.admin-status-grouped div:first-child .group-name {
margin-top: 0; margin-top: 0;
} }

View File

@ -11,24 +11,24 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
{* Error loading data alert *} <!-- Error loading data alert -->
<div class="error-generic alert alert-danger" role="alert" style="display: none"> <div class="error-generic alert alert-danger" role="alert" style="display: none">
<i class="fas fa-exclamation-circle"></i> <i class="fas fa-exclamation-circle"></i>
Error loading login data. Is the server offline? Error loading login data. Is the server offline?
</div> </div>
{* Error sending code alert *} <!-- Error sending code alert -->
<div class="error-sendingcode alert alert-danger" role="alert" style="display: none"> <div class="error-sendingcode alert alert-danger" role="alert" style="display: none">
<i class="fas fa-exclamation-circle"></i> <i class="fas fa-exclamation-circle"></i>
Error sending you the code. Are you online? Does the bot have permissions to poke you? Error sending you the code. Are you online? Does the bot have permissions to poke you?
</div> </div>
{* Loader *} <!-- Loader -->
<div class="status-loader position-relative p-3"> <div class="status-loader position-relative p-3">
<div class="loader"></div> <div class="loader"></div>
</div> </div>
{* Not connected to the server message *} <!-- Not connected to the server message -->
<div class="not-connected text-center" style="display: none"> <div class="not-connected text-center" style="display: none">
<h3>Not connected</h3> <h3>Not connected</h3>
<p>Connect to <a href="ts3server://{$config["query_displayip"]}">{$config["query_displayip"]}</a> and wait ±30 seconds.<br>The website will auto-refresh.</p> <p>Connect to <a href="ts3server://{$config["query_displayip"]}">{$config["query_displayip"]}</a> and wait ±30 seconds.<br>The website will auto-refresh.</p>
@ -41,9 +41,17 @@
</p> </p>
<!-- <p class="mb-0">Still not working? Try <a href="#">other login methods</a></p> --> <!-- <p class="mb-0">Still not working? Try <a href="#">other login methods</a></p> -->
<!-- Show a small IP debug -->
{var utils = Wruczek\TSWebsite\Utils\Utils::class}
<span class="loginDebugInfo"
data-toggle="tooltip"
data-html="true" title="Debug info: Your IP<br>Raw: {$utils::getClientIp(false)}<br>CF: {$utils::getClientIp(true)}">
&pi;
</span>
</div> </div>
{* Account selector, if we have more than 2 accounts on the same IP address *} <!-- Account selector, if we have more than 2 accounts on the same IP address -->
<div class="select-account text-center" style="display: none"> <div class="select-account text-center" style="display: none">
<h3 class="mb-3">Select your account</h3> <h3 class="mb-3">Select your account</h3>
@ -58,7 +66,7 @@
</div> </div>
</div> </div>
{* Confirmation code form *} <!-- Confirmation code form -->
<div class="confirmation-code text-center" style="display: none"> <div class="confirmation-code text-center" style="display: none">
<h3>Enter your code</h3> <h3>Enter your code</h3>
<p>We have send a confirmation code to <b class="selected-nickname"></b>.</p> <p>We have send a confirmation code to <b class="selected-nickname"></b>.</p>