geoipProvider & contest.sort

This commit is contained in:
masnn committed 2020-06-11 11:58:45 +08:00
1 parent 2b68b9687d
commit 67b35bc07c
3 files changed
+6 -4

No files matched your search

+1 -1
View File
@@ -109,7 +109,7 @@ class HomeSecurityHandler extends Handler {
if (geoip) session.updateGeoip = geoip.lookup(session.updateIp || session.createIp);
}
this.response.template = 'home_security.html';
this.response.body = { sessions: parsed };
this.response.body = { sessions: parsed, geoipProvider: (geoip || {}).provider };
}
async postChangePassword({ current, password, verifyPassword }) {
+1 -1
View File
@@ -365,7 +365,7 @@ function count(domainId, query, type = document.TYPE_CONTEST) {
}
function getMulti(domainId, query = {}, type = document.TYPE_CONTEST) {
return document.getMulti(domainId, type, query);
return document.getMulti(domainId, type, query).sort('beginAt', -1);
}
function _getStatusJournal(tsdoc) {
+4 -2
View File
@@ -21,7 +21,7 @@
label:'Current Email',
columns:10,
name:'currentEmail',
value:this.user.email,
value:handler.user.mail,
disabled:true
}) }}
{{ form.form_text({
@@ -123,9 +123,11 @@
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
<input type="submit" value="{{ _('Logout All Sessions') }}" class="primary rounded button">
</form>
{% if geoipProvider %}
<div class="typo">
<p><small>IP geo-location data is provided by <a href="http://www.maxmind.com" target="_blank">MaxMind</a>.</small></p>
<p><small>IP geo-location data is provided by {{ geoipProvider|safe }}.</small></p>
</div>
{% endif %}
</div>
</div>
</div>