2025-05-03 14:47:22 -06:00

86 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bot Dashboard</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Discord Bot Dashboard</h1>
<div id="auth-section">
<button id="login-button">Login with Discord</button>
</div>
<div id="dashboard-section" style="display: none;">
<h2>Welcome, <span id="username">User</span>!</h2>
<button id="logout-button">Logout</button>
<hr>
<h3>Manage Server Settings</h3>
<label for="guild-select">Select Server:</label>
<select name="guilds" id="guild-select">
<option value="">--Please choose a server--</option>
</select>
<div id="settings-form" style="display: none;">
<h4>Prefix</h4>
<label for="prefix-input">Command Prefix:</label>
<input type="text" id="prefix-input" name="prefix" maxlength="10">
<button id="save-prefix-button">Save Prefix</button>
<p id="prefix-feedback"></p>
<h4>Welcome Messages</h4>
<label for="welcome-channel">Welcome Channel ID:</label> <!-- Changed label -->
<input type="text" id="welcome-channel" name="welcome_channel_id" placeholder="Enter Channel ID"> <!-- Changed to text input -->
<br>
<label for="welcome-message">Welcome Message Template:</label><br>
<textarea id="welcome-message" name="welcome_message" rows="4" cols="50" placeholder="Use {user} for mention, {username} for name, {server} for server name."></textarea><br>
<button id="save-welcome-button">Save Welcome Settings</button>
<button id="disable-welcome-button">Disable Welcome</button>
<p id="welcome-feedback"></p>
<h4>Goodbye Messages</h4>
<label for="goodbye-channel">Goodbye Channel ID:</label> <!-- Changed label -->
<input type="text" id="goodbye-channel" name="goodbye_channel_id" placeholder="Enter Channel ID"> <!-- Changed to text input -->
<br>
<label for="goodbye-message">Goodbye Message Template:</label><br>
<textarea id="goodbye-message" name="goodbye_message" rows="4" cols="50" placeholder="Use {username} for name, {server} for server name."></textarea><br>
<button id="save-goodbye-button">Save Goodbye Settings</button>
<button id="disable-goodbye-button">Disable Goodbye</button>
<p id="goodbye-feedback"></p>
<h4>Enabled Modules (Cogs)</h4>
<div id="cogs-list">
<!-- Cog checkboxes will be populated by JS -->
</div>
<button id="save-cogs-button">Save Module Settings</button>
<p id="cogs-feedback"></p>
<h4>Command Permissions</h4>
<label for="command-select">Command:</label>
<select id="command-select">
<!-- TODO: Populate commands dynamically -->
<option value="">-- Select Command --</option>
</select>
<label for="role-select">Role:</label>
<select id="role-select">
<!-- TODO: Populate roles dynamically -->
<option value="">-- Select Role --</option>
</select>
<button id="add-perm-button">Allow Role</button>
<button id="remove-perm-button">Disallow Role</button>
<div id="current-perms">
<!-- Current permissions will be listed here -->
</div>
<p id="perms-feedback"></p>
</div>
</div>
<script src="script.js"></script>
</body>
</html>