master
Aevann1 2021-09-12 06:49:51 +02:00
parent 5fd7933d74
commit 468c652b22
5 changed files with 8 additions and 29 deletions

View File

@ -44,7 +44,7 @@
{% endfilter %}
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if x == "yes" %}checked{% endif %} onchange="post('/admin/disablesignups');">
<input type="checkbox" class="custom-control-input" id="disablesignups" name="disablesignups" {% if x == "yes" %}checked{% endif %} onchange="post_toast('/admin/disablesignups');">
<label class="custom-control-label" for="disablesignups">Disable signups</label>
</div>

View File

@ -130,7 +130,7 @@
</div>
<hr class="my-2">
<div class="px-2">
<a class="dropdown-item" href="javascript:void(0)", onclick="post('/logout', '1')"><i class="fas fa-sign-out fa-fw text-left mr-3"></i>Log out</a>
<a class="dropdown-item" href="javascript:void(0)", onclick="post_toast('/logout', '1')"><i class="fas fa-sign-out fa-fw text-left mr-3"></i>Log out</a>
</div>
</div>
</div>
@ -190,7 +190,7 @@
<li class="nav-item"><a class="nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a></li>
<li class="nav-item border-top border-bottom mt-2 pt-2">
<a class="nav-link" href="javascript:void(0)", onclick="post('/logout', '1')"><i class="fas fa-sign-out fa-fw mr-3 text-danger"></i>Log out</a>
<a class="nav-link" href="javascript:void(0)", onclick="post_toast('/logout', '1')"><i class="fas fa-sign-out fa-fw mr-3 text-danger"></i>Log out</a>
</li>
{% else %}
<li class="nav-item d-flex align-items-center justify-content-center pb-3">

View File

@ -26,7 +26,7 @@
<div class="body w-lg-100">
<p>Choose your quadrant.</p>
<div class="input-group mb2">
<select id='quadrant' class="form-control" form="profile-settings" name="quadrant" onchange="post('/settings/profile?quadrant='+document.getElementById('quadrant').value, function(){window.location.reload(true);})">
<select id='quadrant' class="form-control" form="profile-settings" name="quadrant" onchange="post_toast('/settings/profile?quadrant='+document.getElementById('quadrant').value, '1')">
{% for entry in ["Centrist", "LibLeft", "LibRight", "AuthLeft", "AuthRight", "LibCenter", "AuthCenter", "Left", "Right"] %}
<option value="{{entry}}" {% if v.quadrant==entry %} selected {% endif %}>
{{entry}}
@ -93,7 +93,7 @@
<div class="body w-lg-100">
<p>Change the theme for the website.</p>
<div class="input-group mb2">
<select id='theme' class="form-control" form="profile-settings" name="theme" onchange="post('/settings/profile?theme='+document.getElementById('theme').value, function(){window.location.reload(true);})">
<select id='theme' class="form-control" form="profile-settings" name="theme" onchange="post_toast('/settings/profile?theme='+document.getElementById('theme').value, '1')">
{% if v.background %}
{% set entries = ["transparent", "win98", "dark", "light", "coffee", "tron", "4chan", "midnight"] %}
{% else %}
@ -238,7 +238,7 @@
</div>
{% if v.background %}
<div class="d-flex mt-2">
<a class="btn btn-primary ml-auto" href="javascript:void(0)" onclick="post('/settings/removebackground', function(){window.location.reload(true);})">Remove Background</a>
<a class="btn btn-primary ml-auto" href="javascript:void(0)" onclick="post_toast('/settings/removebackground','1')">Remove Background</a>
<pre></pre>
</div>
{% endif %}

View File

@ -265,27 +265,6 @@
<!-- Font Awesome -->
<link href="/assets/style/fa.css" rel="stylesheet"> <!--load all styles -->
{% if v %}
<script>
function post(url, callback, errortext) {
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
var form = new FormData()
form.append("formkey", "{{v.formkey}}");
xhr.withCredentials=true;
xhr.onload=callback
xhr.onerror=function(){alert(errortext)}
xhr.send(form);
}
function formkey() {
return '{{v.formkey}}';
}
</script>
{% endif %}
</head>
<body id="submit" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}display: block;">

View File

@ -13,11 +13,11 @@
<p class="text-muted">This user has enabled private mode to cloak their posting history.</p>
{% if u.id == 253 and 'rdrama' in request.host %}
{% if v and v.coins > 500 and not v.is_suspended %}
<a class="btn btn-primary" href="javascript:void(0)", onclick="post('/pay_rent', '1'">Pay rent to view profile (500 coins)</a>
<a class="btn btn-primary" href="javascript:void(0)", onclick="post_toast('/pay_rent', '1')">Pay rent to view profile (500 coins)</a>
{% endif %}
<pre></pre>
{% if v and v.coins > 5000 and time - v.created_utc > 604800 and not v.is_suspended %}
<a class="btn btn-primary" href="javascript:void(0)", onclick="post('/steal', '1'">Attempt to steal coins</a>
<a class="btn btn-primary" href="javascript:void(0)", onclick="post_toast('/steal', '1')">Attempt to steal coins</a>
<div class="text-small-extra text-muted mt-1">Landlords, like all other men, love to reap where they never sowed.</div>
{% endif %}
<pre>