Release v2.2.0

This commit is contained in:
2026-08-01 21:41:44 +01:00
parent c643d2fb07
commit d6417b667c
673 changed files with 146752 additions and 7389 deletions
+86
View File
@@ -0,0 +1,86 @@
<div class="page-header">
<div>
<h2>Fonts</h2>
<p>Upload shared font files for the editor and player.</p>
</div>
</div>
<div class="row g-3">
<div class="col-12 col-xl-4">
<div class="card card-outline card-primary">
<div class="card-header">
<h3 class="card-title">Upload font</h3>
</div>
<form method="post" action="/settings/fonts" enctype="multipart/form-data">
<div class="card-body d-flex flex-column gap-3 pb-0">
<div>
<label for="font-family" class="form-label">Font family name</label>
<input id="font-family" name="font_family" class="form-control" placeholder="Acme Sans" required />
</div>
<div>
<label for="font-file" class="form-label">Font file</label>
<input id="font-file" name="font_file" type="file" class="form-control" accept=".woff2,.woff,.ttf,.otf" required />
</div>
<button type="submit" class="btn btn-primary">Upload font</button>
</div>
</form>
</div>
</div>
<div class="col-12 col-xl-8">
<div class="card card-outline card-primary">
<div class="card-header">
<h3 class="card-title">Managed fonts</h3>
</div>
<div class="table-responsive fonts-table-responsive">
<table class="table table-striped align-middle mb-0">
<thead>
<tr>
<th>Family</th>
<th>File</th>
<th>Format</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{#if fonts.length}}
{{#each fonts}}
<tr>
<td class="fw-semibold">{{family}}</td>
<td class="text-break">{{fileName}}</td>
<td>{{format}}</td>
<td>
{{#if enabled}}
<span class="badge text-bg-success">Enabled</span>
{{else}}
<span class="badge text-bg-secondary">Disabled</span>
{{/if}}
</td>
<td class="text-nowrap">
<form method="post" action="/settings/fonts/{{id}}/toggle" class="d-inline">
<input type="hidden" name="enabled" value="{{#if enabled}}0{{else}}1{{/if}}" />
<button type="submit" class="btn btn-secondary btn-sm">{{#if enabled}}Disable{{else}}Enable{{/if}}</button>
</form>
<form method="post" action="/settings/fonts/{{id}}/delete" class="d-inline ms-1" data-confirm-message="Delete this font?">
<input type="hidden" name="family" value="{{family}}" />
{{#if inUse}}
<button type="submit" class="btn btn-outline-danger btn-sm" {{#if inUse}}disabled{{/if}}>Delete</button>
{{else}}
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
{{/if}}
</form>
</td>
</tr>
{{/each}}
{{else}}
<tr>
<td colspan="5" class="empty">No managed fonts yet.</td>
</tr>
{{/if}}
</tbody>
</table>
</div>
</div>
</div>
</div>