Skip to content

Commit 3f37f77

Browse files
platform: the waiting list asks for the domain a license is issued for (#79)
A Platform license is issued for an organization and one domain: the host of Platform's own URL, which Platform compares with AUTH_URL as it starts and refuses with LICENSE_HOST_MISMATCH when it differs. The form asked for neither, so every request needed a second email before a key could be cut. The form now asks for the organization as it should appear on the license and for the Platform domain, which is required and accepts a domain name only: no scheme, no port, no IP address. Its hint names the installer setting the same value goes into, endpoints.hosts.platform. The composed email puts the licence choice, the organization and the domain first.
1 parent e76b632 commit 3f37f77

4 files changed

Lines changed: 48 additions & 9 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "libredb-website",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"private": true,
55
"type": "module",
66
"description": "libredb.org — marketing website for LibreDB Studio (Astro static + Outstatic CMS)",

‎src/data/platform.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const limits: { term: string; detail: string }[] = [
133133
{
134134
term: 'Licence key',
135135
detail:
136-
'Every self-hosted install needs a licence key, and Platform does not start without one. The key sets the admin and user seats and the expiry.',
136+
'Every self-hosted install needs a licence key, and Platform does not start without one. The key names your organization and the one domain Platform runs on, and sets the admin and user seats and the expiry.',
137137
},
138138
{
139139
term: 'Audit',
@@ -153,7 +153,7 @@ export const offer = {
153153
seats: '1 admin and 3 users',
154154
term: '12 months',
155155
headline: 'Join the waiting list',
156-
lead: 'The licence for 1 admin and 3 users is free for 12 months — no card, nothing to buy. Need more seats? Those are paid, and we will send a price for the number you need. Tell us a little about your team and we will come back with a licence key and the installer.',
156+
lead: 'The licence for 1 admin and 3 users is free for 12 months — no card, nothing to buy. Need more seats? Those are paid, and we will send a price for the number you need. Tell us your organization and the domain Platform will run on, and we will come back with a licence key and the installer.',
157157
choices: [
158158
{ value: 'Free licence — 1 admin + 3 users', label: '1 admin + 3 users', note: 'Free for 12 months' },
159159
{ value: 'Paid licence — more seats', label: 'More than that', note: 'Paid — we send a price' },

‎src/pages/platform.astro‎

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,38 @@ const mailto = `mailto:${contact.email}?subject=${encodeURIComponent(contact.sub
186186
<input name="Email" type="email" autocomplete="email" required />
187187
</label>
188188
<label class="wl__field">
189-
<span>Company <em aria-hidden="true">*</em></span>
190-
<input name="Company" type="text" autocomplete="organization" required />
189+
<span>Organization, as on the license <em aria-hidden="true">*</em></span>
190+
<input name="Organization" type="text" autocomplete="organization" required />
191191
</label>
192192
<label class="wl__field">
193193
<span>Your role</span>
194194
<input name="Role" type="text" autocomplete="organization-title" placeholder="e.g. Head of Data" />
195195
</label>
196+
<!-- A license is issued for one domain: the host of Platform's own
197+
URL, which Platform compares with AUTH_URL as it starts. A domain
198+
name only — no scheme, no port, no IP address. -->
199+
<div class="wl__field wl__field--wide">
200+
<label for="wl-domain">Platform domain <em aria-hidden="true">*</em></label>
201+
<input
202+
id="wl-domain"
203+
name="Platform domain"
204+
type="text"
205+
inputmode="url"
206+
autocapitalize="none"
207+
spellcheck="false"
208+
placeholder="libredb-platform.example.com"
209+
pattern="([A-Za-z0-9]([A-Za-z0-9\-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z]{2,63}"
210+
maxlength="253"
211+
title="A domain name such as libredb-platform.example.com, without https:// or a port"
212+
aria-describedby="wl-domain-hint"
213+
required
214+
/>
215+
<p class="wl__hint" id="wl-domain-hint">
216+
The address people will open Platform at. The license runs on this one domain, so give the name you will
217+
set as <code>endpoints.hosts.platform</code> in the installer's <code>libredb.yaml</code>. A domain name
218+
only: no https://, no port, no IP address.
219+
</p>
220+
</div>
196221
<label class="wl__field wl__field--wide">
197222
<span>Databases you would connect</span>
198223
<input name="Databases" type="text" placeholder="e.g. PostgreSQL, Oracle, MongoDB" />
@@ -482,6 +507,15 @@ const mailto = `mailto:${contact.email}?subject=${encodeURIComponent(contact.sub
482507
font-style: normal;
483508
color: var(--text-tertiary);
484509
}
510+
.wl__hint {
511+
font: var(--weight-regular) var(--body-xs-size) / 1.6 var(--font-ui);
512+
color: var(--text-secondary);
513+
text-wrap: pretty;
514+
}
515+
.wl__hint code {
516+
font: var(--weight-regular) 0.95em / 1 var(--font-mono);
517+
color: var(--text-primary);
518+
}
485519
.wl__field input,
486520
.wl__field textarea {
487521
width: 100%;

‎src/scripts/waitlist.ts‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ for (const form of document.querySelectorAll<HTMLFormElement>('[data-waitlist]')
1616
form.addEventListener('submit', (event) => {
1717
event.preventDefault();
1818
const lines = ['Hello LibreDB team,', '', 'I would like to join the LibreDB Platform waiting list.', ''];
19-
for (const [name, value] of new FormData(form)) {
20-
const text = String(value).trim();
21-
if (text) lines.push(`${name}: ${text}`);
22-
}
19+
// What the license is issued from goes first, so whoever issues it reads
20+
// the licence choice, the organization and the domain without scrolling.
21+
const fields = [...new FormData(form)]
22+
.map(([name, value]) => [name, String(value).trim()] as const)
23+
.filter(([, text]) => text)
24+
.map(([name, text]) => [name, name === 'Platform domain' ? text.toLowerCase() : text] as const);
25+
const first = ['Licence', 'Organization', 'Platform domain'];
26+
fields.sort(([a], [b]) => (first.indexOf(a) + 1 || 99) - (first.indexOf(b) + 1 || 99));
27+
for (const [name, text] of fields) lines.push(`${name}: ${text}`);
2328
message = lines.join('\n');
2429
window.location.href = `mailto:${to}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(message)}`;
2530
if (status) status.hidden = false;

0 commit comments

Comments
 (0)