<% // Public download portal — branded per bundle. No auth, no shared layout. // Bundle ID itself is the access token. const brand = bundle.branding || {}; const gb = typeof globalBranding !== 'undefined' && globalBranding ? globalBranding : {}; const primary = brand.primary_color || '#2563eb'; const accent = brand.accent_color || '#1e293b'; const companyName = brand.company_name || gb.appName || 'BetterDesk Support'; const shortText = brand.short_text || ''; const logo = brand.logo_data_url || gb.logoUrl || ''; const contactEmail = brand.contact_email || ''; const contactPhone = brand.contact_phone || ''; const contactUrl = brand.contact_url || ''; const portalBackground = gb.background || ''; const showPoweredBy = gb.showPoweredBy !== false; function esc(s) { return String(s == null ? '' : s).replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); } %> <%= esc(companyName) %> — <%= t('download.title') %>
<% if (logo) { %> <% } else { %> <% } %>

<%= esc(companyName) %>

<% if (shortText) { %>

<%= esc(shortText) %>

<% } %>

<%= t('download.choose_platform') %>

<%= t('download.choose_platform_hint') %>

<% if (typeof productType !== 'undefined' && !brand.hide_product_type) { %>

<% if (brand.product_label) { %> <%= esc(brand.product_label) %> <% } else if (productType === 'rdclient') { %> <%= t('download.product_rdclient') %> <% } else if (productType === 'support-agent') { %> <%= t('download.product_support_agent') %> <% } else { %> <%= t('download.product_agent_client') %> <% } %>

<% } %>
<% platforms.forEach(p => { %>
<% if (p.platform === 'windows') { %> <% } else if (p.format === 'deb') { %> DEB <% } else if (p.format === 'rpm') { %> RPM <% } else { %> <% } %>

<%= esc(p.label) %>

<%= esc(p.arch) %>

<% if (p.status === 'ready') { %> <%= t('download.download') %> <% } else if (p.status === 'failed') { %> <%= t('download.failed') %> <% } else { %> <%= t('download.building') %> <% } %>
<% }); %>
<% if (contactEmail || contactPhone || contactUrl) { %>

<%= t('download.need_help') %>

<% } %>