Skip to content

Commit 4740836

Browse files
committed
Rebrand Pterodactyl to Pyrodactyl across all files
1 parent 53856fa commit 4740836

7 files changed

Lines changed: 40 additions & 40 deletions

File tree

public/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ tbody tr:hover {
11171117
}
11181118
}
11191119

1120-
/* ===== PTERODACTYL PAGE ===== */
1120+
/* ===== PYRODACTYL PAGE ===== */
11211121
.ptero-grid {
11221122
max-width: 640px;
11231123
}

public/js/app.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ async function renderDashboard() {
383383
Create Server
384384
</a>
385385
<div class="nav-section-label">Links</div>
386-
<a class="nav-item" data-page="pterodactyl" href="/pterodactyl">
386+
<a class="nav-item" data-page="pyrodactyl" href="/pyrodactyl">
387387
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 7v10c0 2 1 3 3 3h10c2 0 3-1 3-3V7M9 6V5a2 2 0 012-2h2a2 2 0 012 2v1M9 12h6M9 16h4"/></svg>
388388
Open Pyrodactyl
389389
</a>
@@ -425,7 +425,7 @@ async function renderDashboard() {
425425
<div class="page active" id="page-overview"></div>
426426
<div class="page" id="page-servers"></div>
427427
<div class="page" id="page-create"></div>
428-
<div class="page" id="page-pterodactyl"></div>
428+
<div class="page" id="page-pyrodactyl"></div>
429429
<div class="page" id="page-account"></div>
430430
<div class="page" id="page-server-detail"></div>
431431
<div class="page" id="page-log"></div>
@@ -494,7 +494,7 @@ function navigateTo(page) {
494494
if (basePage === 'overview') renderOverview();
495495
else if (basePage === 'servers') renderServers();
496496
else if (basePage === 'create') renderCreateServer();
497-
else if (basePage === 'pterodactyl') renderPterodactyl();
497+
else if (basePage === 'pyrodactyl') renderPyrodactyl();
498498
else if (basePage === 'account') {
499499
if (param === 'edit') renderAccountEdit();
500500
else if (param === 'links') renderAccountLinks();
@@ -536,7 +536,7 @@ window.addEventListener('popstate', () => {
536536
if (basePage === 'overview') renderOverview();
537537
else if (basePage === 'servers') renderServers();
538538
else if (basePage === 'create') renderCreateServer();
539-
else if (basePage === 'pterodactyl') renderPterodactyl();
539+
else if (basePage === 'pyrodactyl') renderPyrodactyl();
540540
else if (basePage === 'account') {
541541
if (param === 'edit') renderAccountEdit();
542542
else if (param === 'links') renderAccountLinks();
@@ -892,8 +892,8 @@ function renderServerRow(s) {
892892
</td>
893893
<td>
894894
<div style="display:flex;gap:6px">
895-
<a class="btn btn-ghost btn-sm" href="/server/${s.id}" onclick="event.preventDefault();navigateTo('server/${s.id}')">Manage</a>
896-
<a href="https://panel.zero-host.org/server/${s.identifier}" target="_blank" class="btn btn-ghost btn-sm">Open Pterodactyl</a>
895+
<a class="btn btn-ghost btn-sm" href="/server/${s.id}" onclick="event.preventDefault();navigateTo('server/${s.id}')">Settings</a>
896+
<a href="https://panel.zero-host.org/server/${s.identifier}" target="_blank" class="btn btn-ghost btn-sm">Open Pyrodactyl</a>
897897
${canRenew ? html`
898898
<button class="btn btn-primary btn-sm btn-renew-server" data-server-id="${s.id}">Renew</button>
899899
` : ''}
@@ -1139,25 +1139,25 @@ async function handleCreateServer(e) {
11391139
}
11401140
}
11411141

1142-
// ===== PTERODACTYL PAGE =====
1142+
// ===== PYRODACTYL PAGE =====
11431143
let pteroTimeout = null;
11441144

1145-
function renderPterodactyl() {
1145+
function renderPyrodactyl() {
11461146
if (pteroTimeout) clearTimeout(pteroTimeout);
1147-
const el = $('#page-pterodactyl');
1147+
const el = $('#page-pyrodactyl');
11481148
el.innerHTML = html`
11491149
<div class="page-header">
1150-
<h1 class="page-title">Pterodactyl Panel</h1>
1150+
<h1 class="page-title">Pyrodactyl Panel</h1>
11511151
<p class="page-subtitle">Redirecting to the panel in 5 seconds...</p>
11521152
</div>
11531153
<div class="ptero-grid">
11541154
<div class="card ptero-card">
11551155
<div class="ptero-card-icon">
11561156
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 7v10c0 2 1 3 3 3h10c2 0 3-1 3-3V7M9 6V5a2 2 0 012-2h2a2 2 0 012 2v1M9 12h6M9 16h4"/></svg>
11571157
</div>
1158-
<h2 class="ptero-card-title">Opening Pterodactyl...</h2>
1158+
<h2 class="ptero-card-title">Opening Pyrodactyl...</h2>
11591159
<p class="ptero-card-desc">
1160-
You are being redirected to the Pterodactyl panel. If nothing happens, click the button below.
1160+
You are being redirected to the Pyrodactyl panel. If nothing happens, click the button below.
11611161
</p>
11621162
<div class="ptero-info" style="margin-bottom:24px">
11631163
<div class="ptero-info-item">
@@ -1302,9 +1302,9 @@ function renderAccountEdit() {
13021302
</div>
13031303
13041304
<div class="card">
1305-
<h2 class="card-title" style="margin-bottom:20px">Pterodactyl API Key</h2>
1305+
<h2 class="card-title" style="margin-bottom:20px">Pyrodactyl API Key</h2>
13061306
<p style="color:var(--text-secondary);font-size:0.85rem;line-height:1.6;margin-bottom:16px">
1307-
Add your Pterodactyl Client API key to enable live resource monitoring and server power state detection directly in the dashboard.
1307+
Add your Pyrodactyl Client API key to enable live resource monitoring and server power state detection directly in the dashboard.
13081308
Generate one at <a href="https://panel.zero-host.org/account/api" target="_blank">panel.zero-host.org/account/api</a>.
13091309
</p>
13101310
<form id="api-key-form" style="max-width:480px">
@@ -1349,7 +1349,7 @@ async function handleSaveApiKey(e) {
13491349
status.textContent = 'API key saved successfully!';
13501350
status.style.color = 'var(--accent-green)';
13511351
input.value = '';
1352-
showToast('Pterodactyl API key saved', 'success');
1352+
showToast('Pyrodactyl API key saved', 'success');
13531353
} catch (err) {
13541354
status.textContent = err.message;
13551355
status.style.color = 'var(--accent-red)';
@@ -1664,7 +1664,7 @@ async function renderServerDetail(serverId) {
16641664
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3"/></svg>
16651665
<div>
16661666
<h3 class="action-card-title">Open Panel</h3>
1667-
<p class="action-card-desc">Access the full Pterodactyl control panel to manage files, console, databases, schedules, and more.</p>
1667+
<p class="action-card-desc">Access the full Pyrodactyl control panel to manage files, console, databases, schedules, and more.</p>
16681668
</div>
16691669
</div>
16701670
<a href="https://panel.zero-host.org/server/${s.identifier}" target="_blank" class="btn btn-primary btn-full">Open Panel</a>
@@ -1722,7 +1722,7 @@ async function fetchLiveResources(identifier) {
17221722
<div class="empty-state" style="padding:24px">
17231723
<div class="empty-state-title" style="font-size:0.95rem">No live data</div>
17241724
<div class="empty-state-desc" style="font-size:0.82rem">
1725-
${data.error || 'Add your Pterodactyl API key in Account → Linked Accounts to enable live monitoring.'}
1725+
${data.error || 'Add your Pyrodactyl API key in Account → Linked Accounts to enable live monitoring.'}
17261726
</div>
17271727
<button class="btn btn-primary btn-sm" onclick="navigateTo('account/edit')" style="margin-top:8px;width:auto">Configure API Key</button>
17281728
</div>

routes/auth.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import jwt from 'jsonwebtoken';
33
import argon2 from 'argon2';
44
import { query } from '../config/db.js';
55
import { generateToken, authenticateToken } from '../middleware/auth.js';
6-
import { createPteroUser, updatePteroPassword, updatePteroEmail, deletePteroUser, getServersByUser, deletePteroServer } from '../services/pterodactyl.js';
6+
import { createPteroUser, updatePteroPassword, updatePteroEmail, deletePteroUser, getServersByUser, deletePteroServer } from '../services/pyrodactyl.js';
77
import { verifyCap } from '../config/cap.js';
88
import { logActivity } from '../services/activity.js';
99

@@ -148,7 +148,7 @@ router.post('/register', async (req, res) => {
148148
console.error('Register error:', err.message);
149149
if (createdPteroUserId) {
150150
deletePteroUser(createdPteroUserId).catch(e =>
151-
console.error('Failed to clean up Pterodactyl user after registration failure:', e.message)
151+
console.error('Failed to clean up Pyrodactyl user after registration failure:', e.message)
152152
);
153153
}
154154
if (err.message.includes('already exists') || err.message.includes('already been taken')) {
@@ -261,7 +261,7 @@ router.post('/change-password', authenticateToken, async (req, res) => {
261261
try {
262262
await updatePteroPassword(pteroId, newPassword);
263263
} catch (err) {
264-
console.error('Failed to update Pterodactyl password:', err.message);
264+
console.error('Failed to update Pyrodactyl password:', err.message);
265265
}
266266

267267
logActivity(req.user.userId, 'password_changed', 'Changed password');
@@ -304,11 +304,11 @@ router.post('/change-email', authenticateToken, async (req, res) => {
304304
return res.status(409).json({ error: 'Email is already in use' });
305305
}
306306

307-
// Update Pterodactyl
307+
// Update Pyrodactyl
308308
try {
309309
await updatePteroEmail(pteroId, newEmail);
310310
} catch (err) {
311-
console.error('Failed to update Pterodactyl email:', err.message);
311+
console.error('Failed to update Pyrodactyl email:', err.message);
312312
return res.status(500).json({ error: 'Failed to update email on panel' });
313313
}
314314

@@ -370,7 +370,7 @@ router.post('/delete-account', authenticateToken, async (req, res) => {
370370
// Delete from local DB first (cascades to user_ips)
371371
await query('DELETE FROM users WHERE id = ?', [user.id]);
372372

373-
// Then try to clean up Pterodactyl (best effort)
373+
// Then try to clean up Pyrodactyl (best effort)
374374
if (pteroId) {
375375
try {
376376
const servers = await getServersByUser(pteroId);
@@ -388,7 +388,7 @@ router.post('/delete-account', authenticateToken, async (req, res) => {
388388
try {
389389
await deletePteroUser(pteroId);
390390
} catch (err) {
391-
console.error('Failed to delete Pterodactyl user:', err.message);
391+
console.error('Failed to delete Pyrodactyl user:', err.message);
392392
}
393393
}
394394

@@ -441,8 +441,8 @@ router.get('/export-data', authenticateToken, async (req, res) => {
441441
firstName: user.first_name,
442442
lastName: user.last_name,
443443
createdAt: user.created_at,
444-
pterodactylId: user.ptero_user_id,
445-
pterodactylUuid: user.ptero_uuid,
444+
pyrodactylId: user.ptero_user_id,
445+
pyrodactylUuid: user.ptero_uuid,
446446
},
447447
security: {
448448
loggedIpAddresses: ips.map(ip => ({

routes/servers.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
unsuspendPteroServer,
1111
getEgg,
1212
getAllEggs,
13-
} from '../services/pterodactyl.js';
14-
import { PTERO_URL } from '../config/pterodactyl.js';
13+
} from '../services/pyrodactyl.js';
14+
import { PTERO_URL } from '../config/pyrodactyl.js';
1515
import { query } from '../config/db.js';
1616
import { verifyCap } from '../config/cap.js';
1717
import { logActivity } from '../services/activity.js';
@@ -25,8 +25,8 @@ router.get('/list', authenticateToken, async (req, res) => {
2525
try {
2626
servers = await getServersByUser(pteroId);
2727
} catch (err) {
28-
console.error('List servers Pterodactyl error:', err.message);
29-
return res.json({ servers: [], pteroError: 'Pterodactyl panel is currently unreachable.' });
28+
console.error('List servers Pyrodactyl error:', err.message);
29+
return res.json({ servers: [], pteroError: 'Pyrodactyl panel is currently unreachable.' });
3030
}
3131

3232
for (const s of servers) {
@@ -38,7 +38,7 @@ router.get('/list', authenticateToken, async (req, res) => {
3838
}
3939
}
4040

41-
// Fetch live power state from Pterodactyl Client API
41+
// Fetch live power state from Pyrodactyl Client API
4242
const userRows = await query('SELECT ptero_client_api_key FROM users WHERE id = ?', [req.user.userId]);
4343
const clientApiKey = userRows[0]?.ptero_client_api_key;
4444

@@ -227,7 +227,7 @@ router.post('/renew/:id', authenticateToken, async (req, res) => {
227227
[row.status === 'suspended' ? 'active' : row.status, row.id]
228228
);
229229

230-
// Unsuspend on Pterodactyl if currently suspended
230+
// Unsuspend on Pyrodactyl if currently suspended
231231
if (row.status === 'suspended') {
232232
try {
233233
await unsuspendPteroServer(serverId);
@@ -313,12 +313,12 @@ router.get('/overview', authenticateToken, async (req, res) => {
313313
try {
314314
servers = await getServersByUser(pteroId);
315315
} catch (err) {
316-
console.error('Overview Pterodactyl error:', err.message);
316+
console.error('Overview Pyrodactyl error:', err.message);
317317
return res.json({
318318
totalServers: 0,
319319
activeServers: 0,
320320
servers: [],
321-
pteroError: 'Pterodactyl panel is currently unreachable. Some data may be unavailable.',
321+
pteroError: 'Pyrodactyl panel is currently unreachable. Some data may be unavailable.',
322322
});
323323
}
324324

@@ -350,7 +350,7 @@ router.get('/resources/:identifier', authenticateToken, async (req, res) => {
350350

351351
const users = await query('SELECT ptero_client_api_key FROM users WHERE id = ?', [userId]);
352352
if (users.length === 0 || !users[0].ptero_client_api_key) {
353-
return res.json({ resources: null, error: 'No Pterodactyl API key configured. Set one in Account settings.' });
353+
return res.json({ resources: null, error: 'No Pyrodactyl API key configured. Set one in Account settings.' });
354354
}
355355

356356
const apiKey = users[0].ptero_client_api_key;
@@ -384,7 +384,7 @@ router.put('/client-api-key', authenticateToken, async (req, res) => {
384384
}
385385

386386
await query('UPDATE users SET ptero_client_api_key = ? WHERE id = ?', [apiKey.trim(), userId]);
387-
logActivity(req.user.userId, 'api_key_updated', 'Updated Pterodactyl API key');
387+
logActivity(req.user.userId, 'api_key_updated', 'Updated Pyrodactyl API key');
388388

389389
res.json({ success: true });
390390
} catch (err) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PTERO_URL, PTERO_API_KEY, SERVER_LIMITS, FEATURE_LIMITS, DEPLOY_LOCATIONS } from '../config/pterodactyl.js';
1+
import { PTERO_URL, PTERO_API_KEY, SERVER_LIMITS, FEATURE_LIMITS, DEPLOY_LOCATIONS } from '../config/pyrodactyl.js';
22

33
const FETCH_TIMEOUT = 15000;
44
const nodeCache = new Map();
@@ -212,7 +212,7 @@ export async function updatePteroPassword(userId, password) {
212212
}
213213

214214
export async function updatePteroEmail(userId, email) {
215-
// Pterodactyl requires all required fields on PATCH
215+
// Pyrodactyl requires all required fields on PATCH
216216
const user = await getPteroUserById(userId);
217217
await pteroFetch(`/users/${userId}`, {
218218
method: 'PATCH',

services/scheduler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { query } from '../config/db.js';
2-
import { suspendPteroServer } from './pterodactyl.js';
2+
import { suspendPteroServer } from './pyrodactyl.js';
33

44
async function suspendExpiredServers() {
55
try {

0 commit comments

Comments
 (0)