92 lines
2.3 KiB
Markdown
92 lines
2.3 KiB
Markdown
# patches/PATCHES.md — Core Patch Manifest
|
|
|
|
> **Ball Studios** — https://git.balls.studio/BallStudios/pterodactyl_addon
|
|
>
|
|
> This file documents every modification made to Pterodactyl Panel core files.
|
|
> Each patch is isolated, minimal, and easy to re-apply after a panel update.
|
|
|
|
---
|
|
|
|
## Patch 1 — Register AddonServiceProvider
|
|
|
|
**File:** `app/Providers/AppServiceProvider.php`
|
|
|
|
**Change:** Add 1 line inside `register()`:
|
|
|
|
```diff
|
|
public function register(): void
|
|
{
|
|
+ $this->app->register(\Pterodactyl\Addons\AdvancedAdmin\AddonServiceProvider::class);
|
|
// ... existing code
|
|
}
|
|
```
|
|
|
|
**Reapply after panel update:**
|
|
```bash
|
|
# The install.sh script re-applies this automatically via `install.sh --patches-only`
|
|
# Or manually add the line above to AppServiceProvider::register()
|
|
```
|
|
|
|
---
|
|
|
|
## Patch 2 — Network Tab Route
|
|
|
|
**File:** `resources/scripts/routers/ServerRouter.tsx`
|
|
|
|
**Change:** Add import + route:
|
|
|
|
```diff
|
|
+import NetworkTab from '@/addons/advanced-admin/network/NetworkTab';
|
|
import React from 'react';
|
|
// ...
|
|
</Routes>
|
|
+ <Route path="/server/:id/network" element={<NetworkTab />} />
|
|
```
|
|
|
|
---
|
|
|
|
## Patch 3 — File History Button in File Editor
|
|
|
|
**File:** `resources/scripts/components/server/files/FileEditContainer.tsx`
|
|
|
|
**Change:** Add import (rendering integrated via component props):
|
|
|
|
```diff
|
|
+import FileHistoryButton from '@/addons/advanced-admin/revisions/FileHistoryButton';
|
|
import React from 'react';
|
|
```
|
|
|
|
---
|
|
|
|
## Patch 4 — Command Input Wrapper in Server Console
|
|
|
|
**File:** `resources/scripts/components/server/console/ServerConsole.tsx`
|
|
|
|
**Change:** Add import:
|
|
|
|
```diff
|
|
+import CommandInput from '@/addons/advanced-admin/console/CommandInput';
|
|
import React from 'react';
|
|
```
|
|
|
|
---
|
|
|
|
## Re-applying Patches After Panel Update
|
|
|
|
```bash
|
|
# After updating Pterodactyl Panel:
|
|
cd /var/www/pterodactyl
|
|
php artisan addon:patch apply
|
|
|
|
# Or manually apply each diff above using the line references in this file.
|
|
```
|
|
|
|
## Verifying Patches Are Applied
|
|
|
|
```bash
|
|
grep -n "AddonServiceProvider" app/Providers/AppServiceProvider.php
|
|
grep -n "NetworkTab" resources/scripts/routers/ServerRouter.tsx
|
|
grep -n "FileHistoryButton" resources/scripts/components/server/files/FileEditContainer.tsx
|
|
grep -n "CommandInput" resources/scripts/components/server/console/ServerConsole.tsx
|
|
```
|