snapshot: preserve app registry and branding domain foundation

This commit is contained in:
Md Bayazid Bostame
2026-03-26 11:59:06 +01:00
parent 51700cfa8b
commit c195efe339
23 changed files with 1122 additions and 561 deletions

View File

@@ -35,6 +35,12 @@ textarea { min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo,
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border: 1px solid #dce5f1; padding: 8px; text-align: left; vertical-align: top; }
th { background: #f6f9ff; color: #334155; }
.app-registry-wrap textarea { min-height: 86px; }
.app-registry-table input[type="text"],
.app-registry-table input[type="number"],
.app-registry-table select,
.app-registry-table textarea { min-width: 160px; }
.app-registry-table td { background: rgba(255,255,255,0.9); }
.template-block { border: 1px solid #d8e3f0; border-radius: 10px; background: #fff; padding: 10px; margin-top: 10px; }
.template-title, .rule-title { margin: 0 0 8px; color: #24344e; font-weight: 700; font-size: 14px; }
.rule-card { margin-top: 12px; border: 1px solid #d8e3f0; border-radius: 12px; padding: 10px; background: #fff; }

View File

@@ -22,6 +22,8 @@
const fullName = byName('full_name');
const workEmail = byName('work_email');
const form = fullName ? fullName.closest('form') : null;
const emailDomain = (((form && form.dataset.emailDomain) || 'tub.co') + '').replace(/^@+/, '').trim();
if (!fullName || !workEmail) return;
let lastSuggested = '';
@@ -31,7 +33,7 @@
const lastName = extractLastName(fullName.value);
const slug = slugifyForEmail(lastName);
if (!slug) return;
const suggestion = slug + '@tub.co';
const suggestion = slug + '@' + emailDomain;
const current = (workEmail.value || '').trim();
if (!userEditedEmail || current === '' || current === lastSuggested) {
workEmail.value = suggestion;

View File

@@ -5,6 +5,7 @@
const btnNext = document.getElementById('btn-next');
const btnSubmit = document.getElementById('btn-submit');
const form = document.getElementById('onboarding-form');
const emailDomain = ((form && form.dataset.emailDomain) || 'tub.co').replace(/^@+/, '').trim();
let current = 0;
form.setAttribute('novalidate', 'novalidate');
@@ -82,7 +83,7 @@
function suggestEmail() {
const slug = slugifyForEmail(lastName.value);
if (!slug) return;
const suggestion = slug + '@tub.co';
const suggestion = slug + '@' + emailDomain;
if (!userEditedEmail || workEmail.value === '' || workEmail.value === lastSuggested) {
workEmail.value = suggestion;
lastSuggested = suggestion;