First Commit
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Add Custom Command</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Add a Custom Command</h1>
|
||||
<form action="{{ url_for('add_command') }}" method="POST">
|
||||
<label for="guild_id">Guild ID:</label>
|
||||
<input type="text" name="guild_id" required>
|
||||
|
||||
<label for="command_name">Command Name:</label>
|
||||
<input type="text" name="command_name" required>
|
||||
|
||||
<label for="response">Response:</label>
|
||||
<textarea name="response" required></textarea>
|
||||
|
||||
<button type="submit">Create Command</button>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Admin Controls</h1>
|
||||
<p>Manage bot permissions and other admin settings here.</p>
|
||||
<!-- Restrict this page to admins only -->
|
||||
{% endblock %}
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>AFK Management</h1>
|
||||
<form method="post">
|
||||
<label for="reason">Reason for AFK:</label>
|
||||
<input type="text" name="reason" id="reason">
|
||||
<button type="submit">Set AFK</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Discord Bot Dashboard</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<a href="{{ url_for('home') }}">Home</a>
|
||||
<a href="{{ url_for('afk') }}">AFK Management</a>
|
||||
<a href="{{ url_for('economy') }}">Economy</a>
|
||||
<a href="{{ url_for('admin_controls') }}">Admin</a>
|
||||
<a href="{{ url_for('settings') }}">Settings</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Economy Dashboard</h1>
|
||||
<p>Your Balance: {{ balance }}</p>
|
||||
<!-- Add more economy features here as needed -->
|
||||
{% endblock %}
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Guild Settings - {{ guild.name }}</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
<div class="container mt-5">
|
||||
<h1>Settings for {{ guild.name }}</h1>
|
||||
<div class="mb-3">
|
||||
<img src="{% if guild.icon %}https://cdn.discordapp.com/icons/{{ guild.id }}/{{ guild.icon }}.png{% else %}/static/default_guild_icon.png{% endif %}"
|
||||
alt="Guild Icon" class="img-thumbnail" width="100">
|
||||
</div>
|
||||
<ul class="list-group mb-4">
|
||||
<li class="list-group-item"><strong>Guild ID:</strong> {{ guild.id }}</li>
|
||||
<li class="list-group-item"><strong>Guild Name:</strong> {{ guild.name }}</li>
|
||||
<li class="list-group-item"><strong>Owner:</strong> {{ owner_name }}</li>
|
||||
<li class="list-group-item"><strong>Permissions:</strong> {{ guild.permissions }}</li>
|
||||
<li class="list-group-item"><strong>Member Count:</strong> {{ member_count }}</li>
|
||||
{% if guild.features %}
|
||||
<li class="list-group-item"><strong>Features:</strong> {{ guild.features|join(', ') }}</li>
|
||||
{% endif %}
|
||||
{% if guild.description %}
|
||||
<li class="list-group-item"><strong>Description:</strong> {{ guild.description }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if guild.roles %}
|
||||
<div class="mb-4">
|
||||
<h3>Roles</h3>
|
||||
<ul class="list-group">
|
||||
{% for role in guild.roles %}
|
||||
<li class="list-group-item">
|
||||
<strong>{{ role.name }}</strong>
|
||||
<span class="text-muted">(ID: {{ role.id }})</span>
|
||||
{% if role.permissions %}
|
||||
<br><small>Permissions: {{ role.permissions }}</small>
|
||||
{% endif %}
|
||||
{% if role.managed %}
|
||||
<span class="badge badge-info ml-2">Managed</span>
|
||||
{% endif %}
|
||||
{% if role.hoist %}
|
||||
<span class="badge badge-secondary ml-2">Hoisted</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="POST" action="{{ url_for('guild_settings', guild_id=guild.id) }}">
|
||||
<div class="form-group">
|
||||
<label for="guildName">Guild Name</label>
|
||||
<input type="text" class="form-control" id="guildName" name="guild_name" value="{{ guild.name }}"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="guildDescription">Description</label>
|
||||
<textarea class="form-control" id="guildDescription"
|
||||
name="guild_description">{{ guild.description }}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Save Settings</button>
|
||||
</form>
|
||||
|
||||
<a href="{{ url_for('home') }}" class="btn btn-secondary mt-3">Back to Home</a>
|
||||
</div>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Home</title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
<div class="container mt-5">
|
||||
<a href="{{ url_for('wallet') }}" class="btn btn-info mt-3">View Wallet</a>
|
||||
<a href="{{ url_for('transactions') }}" class="btn btn-info mt-3">View Transaction History</a>
|
||||
|
||||
<h1>Welcome, {{ user['username'] }}#{{ user['discriminator'] }}</h1>
|
||||
<img src="https://cdn.discordapp.com/avatars/{{ user['id'] }}/{{ user['avatar'] }}.png" alt="Avatar"
|
||||
class="img-thumbnail mb-3" width="100">
|
||||
|
||||
<p>Total Users: {{ stats.total_users }}</p>
|
||||
<p>Number of Servers: {{ stats.servers }}</p>
|
||||
|
||||
<h2>Your Servers:</h2>
|
||||
<ul class="list-group">
|
||||
{% for guild in guilds %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<a href="{{ url_for('guild_settings', guild_id=guild['id']) }}" class="text-decoration-none">
|
||||
<strong>{{ guild['name'] }}</strong> (ID: {{ guild['id'] }})
|
||||
</a>
|
||||
<small class="text-muted">Members: {{ guild.get('approx_member_count', 'N/A') }}</small>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="list-group-item">You are not in any servers.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<a href="{{ url_for('logout') }}" class="btn btn-danger mt-3">Logout</a>
|
||||
</div>
|
||||
<!-- Bootstrap JS and dependencies -->
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<title>Discord Bot Dashboard</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Discord Bot Dashboard</h1>
|
||||
<div id="info">
|
||||
<!-- User info will be displayed here -->
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='script.js') }}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+979
@@ -0,0 +1,979 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="fixed dark">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/static/icons/apple-touch-icon.png?v=6">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/icons/favicon-32x32.png?v=6">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/static/icons/favicon-16x16.png?v=6">
|
||||
<link rel="manifest" href="/static/icons/site.webmanifest?v=6">
|
||||
<link rel="mask-icon" href="/static/icons/safari-pinned-tab.svg?v=6" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="/static/icons/favicon.ico?v=6">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-config" content="/static/icons/browserconfig.xml?v=6">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<meta name="apple-mobile-web-app-title" content="YAGPDB">
|
||||
<meta name="application-name" content="YAGPDB">
|
||||
<meta name="msapplication-config" content="/static/icons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<meta property="og:title" content="YAGPDB" />
|
||||
<meta property="og:description" content="Yet Another General Purpose Discord Bot" />
|
||||
<title>YAGPDB - Control Panel | Py Test server</title>
|
||||
<meta name="keywords" content="YAGPDB Discord bot control panel" />
|
||||
<meta name="description" content="YAGPDB - Yet Another General Purpose Discord Bot">
|
||||
<meta name="author" content="jonas747">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light"
|
||||
rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="/static/vendorr/bootstrap/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="/static/vendorr/animate/animate.css">
|
||||
|
||||
<link rel="stylesheet" href="/static/vendorr/font-awesome/css/all.min.css" />
|
||||
<link rel="stylesheet" href="/static/vendorr/magnific-popup/magnific-popup.css" />
|
||||
<link rel="stylesheet" href="/static/vendorr/bootstrap-datepicker/css/bootstrap-datepicker3.css" />
|
||||
|
||||
<link rel="stylesheet" href="/static/vendorr/select2/css/select2.css" />
|
||||
<link rel="stylesheet" href="/static/vendorr/select2-bootstrap-theme/select2-bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="/static/vendorr/bootstrap-multiselect/bootstrap-multiselect.css" />
|
||||
<link rel="stylesheet" href="/static/vendorr/pnotify/pnotify.custom.css" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/css/theme.css?1730494578" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/css/skins/default.css" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/css/custom.css?1730494578">
|
||||
|
||||
|
||||
<script src="/static/vendorr/modernizr/modernizr.js"></script>
|
||||
|
||||
<script src="/static/vendorr/jquery/jquery.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="loading-overlay">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">
|
||||
Loading...
|
||||
</h2>
|
||||
</header>
|
||||
<div class="card-body d-flex align-items-center">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<section class="body">
|
||||
|
||||
|
||||
<header class="header">
|
||||
<div class="logo-container">
|
||||
<a href="/manage" class="logo">
|
||||
<img src="/static/img/avatar.png" height="35" alt="YAGPDB" />
|
||||
</a>
|
||||
<div class="d-md-none toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html"
|
||||
data-fire-event="sidebar-left-opened">
|
||||
<i class="fas fa-bars" aria-label="Toggle sidebar"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="header-right">
|
||||
|
||||
|
||||
|
||||
<span class="separator"></span>
|
||||
|
||||
<ul class="notifications">
|
||||
<li>
|
||||
<a href="#" onclick="toggleTheme()" target="_blank" class="notification-icon"
|
||||
data-toggle="tooltip" data-placement="bottom" title=""
|
||||
data-original-title="Toggle light/dark theme">
|
||||
<i class="fas fa-lightbulb"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://discord.gg/4udtcA5" target="_blank" class="notification-icon"
|
||||
data-toggle="tooltip" data-placement="bottom" title=""
|
||||
data-original-title="YAGPDB Community and support server">
|
||||
<i class="fab fa-discord"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/manage" class="notification-icon" data-toggle="tooltip" data-placement="bottom"
|
||||
title="" data-original-title="News and updates">
|
||||
<i class="far fa-newspaper"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://help.yagpdb.xyz/" class="notification-icon" target="_blank"
|
||||
data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Documentation">
|
||||
<i class="fas fa-question"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/status" class="notification-icon" data-toggle="tooltip" data-placement="bottom"
|
||||
title="" data-original-title="Status">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="separator"></span>
|
||||
|
||||
|
||||
<div id="server-selection" class="userbox">
|
||||
<a href="#" data-toggle="dropdown">
|
||||
<figure class="profile-picture">
|
||||
|
||||
<img src="/static/img/questionmark.png" alt="Server Icon" class="rounded-circle" />
|
||||
|
||||
</figure>
|
||||
<div class="profile-info" data-lock-name="Server Name">
|
||||
<span class="name">Py Test server</span>
|
||||
<span class="role">loading....</span>
|
||||
</div>
|
||||
<i class="fa custom-caret"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu">
|
||||
<ul class="list-unstyled mb-2" style="max-height: 500px; overflow-y: auto;">
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a role="menuitem" tabindex="-1" href="#"><i class="fas fa-wrench"></i>Loading your
|
||||
servers</a>
|
||||
</li>
|
||||
<li>
|
||||
<a role="menuitem" tabindex="-1" href="#"><i class="fas fa-wrench"></i>Please wait, or
|
||||
refresh
|
||||
the page if broken.</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
loadWidget("server-selection", "/manage/1193182989211926558/guild_selection");
|
||||
});
|
||||
</script>
|
||||
|
||||
<span class="separator"></span>
|
||||
|
||||
<div id="userbox" class="userbox">
|
||||
<a href="#" data-toggle="dropdown">
|
||||
<figure class="profile-picture">
|
||||
<img src="https://cdn.discordapp.com/avatars/601579326714019840/e59bbcd38596410c2c0e9976989a9288?size=64"
|
||||
alt="Joseph Doe" class="rounded-circle" data-lock-picture="img/!logged-user.jpg" />
|
||||
</figure>
|
||||
<div class="profile-info" data-lock-name="nobody2503" data-lock-email="">
|
||||
<span class="name">Nobody2503</span>
|
||||
<span class="role">Foreboding</span>
|
||||
</div>
|
||||
|
||||
<i class="fa custom-caret"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu">
|
||||
<ul class="list-unstyled mb-2">
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a role="menuitem" tabindex="-1" href="/logout"><i class="fas fa-power-off"></i>
|
||||
Logout</a>
|
||||
</li>
|
||||
<li>
|
||||
<a role="menuitem" tabindex="-1" href="/premium"><i class="fas fa-crown"></i>
|
||||
Premium</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<div class="inner-wrapper">
|
||||
|
||||
<style>
|
||||
@media(min-width: 768px) {
|
||||
#sidebar-left {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<aside id="sidebar-left" class="sidebar-left">
|
||||
|
||||
<div class="sidebar-header">
|
||||
<div class="sidebar-title">
|
||||
Navigation
|
||||
</div>
|
||||
<div class="sidebar-toggle d-none d-md-block" data-toggle-class="sidebar-left-collapsed"
|
||||
data-target="html" data-fire-event="sidebar-left-toggle">
|
||||
<i class="fas fa-bars" aria-label="Toggle sidebar"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nano">
|
||||
<div class="nano-content">
|
||||
<nav id="menu" class="nav-main" role="navigation">
|
||||
<ul class="nav nav-main">
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/home">
|
||||
<i class="fas fa-home" aria-hidden="true"></i>
|
||||
<span>Home</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-parent">
|
||||
<a class="nav-link" href="#">
|
||||
<i class="fas fa-cogs" aria-hidden="true"></i>
|
||||
<span>Core</span>
|
||||
</a>
|
||||
<ul class="nav nav-children">
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/core">
|
||||
<i class="fas fa-cog" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Control panel access</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/cplogs">
|
||||
<i class="fas fa-database" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Control panel logs</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/commands/settings">
|
||||
<i class="fas fa-terminal" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Command settings</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-parent">
|
||||
<a class="nav-link" href="#">
|
||||
<i class="fas fa-closed-captioning" aria-hidden="true"></i>
|
||||
<span>Custom Commands</span>
|
||||
</a>
|
||||
<ul class="nav nav-children">
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/customcommands">
|
||||
<i class="fas fa-code" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Commands</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/customcommands/database">
|
||||
<i class="fas fa-database" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Database</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-parent">
|
||||
<a class="nav-link" href="#">
|
||||
<i class="fas fa-user-shield" aria-hidden="true"></i>
|
||||
<span>Moderation</span>
|
||||
</a>
|
||||
<ul class="nav nav-children">
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/moderation">
|
||||
<i class="fas fa-gavel" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Moderation</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/automod_legacy">
|
||||
<i class="fas fa-robot" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Basic Automoderator</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/automod">
|
||||
<i class="fas fa-robot" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Advanced Automoderator</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/logging/">
|
||||
<i class="fas fa-database" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Logging</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/verification">
|
||||
<i class="fas fa-address-card" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Verification</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-parent ">
|
||||
<a class="nav-link" href="#">
|
||||
<i class="fas fa-rss" aria-hidden="true"></i>
|
||||
<span>Notifications & Feeds</span>
|
||||
</a>
|
||||
<ul class="nav nav-children">
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/notifications/general">
|
||||
<i class="fas fa-bell" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>General</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/reddit">
|
||||
<i class="fab fa-reddit" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Reddit</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/streaming">
|
||||
<i class="fas fa-video" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Streaming</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/youtube">
|
||||
<i class="fab fa-youtube" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Youtube</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-parent">
|
||||
<a class="nav-link" href="#">
|
||||
<i class="fas fa-bolt" aria-hidden="true"></i>
|
||||
<span>Tools & Utilities</span>
|
||||
</a>
|
||||
<ul class="nav nav-children">
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/autorole">
|
||||
<i class="fas fa-user-plus" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Autorole</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/rolecommands/">
|
||||
<i class="fas fa-tags" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Role Commands</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/tickets/settings">
|
||||
<i class="fas fa-ticket-alt" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Ticket System</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-parent">
|
||||
<a class="nav-link" href="#">
|
||||
<i class="fas fa-trophy" aria-hidden="true"></i>
|
||||
<span>Fun</span>
|
||||
</a>
|
||||
<ul class="nav nav-children">
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/reputation">
|
||||
<i class="fas fa-angry" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Reputation</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a class="nav-link" data-partial-load="true"
|
||||
href="/manage/1193182989211926558/soundboard/">
|
||||
<i class="fas fa-border-all" aria-hidden="true"></i>
|
||||
|
||||
|
||||
<span>Soundboard</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="mt-5">
|
||||
<a class="nav-link" href="https://help.yagpdb.xyz/" target="_blank">
|
||||
<i class="fas fa-question" aria-hidden="true"></i>
|
||||
<span>Documentation</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section role="main" id="main-content" class="content-body">
|
||||
|
||||
|
||||
<header class="page-header">
|
||||
<h2>Combined Overview</h2>
|
||||
</header>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
showAlerts("null");
|
||||
$.getJSON("https://srhpyqt94yxb.statuspage.io/api/v2/incidents/unresolved.json", function (data) {
|
||||
if (data.incidents) {
|
||||
data.incidents.forEach(function (incident) {
|
||||
const incidentLink = `<a href="${incident.shortlink}" target="_blank">${incident.name}</a>`
|
||||
addAlertHTML("warning", `Discord's ${incident.status} an incident: ${incidentLink}. Functionality may be limited.`);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
async function startShardOfflineChecker() {
|
||||
if (typeof window.offlineShardCheckerInterval !== 'undefined') {
|
||||
clearInterval(window.offlineShardCheckerInterval);
|
||||
}
|
||||
|
||||
let wasOnline = await checkGuildShardOnline();
|
||||
window.offlineShardCheckerInterval = setInterval(async () => {
|
||||
const currentlyOnline = await checkGuildShardOnline();
|
||||
|
||||
|
||||
|
||||
|
||||
if (!wasOnline && !currentlyOnline) {
|
||||
upsertAlert(
|
||||
"The shard the bot is on for your server is currently offline; some functionality may not work as expected. \
|
||||
Join the support server for more information if this issue persists."
|
||||
);
|
||||
} else {
|
||||
$("#shard-problems-warning").remove();
|
||||
}
|
||||
|
||||
wasOnline = currentlyOnline;
|
||||
}, 15_000);
|
||||
}
|
||||
|
||||
async function checkGuildShardOnline() {
|
||||
const status = await fetch("/api/1193182989211926558/status.json").then((resp) => resp.json());
|
||||
return status.shard_online;
|
||||
}
|
||||
|
||||
function upsertAlert(msg) {
|
||||
if ($("#shard-problems-warning").length) {
|
||||
$("#shard-problems-warning alert").text(msg);
|
||||
} else {
|
||||
addAlert("warning", msg, "shard-problems-warning");
|
||||
}
|
||||
}
|
||||
|
||||
startShardOfflineChecker();
|
||||
|
||||
})
|
||||
</script>
|
||||
<div id="alerts">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h2>Core</h2>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-control_panel">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Control Panel</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-premium">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Premium</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-commands">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Commands</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-custom_commands">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Custom Commands</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Moderation</h2>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-moderation">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Moderation</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-legacy_automod">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Basic Automoderator</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-automod_v2">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Advanced Automoderator</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Misc</h2>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-reputation">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Reputation</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-streaming">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Streaming</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-logging">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Logging</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-autorole">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Autorole</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-soundboard">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Soundboard</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-role_commands">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">RoleCommands</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-tickets">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Tickets</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-verification">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Verification</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Feeds</h2>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-notifications">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">General Notifications</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-reddit">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Reddit</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-4" id="home-widget-youtube">
|
||||
<section class="card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-title">Youtube</h2>
|
||||
</header>
|
||||
<div class="card-body">
|
||||
Loading...
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
|
||||
loadWidget("home-widget-control_panel", "/manage/1193182989211926558/homewidgets/control_panel")
|
||||
|
||||
loadWidget("home-widget-premium", "/manage/1193182989211926558/homewidgets/premium")
|
||||
|
||||
loadWidget("home-widget-commands", "/manage/1193182989211926558/homewidgets/commands")
|
||||
|
||||
loadWidget("home-widget-custom_commands", "/manage/1193182989211926558/homewidgets/custom_commands")
|
||||
|
||||
loadWidget("home-widget-moderation", "/manage/1193182989211926558/homewidgets/moderation")
|
||||
|
||||
loadWidget("home-widget-legacy_automod", "/manage/1193182989211926558/homewidgets/legacy_automod")
|
||||
|
||||
loadWidget("home-widget-automod_v2", "/manage/1193182989211926558/homewidgets/automod_v2")
|
||||
|
||||
loadWidget("home-widget-reputation", "/manage/1193182989211926558/homewidgets/reputation")
|
||||
|
||||
loadWidget("home-widget-streaming", "/manage/1193182989211926558/homewidgets/streaming")
|
||||
|
||||
loadWidget("home-widget-logging", "/manage/1193182989211926558/homewidgets/logging")
|
||||
|
||||
loadWidget("home-widget-autorole", "/manage/1193182989211926558/homewidgets/autorole")
|
||||
|
||||
loadWidget("home-widget-soundboard", "/manage/1193182989211926558/homewidgets/soundboard")
|
||||
|
||||
loadWidget("home-widget-role_commands", "/manage/1193182989211926558/homewidgets/role_commands")
|
||||
|
||||
loadWidget("home-widget-tickets", "/manage/1193182989211926558/homewidgets/tickets")
|
||||
|
||||
loadWidget("home-widget-verification", "/manage/1193182989211926558/homewidgets/verification")
|
||||
|
||||
loadWidget("home-widget-notifications", "/manage/1193182989211926558/homewidgets/notifications")
|
||||
|
||||
loadWidget("home-widget-reddit", "/manage/1193182989211926558/homewidgets/reddit")
|
||||
|
||||
loadWidget("home-widget-youtube", "/manage/1193182989211926558/homewidgets/youtube")
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
<div id="unsaved-changes-popup" hidden>
|
||||
<div id="unsaved-changes-popup-container">
|
||||
<p id="unsaved-changes-message" class="mb-0">blablablablabla</p>
|
||||
<input id="unsaved-changes-save-button" type="button" class="btn btn-success ml-3" value="Save!"
|
||||
onclick="saveUnsavedChanges()">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var visibleURL;
|
||||
|
||||
|
||||
var CURRENT_GUILDID = "1193182989211926558";
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script src="/static/vendorr/jquery-browser-mobile/jquery.browser.mobile.js"></script>
|
||||
<script src="/static/vendorr/popper/umd/popper.min.js"></script>
|
||||
<script src="/static/vendorr/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="/static/vendorr/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="/static/vendorr/common/common.js"></script>
|
||||
<script src="/static/vendorr/nanoscroller/nanoscroller.js"></script>
|
||||
<script src="/static/vendorr/magnific-popup/jquery.magnific-popup.js"></script>
|
||||
<script src="/static/vendorr/jquery-placeholder/jquery-placeholder.js"></script>
|
||||
<script src="/static/vendorr/select2/js/select2.js"></script>
|
||||
<script src="/static/vendorr/bootstrap-multiselect/bootstrap-multiselect.js?4"></script>
|
||||
<script src="/static/vendorr/pnotify/pnotify.custom.js"></script>
|
||||
|
||||
|
||||
<script src="/static/js/theme.js"></script>
|
||||
|
||||
|
||||
<script src="/static/js/custom.js"></script>
|
||||
|
||||
|
||||
<script src="/static/js/theme.init.js"></script>
|
||||
|
||||
<script src="/static/js/spongebob.js?1730494578"></script>
|
||||
|
||||
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
|
||||
ga('create', 'UA-63610773-2', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
var observer = new MutationObserver(function (mutations) {
|
||||
$("a").filter(function () {
|
||||
return this.host !== location.host
|
||||
}).attr("target", "_blank");
|
||||
});
|
||||
observer.observe(document.querySelector("body"), { childList: true, subtree: true });
|
||||
</script>
|
||||
|
||||
</html>
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>List Commands</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Custom Commands</h1>
|
||||
<ul>
|
||||
{% for command in commands %}
|
||||
<li>
|
||||
<strong>{{ command.command_name }}</strong>: {{ command.response }}
|
||||
<form action="{{ url_for('delete_command', command_id=command.id) }}" method="POST" style="display:inline;">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('home') }}">Back to Home</a>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Main Page</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
<div class="container mt-5 text-center">
|
||||
<h1>Welcome to the Discord Bot Management Application</h1>
|
||||
<p class="lead">Manage your Discord servers efficiently and effectively!</p>
|
||||
|
||||
<h2>Features:</h2>
|
||||
<ul class="list-unstyled">
|
||||
<li>✔️ Add and configure bots</li>
|
||||
<li>✔️ View your wallet and transactions</li>
|
||||
<li>✔️ Manage server settings</li>
|
||||
<li>✔️ Monitor server statistics</li>
|
||||
</ul>
|
||||
|
||||
<a href="{{ url_for('login') }}" class="btn btn-primary btn-lg">Login with Discord</a>
|
||||
<p class="mt-3">Already have an account? Log in to access your servers and manage your bots.</p>
|
||||
|
||||
<h3>Getting Started</h3>
|
||||
<p>Follow the steps below to begin:</p>
|
||||
<ol class="list-unstyled">
|
||||
<li>1. Click the button above to log in with your Discord account.</li>
|
||||
<li>2. Grant the required permissions for bot management.</li>
|
||||
<li>3. Start managing your servers and bots!</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Settings</h1>
|
||||
<p>Customize your dashboard experience here.</p>
|
||||
<!-- Add user-specific settings options here -->
|
||||
{% endblock %}
|
||||
Executable
+181
@@ -0,0 +1,181 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Transaction History</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <!-- Include Chart.js -->
|
||||
<style>
|
||||
body {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table {
|
||||
border-radius: 0.5rem;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.table thead th {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.table tbody tr:hover {
|
||||
background-color: #e2e6ea;
|
||||
}
|
||||
|
||||
.table tbody td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.amount-positive {
|
||||
color: rgb(0, 185, 0);
|
||||
}
|
||||
|
||||
.amount-negative {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.btn-back {
|
||||
margin-top: 20px;
|
||||
background-color: #6c757d;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-back:hover {
|
||||
background-color: #5a6268;
|
||||
}
|
||||
|
||||
/* Set a fixed height for the chart */
|
||||
#transactionChart {
|
||||
width: 100%;
|
||||
/* Fill the width of the parent container */
|
||||
height: 400px;
|
||||
/* Fixed height */
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
position: relative;
|
||||
margin: auto;
|
||||
height: 400px;
|
||||
/* Set height for the chart container */
|
||||
width: 80%;
|
||||
/* Adjust width as needed */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
<div class="container mt-5">
|
||||
<h1>Transaction History for {{ user['username'] }}#{{ user['discriminator'] }}</h1>
|
||||
|
||||
<!-- Chart Container -->
|
||||
<div class="chart-container">
|
||||
<canvas id="transactionChart"></canvas>
|
||||
</div>
|
||||
<form method="get" action="{{ url_for('transactions') }}">
|
||||
<label for="sort">Sort by:</label>
|
||||
<select name="sort" id="sort">
|
||||
<option value="date" {% if sort_by=='date' %}selected{% endif %}>Date</option>
|
||||
<option value="amount" {% if sort_by=='amount' %}selected{% endif %}>Amount</option>
|
||||
<!-- Add more sorting options as needed -->
|
||||
</select>
|
||||
|
||||
<label for="order">Order:</label>
|
||||
<select name="order" id="order">
|
||||
<option value="asc" {% if order=='asc' %}selected{% endif %}>Ascending</option>
|
||||
<option value="desc" {% if order=='desc' %}selected{% endif %}>Descending</option>
|
||||
</select>
|
||||
|
||||
<button type="submit">Sort</button>
|
||||
</form>
|
||||
|
||||
|
||||
<table class="table table-bordered mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Amount</th>
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for transaction in transactions %}
|
||||
<tr>
|
||||
<td>{{ transaction.TYPE }}</td>
|
||||
<td class="{% if transaction.amount < 0 %}amount-negative{% else %}amount-positive{% endif %}">
|
||||
${{ transaction.amount }}</td>
|
||||
<td>{{ transaction.TIME.strftime('%Y-%m-%d %H:%M:%S') }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="3" class="text-center">No transactions found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ url_for('wallet') }}" class="btn btn-secondary mt-3">Back to Wallet</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Assuming `dates` and `totals` are provided correctly from Flask.
|
||||
const dates = {{ dates | tojson }};
|
||||
const totals = {{ totals | tojson }};
|
||||
|
||||
// Log the dates and totals to the console for debugging
|
||||
console.log("Dates:", dates);
|
||||
console.log("Totals:", totals);
|
||||
|
||||
// Ensure dates are properly formatted
|
||||
const formattedDates = dates.map(date => new Date(date).toLocaleDateString());
|
||||
|
||||
// Chart.js code
|
||||
const ctx = document.getElementById('transactionChart').getContext('2d');
|
||||
const transactionChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: formattedDates,
|
||||
datasets: [{
|
||||
label: 'Daily Transaction Totals',
|
||||
data: totals,
|
||||
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
||||
borderColor: 'rgba(75, 192, 192, 1)',
|
||||
borderWidth: 1,
|
||||
fill: true,
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: true, // Maintain aspect ratio
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Amount ($)'
|
||||
}
|
||||
},
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Date'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Wallet</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="bg-light">
|
||||
<div class="container mt-5">
|
||||
<h1>Wallet for {{ user['username'] }}#{{ user['discriminator'] }}</h1>
|
||||
<h2>Your Balances:</h2>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Wallet: ${{ balance.wallet }}</li>
|
||||
<li class="list-group-item">Bank: ${{ balance.bank }}</li>
|
||||
</ul>
|
||||
|
||||
<a href="{{ url_for('home') }}" class="btn btn-secondary mt-3">Back to Home</a>
|
||||
</div>
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user