diff --git a/templates/admin/leaderboard.html b/templates/admin/leaderboard.html new file mode 100644 index 0000000..499b9a0 --- /dev/null +++ b/templates/admin/leaderboard.html @@ -0,0 +1,72 @@ +{% extends "admin/admin_base.html" %} +{% block title %}Leaderboard — KittyRec Admin{% endblock %} + +{% block content %} + + +{% if SCOPE_ADMIN in scopes %} +
+
+

Reset Periodic

+ +
+

Resets the weekly/periodic score column for all players. All-time scores are unaffected.

+
+{% endif %} + +
+ +
+ + + + + + + + + + + + {% for e in entries %} + + + + + + + + {% endfor %} + +
RankPlayerLevelAll-Time ScorePeriodic Score
#{{ loop.index }} + {{ e.username or ('#' ~ e.profile_id) }} + Lv {{ e.level or '?' }}{{ "{:,}".format(e.all_time or 0) }}{{ "{:,}".format(e.periodic or 0) }}
+
+
+{% endblock %} + +{% block scripts %} + +{% endblock %} diff --git a/templates/admin/login.html b/templates/admin/login.html new file mode 100644 index 0000000..704804f --- /dev/null +++ b/templates/admin/login.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% block title %}Admin Login — KittyRec INDEV{% endblock %} +{% block content %} +
+
+
+

Admin Panel

+

KittyRec INDEV · Authorized access only

+
+ {% if error %} +
{{ error }}
+ {% endif %} +
+
+ + +
+
+ + +
+ +
+
+
+{% endblock %} diff --git a/templates/admin/music_view.html b/templates/admin/music_view.html new file mode 100644 index 0000000..5edc607 --- /dev/null +++ b/templates/admin/music_view.html @@ -0,0 +1,131 @@ +{% extends 'admin/custom_base.html' %} +{% block body %} +
+
+
+

Soundtrack

+

Manage the KittyRec in-game music. Uploaded files are served at /api/music/v1/file/<name>. Non-WAV files are auto-converted by ffmpeg on first play.

+
+ {{ tracks|length }} track(s) +
+ + {% if error %} +
{{ error }}
+ {% endif %} + {% if success %} +
{{ success }}
+ {% endif %} + + {% if SCOPE_ADMIN in scopes %} +
+
+ Upload Track
+
+
+ +
+
+ + + Accepted: WAV, MP3, OGG, FLAC, M4A, AAC, OPUS, WMA — max 100 MB. Non-WAV files are converted to WAV automatically. +
+
+ +
+
+
+
+
+ {% endif %} + +
+
Tracks
+
+ + + + + + + + + {% if SCOPE_ADMIN in scopes %}{% endif %} + + + + {% if not tracks %} + + {% else %} + {% for t in tracks %} + + + + + + + {% if SCOPE_ADMIN in scopes %} + + {% endif %} + + {% endfor %} + {% endif %} + +
#FilenameFormatSizePreviewActions
No tracks in the music folder yet.
{{ loop.index }}{{ t.name }}{{ t.ext.lstrip('.').upper() }}{{ t.size_kb }} KB + {% if t.ext == '.wav' %} + + {% else %} + Converted on first play + {% endif %} + + +
+ + + +
+
+
+
+
+ + + + +{% endblock %} diff --git a/templates/admin/player_detail.html b/templates/admin/player_detail.html new file mode 100644 index 0000000..192e20c --- /dev/null +++ b/templates/admin/player_detail.html @@ -0,0 +1,518 @@ +{% extends "admin/admin_base.html" %} +{% block title %}{{ profile.Username }} — KittyRec Admin{% endblock %} +{% block head %} + +{% endblock %} + +{% block content %} + + +
+
+
+ {{ profile.Username[0]|upper }} + +
Change
+
+ +
+

{{ profile.Username }} + {% if profile.Developer %}Dev{% endif %} + {% if profile.Banned %}Banned{% endif %} +

