Dark-only Tailwind v4 @theme tokens, cinematic landing hero, operational dashboard styling, and the Firebreak logo/wordmark assets. Templates use semantic component classes instead of inline styles and color literals.
130 lines
5.7 KiB
HTML
130 lines
5.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ "Reconfigure" if reconfiguring else "Setup" }} — Firebreak{% endblock %}
|
|
{% block body_class %}landing-page{% endblock %}
|
|
{% block main_class %}flex-1{% endblock %}
|
|
{% block content %}
|
|
<section class="flex min-h-dvh items-center justify-center px-6 py-20">
|
|
<div class="w-full max-w-lg">
|
|
<div class="mb-8 text-center">
|
|
<img src="/static/img/firebreak-brand.svg"
|
|
alt="Firebreak"
|
|
width="240"
|
|
height="268"
|
|
class="setup-logo" />
|
|
<h1 class="mt-6 text-2xl font-semibold text-foreground">
|
|
{{ "Reconfigure" if reconfiguring else "Setup" }}
|
|
</h1>
|
|
{% if reconfiguring %}
|
|
<p class="mt-2 text-sm leading-6 text-foreground/60">
|
|
Update your Forgejo OAuth connection. Make sure the OAuth application
|
|
is registered in your Forgejo instance before continuing.
|
|
</p>
|
|
{% else %}
|
|
<p class="mt-2 text-sm leading-6 text-foreground/60">
|
|
Connect Firebreak to your Forgejo instance. You'll need to
|
|
<a href="https://forgejo.org/docs/latest/user/oauth2-provider/"
|
|
target="_blank"
|
|
rel="noopener"
|
|
class="text-foreground/80 underline underline-offset-2 hover:text-foreground">register an OAuth application</a>
|
|
in Forgejo first.
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
{% if not reconfiguring %}
|
|
<div class="mb-8 rounded-lg border border-foreground/10 bg-card/60 px-5 py-4 text-xs leading-5 text-foreground/50">
|
|
<p class="mb-2.5 font-medium text-foreground/70">How to get your OAuth credentials:</p>
|
|
<ol class="list-decimal list-inside space-y-1.5">
|
|
<li>
|
|
In Forgejo, go to <strong class="text-foreground/70">Settings → Applications</strong>
|
|
</li>
|
|
<li>
|
|
Under <strong class="text-foreground/70">Manage OAuth2 Applications</strong>, create a new app
|
|
</li>
|
|
<li>
|
|
Set the redirect URI to
|
|
<br />
|
|
<code class="mt-1 inline-block rounded bg-foreground/8 px-1.5 py-0.5 font-mono text-[10px] text-foreground/60">{{ oauth_callback_url }}</code>
|
|
</li>
|
|
<li>
|
|
Copy the <strong class="text-foreground/70">Client ID</strong> and <strong class="text-foreground/70">Client Secret</strong> into the form below
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
{% endif %}
|
|
<form method="post" action="/setup" class="space-y-5">
|
|
{% if not reconfiguring %}
|
|
<div>
|
|
<label for="setup_token" class="form-label">Setup Token</label>
|
|
<input type="password"
|
|
id="setup_token"
|
|
name="setup_token"
|
|
class="form-input font-mono"
|
|
placeholder="Paste the token from your server logs"
|
|
autocomplete="off"
|
|
spellcheck="false"
|
|
required />
|
|
<p class="mt-1.5 text-xs text-foreground/30">Printed to the server console on first boot.</p>
|
|
</div>
|
|
{% endif %}
|
|
<div>
|
|
<label for="forgejo_base_url" class="form-label">Forgejo Instance URL</label>
|
|
<input type="url"
|
|
id="forgejo_base_url"
|
|
name="forgejo_base_url"
|
|
class="form-input"
|
|
placeholder="https://git.example.com"
|
|
autocomplete="off"
|
|
value="{{ forgejo_base_url }}"
|
|
required />
|
|
</div>
|
|
<div>
|
|
<label for="forgejo_oauth_client_id" class="form-label">OAuth Client ID</label>
|
|
<input type="text"
|
|
id="forgejo_oauth_client_id"
|
|
name="forgejo_oauth_client_id"
|
|
class="form-input font-mono"
|
|
placeholder="c8ab3315-537d-44f3-…"
|
|
autocomplete="off"
|
|
spellcheck="false"
|
|
value="{{ forgejo_oauth_client_id }}"
|
|
required />
|
|
</div>
|
|
<div>
|
|
<label for="forgejo_oauth_client_secret" class="form-label">
|
|
OAuth Client Secret
|
|
{% if reconfiguring %}
|
|
<span class="ml-1 font-normal tracking-normal normal-case text-foreground/30">(leave blank to keep current)</span>
|
|
{% endif %}
|
|
</label>
|
|
<input type="password"
|
|
id="forgejo_oauth_client_secret"
|
|
name="forgejo_oauth_client_secret"
|
|
class="form-input font-mono"
|
|
placeholder="gto_wkxxnv4ewa…"
|
|
autocomplete="off"
|
|
spellcheck="false"
|
|
{{ "" if reconfiguring else "required" }} />
|
|
</div>
|
|
<div>
|
|
<label for="firebreak_public_base_url" class="form-label">
|
|
Public Base URL
|
|
<span class="ml-1 font-normal tracking-normal normal-case text-foreground/30">(optional)</span>
|
|
</label>
|
|
<input type="url"
|
|
id="firebreak_public_base_url"
|
|
name="firebreak_public_base_url"
|
|
class="form-input"
|
|
placeholder="https://share.example.com"
|
|
autocomplete="off"
|
|
value="{{ firebreak_public_base_url }}" />
|
|
<p class="mt-1.5 text-xs text-foreground/30">
|
|
Your production domain for OAuth redirects. Leave blank on localhost — Firebreak will use <code class="font-mono text-foreground/40">http://localhost:8000</code> automatically.
|
|
</p>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary w-full mt-2">
|
|
{{ "Save Forgejo Settings" if reconfiguring else "Complete Setup" }}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|