Files
AppStore/builder/views/settings.html
Trey T 491f3a22ba Builder v2: local project browser + multi-team ASC keys
Rewrites the builder console to browse local Xcode projects instead of
accepting source uploads or git URLs. Replaces the devices page with a
profiles page that manages ad-hoc provisioning profiles and lists
registered bundle IDs per team.

Adds multi-account support: ASC API keys are now stored in an asc_keys
table keyed by team_id (team_name, key_id, issuer_id, p8_filename). At
build time, the worker reads DEVELOPMENT_TEAM from the Xcode project and
auto-picks the matching key for fastlane sigh + JWT signing. Legacy
single-key settings auto-migrate on first boot.

Fixes storefront IPA parser to handle binary plists produced by Xcode.
Drops the enrollment bridge, device management routes, and direct
ASC API client -- fastlane sigh handles profile lifecycle now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 14:43:16 -05:00

88 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings - Builder</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<header>
<div class="header-left"><h1>Builder</h1></div>
<nav>
<a href="/">Builds</a>
<a href="/build">New Build</a>
<a href="/profiles">Profiles</a>
<a href="/settings" class="active">Settings</a>
<a href="/logout" class="logout">Logout</a>
</nav>
</header>
<main>
<h1 class="page-title">Settings</h1>
<div class="section">
<h2>Developer Accounts</h2>
<p style="font-size:13px;color:var(--text-muted);margin-bottom:12px">
One App Store Connect API key per Apple Developer team. Used by fastlane to generate ad-hoc provisioning profiles.
The build worker auto-picks the key whose <code>team_id</code> matches the Xcode project's <code>DEVELOPMENT_TEAM</code>.
</p>
<div class="card">
<div id="asc-keys-table"></div>
</div>
<h3 style="margin-top:20px">Add Developer Account</h3>
<div class="card">
<form id="add-key-form">
<div class="field-group">
<div>
<label>Team Name (label)</label>
<input type="text" name="team_name" placeholder="88Oak Apps" autocomplete="off" required>
</div>
<div>
<label>Team ID</label>
<input type="text" name="team_id" placeholder="ABCDE12345" autocomplete="off" required>
</div>
</div>
<div class="field-group">
<div>
<label>Key ID</label>
<input type="text" name="key_id" placeholder="ABC123DEF4" autocomplete="off" required>
</div>
<div>
<label>Issuer ID</label>
<input type="text" name="issuer_id" placeholder="00000000-0000-0000-0000-000000000000" autocomplete="off" required>
</div>
</div>
<div class="btn-row">
<button type="submit">Save Account</button>
</div>
<p style="font-size:12px;color:var(--text-muted);margin-top:8px">After saving, use the Upload .p8 button in the table above.</p>
</form>
</div>
</div>
<div class="section">
<h2>Storefront</h2>
<p style="font-size:13px;color:var(--text-muted);margin-bottom:12px">Where built IPAs get uploaded for OTA distribution.</p>
<div class="card">
<form id="storefront-form">
<label>Base URL</label>
<input type="url" name="unraid_url" placeholder="https://appstore.treytartt.com">
<label>API Token</label>
<input type="password" name="unraid_token" placeholder="API token from storefront .env">
<div class="btn-row">
<button type="submit">Save</button>
<button type="button" id="test-storefront" class="btn-secondary">Test Connection</button>
</div>
</form>
</div>
</div>
<div id="toast" class="toast"></div>
</main>
<script src="/js/settings.js"></script>
</body>
</html>