Files
firefrost-services/services/modpack-version-checker/blueprint-extension/admin/view.blade.php
Claude (Chronicler #62) 35aded99fe feat(modpackchecker): add Blueprint extension Phase 2 - core architecture
Task #26 Phase 2 Complete — Core Architecture

Files created:
- conf.yml: Blueprint manifest with all paths configured
- admin/controller.php: Admin settings controller (BYOK key, webhook, interval)
- admin/view.blade.php: Admin UI with Trinity-inspired styling
- controllers/ModpackAPIController.php: Client API with all 4 platform integrations
- routes/client.php: Client route for manual version checks
- views/server/wrapper.tsx: React component for server overview page
- database/migrations: Per-server tracking table

Platform Support (all implemented):
- CurseForge (BYOK API key)
- Modrinth (open, no key)
- Technic (open, no key)
- FTB/modpacks.ch (open, no key)

Detection Strategy:
1. Egg Variables (MODPACK_PLATFORM, MODPACK_ID, platform-specific vars)
2. File fingerprinting via DaemonFileRepository (manifest.json, modrinth.index.json)
3. Manual override via admin UI

Next: Phase 3 - Testing on Dev Panel (64.50.188.128)

Signed-off-by: Claude (Chronicler #62) <claude@firefrostgaming.com>
2026-04-06 00:35:01 +00:00

209 lines
9.0 KiB
PHP

<form id="config-form" action="" method="POST">
<script>
document.addEventListener("DOMContentLoaded", function() {
showSaveButton();
});
function showSaveButton() {
const configForm = document.getElementById("config-form");
const saveOverlay = document.getElementById("save-overlay");
configForm.addEventListener("change", function() {
saveOverlay.style.display = "inline";
setTimeout(() => {
saveOverlay.style.bottom = "10px";
}, 100);
});
configForm.addEventListener("input", function() {
saveOverlay.style.display = "inline";
setTimeout(() => {
saveOverlay.style.bottom = "10px";
}, 100);
});
}
</script>
<!-- Save button overlay -->
<div id="save-overlay">
{{ csrf_field() }}
<button type="submit" name="_method" value="PATCH" class="btn btn-primary btn-sm">
Save Changes
</button>
</div>
<style>
#save-overlay {
display: none;
position: fixed;
transition: bottom 0.3s;
bottom: -200px;
right: 20px;
z-index: 500;
padding: 15px;
background: #1a1a2e;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
</style>
<!-- Header -->
<div class="row" style="margin-bottom: 20px;">
<div class="col-xs-12">
<div style="display: flex; align-items: center; gap: 15px;">
<div style="width: 50px; height: 50px; background: linear-gradient(135deg, #FF6B35, #4ECDC4); border-radius: 10px; display: flex; align-items: center; justify-content: center;">
<i class="fa fa-cube" style="font-size: 24px; color: white;"></i>
</div>
<div>
<h2 style="margin: 0; color: #fff;">ModpackChecker</h2>
<p style="margin: 0; color: #888;">4-Platform Modpack Version Monitoring</p>
</div>
</div>
</div>
</div>
<div class="row">
<!-- CurseForge API Key -->
<div class="col-xs-12 col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-key"></i> CurseForge API Key
</h3>
</div>
<div class="box-body">
<div class="form-group">
<label class="control-label">API Key (BYOK)</label>
<input
type="password"
name="curseforge_api_key"
id="curseforge_api_key"
value="{{ $curseforge_api_key }}"
placeholder="$2a$10$..."
class="form-control"
autocomplete="off"
/>
<p class="text-muted small" style="margin-top: 8px;">
Get your free API key from
<a href="https://console.curseforge.com/" target="_blank">console.curseforge.com</a>.
Required for CurseForge modpack detection.
</p>
</div>
</div>
</div>
</div>
<!-- Check Interval -->
<div class="col-xs-12 col-md-6">
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-clock-o"></i> Check Interval
</h3>
<span class="label label-warning" style="margin-left: 10px;">Professional</span>
</div>
<div class="box-body">
<div class="form-group">
<label class="control-label">Automatic Check Frequency</label>
<select class="form-control" name="check_interval" id="check_interval">
<option value="daily" @if($check_interval == 'daily') selected @endif>
Daily (Recommended)
</option>
<option value="12h" @if($check_interval == '12h') selected @endif>
Every 12 Hours
</option>
<option value="6h" @if($check_interval == '6h') selected @endif>
Every 6 Hours
</option>
</select>
<p class="text-muted small" style="margin-top: 8px;">
How often to automatically check for modpack updates.
More frequent checks use more API quota.
</p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<!-- Discord Webhook -->
<div class="col-xs-12 col-md-6">
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-bell"></i> Discord Notifications
</h3>
<span class="label label-warning" style="margin-left: 10px;">Professional</span>
</div>
<div class="box-body">
<div class="form-group">
<label class="control-label">Webhook URL</label>
<input
type="url"
name="discord_webhook_url"
id="discord_webhook_url"
value="{{ $discord_webhook_url }}"
placeholder="https://discord.com/api/webhooks/..."
class="form-control"
/>
<p class="text-muted small" style="margin-top: 8px;">
Receive alerts when modpack updates are available.
Create a webhook in your Discord server settings.
</p>
</div>
</div>
</div>
</div>
<!-- Supported Platforms -->
<div class="col-xs-12 col-md-6">
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">
<i class="fa fa-check-circle"></i> Supported Platforms
</h3>
</div>
<div class="box-body">
<ul style="list-style: none; padding: 0; margin: 0;">
<li style="padding: 8px 0; border-bottom: 1px solid #333;">
<i class="fa fa-fire" style="color: #f16436; width: 20px;"></i>
<strong>CurseForge</strong>
<span class="text-muted small">(Requires API Key)</span>
</li>
<li style="padding: 8px 0; border-bottom: 1px solid #333;">
<i class="fa fa-leaf" style="color: #1bd96a; width: 20px;"></i>
<strong>Modrinth</strong>
<span class="text-muted small">(No key required)</span>
</li>
<li style="padding: 8px 0; border-bottom: 1px solid #333;">
<i class="fa fa-cogs" style="color: #4a90d9; width: 20px;"></i>
<strong>Technic</strong>
<span class="text-muted small">(No key required)</span>
</li>
<li style="padding: 8px 0;">
<i class="fa fa-cube" style="color: #e04e39; width: 20px;"></i>
<strong>FTB (modpacks.ch)</strong>
<span class="text-muted small">(No key required)</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Footer Info -->
<div class="row">
<div class="col-xs-12">
<div class="callout callout-info">
<h4><i class="fa fa-info-circle"></i> How It Works</h4>
<p style="margin-bottom: 0;">
ModpackChecker automatically detects modpacks via Egg Variables or file fingerprinting.
Set <code>MODPACK_PLATFORM</code> and <code>MODPACK_ID</code> in your server's startup variables
for the most reliable detection, or let the extension scan for <code>manifest.json</code> /
<code>modrinth.index.json</code> files.
</p>
</div>
</div>
</div>
</form>