+
{{ profile.DisplayName }}  ·  ID #{{ profile.Id }}
+ {% if is_online %} +
Online{% if cur_session %} — {{ cur_session.name }}{% endif %}
+ {% else %} +
Offline
+ {% endif %} +
+
+ {% if is_online %} + + {% endif %} + {% if not profile.Banned %} + + {% elif SCOPE_ADMIN in scopes %} + + {% endif %} + {% if SCOPE_ADMIN in scopes %} + + + {% endif %} +
+
+ +
+
+
Level
+
{{ profile.Level }}
+
+
+
XP
+
{{ "{:,}".format(profile.XP) }}
+
+
+
Joined
+
{{ (profile.CreatedAt or '—')[:10] }}
+
+
+
Last Login
+
{{ (profile.LastLogin or '—')[:16].replace('T',' ') }}
+
+
+
Tokens
+
{{ "{:,}".format(profile.get('tokens') or profile.get('Tokens') or 0) }}
+
+
+
Bio
+
{{ profile.Bio or '—' }}
+
+ {% if profile.Banned %} +
+
Ban Reason
+
{{ profile.BanReason or '—' }}
+
+
+
Banned Until
+
{{ profile.BannedUntil or 'Permanent' }}
+
+ {% endif %} +
+
+ +
+ {% if SCOPE_ADMIN in scopes %} +
+

Admin Notes

+
+
+ + +
+
+ {% endif %} + +
+

Activity Timeline

+
+

Click Load to fetch activity

+
+
+ +
+

Ban Log

{{ ban_log|length }}
+ {% if ban_log %} + {% for b in ban_log %} +
+ {{ b.created_at[:16] if b.created_at else '—' }} + {% if b.action == 'ban' %}Ban{% else %}Unban{% endif %} + {{ b.reason or '—' }} + {{ b.admin_name or '—' }} +
+ {% endfor %} + {% else %} +

No ban history

+ {% endif %} +
+ +
+

Recent Gifts

{{ gifts|length }}
+ {% if gifts %} +
+ + + + {% for g in gifts[:20] %} + + + + + + + {% endfor %} + +
DateXPItemStatus
{{ g.created_at[:10] if g.created_at else '—' }}+{{ "{:,}".format(g.xp) }}{{ g.equipment_prefab_name or '—' }}{% if g.consumed %}Opened{% else %}Pending{% endif %}
+
+ {% else %} +

No gifts

+ {% endif %} +
+
+ +{% if SCOPE_ADMIN in scopes %} +
+
+

Security

+

Loading…

+
+
+

Discord

+

Loading…

+
+
+
+

Inventory

+

Click Load

+
+
+

Recent Chats

+

Click Load

+
+
+

Social Graph

+

Loading…

+
+
+

Gift Caps

+

Loading…

+
+
+
+

Settings

+
+ + + +
+
+

Loading…

+
+ + + +
+
+{% endif %} + +{% include 'admin/partials/ban_modal.html' %} + +{% if SCOPE_ADMIN in scopes %} +{% include 'admin/partials/gift_modal.html' %} +{% endif %} +{% endblock %} + +{% block scripts %} + +{% endblock %} diff --git a/templates/admin/players.html b/templates/admin/players.html new file mode 100644 index 0000000..5feeb3d --- /dev/null +++ b/templates/admin/players.html @@ -0,0 +1,234 @@ +{% extends "admin/admin_base.html" %} +{% block title %}Players — KittyRec Admin{% endblock %} +{% block head %} + +{% endblock %} + +{% block content %} + + + + +
+ +
+ + + + + + + + + {% for p in profiles %} + + + + + + + + + + + + + + {% endfor %} + +
IDPlayerDisplay NameLevelXPTokensStatusJoinedLast LoginActions
{{ p.id }} +
+
+ {{ p.username[0]|upper }} + +
+ {{ p.username }} +
+
{{ p.display_name }}Lv {{ p.level }}{{ "{:,}".format(p.xp) }}{{ "{:,}".format(p.tokens or 0) }} + {% if p.id in online_ids %} Online{% else %}Offline{% endif %} + {% if p.banned %}Banned{% endif %} + {% if p.developer %}Dev{% endif %} + {{ p.created_at[:10] if p.created_at else '—' }}{{ p.last_login[:10] if p.last_login else '—' }} +
+ + {% if p.id in online_ids %} + + {% endif %} + {% if not p.banned %} + + {% else %} + {% if SCOPE_ADMIN in scopes %} + + {% endif %} + {% endif %} + {% if SCOPE_ADMIN in scopes %} + + + {% endif %} +
+
+
+
+ +{% include 'admin/partials/ban_modal.html' %} +{% include 'admin/partials/gift_modal.html' %} +{% endblock %} + +{% block scripts %} + + +{% endblock %}