mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-10 17:45:42 +00:00
760c0e933d
Generator UI: web-nodejs/views/generator.ejs + public/js/generator.js + public/css/generator.css. Logo upload up to 10 MB, 16 MB body parser, branding form (product name, colors, server URL, etc.), per-branding hash deduplication.
Build pipeline: web-nodejs/services/agentBundleService.js (queue API + branding hash) and agentBuildWorker.js (DB-backed queue, 5s poll, concurrency 1, 30 min timeout). Spawns 'cargo tauri build --bundles <fmt> [--target <triple>] [--runner cargo-xwin]' per platform under systemd User=root. Loads /etc/betterdesk/build.env at module top so BUILD_USER/CARGO_HOME/PATH survive empty service env. Uses absolute CARGO_BIN/NPM_BIN paths to avoid PATH-resolution issues. Artifact path resolution honors profile.target presence (no triple subdir when omitted).
Toolchain installer: scripts/install-build-toolchain.sh (Rust + targets + cargo-tauri + cargo-xwin + mingw + makensis + dpkg-deb + rpmbuild + appimagetool + pnpm + node), writes /etc/betterdesk/build.env, 12-tool verification. Wired into betterdesk.sh menu as option B with post-install rsync of agent source to /opt/BetterDeskConsole/agent-source/.
Agent download page: web-nodejs/views/agent-download.ejs + public/css/agent-download.css for end-user installer downloads per platform/format with live status.
Branding scaffold (Tauri side): betterdesk-agent-client/src-tauri/src/branding.rs (Branding struct + OnceLock cache + BETTERDESK_AGENT_BRANDING env override + BaseDirectory::Resource resolve). resources/branding.json (dev skeleton). lib.rs registers module + get_branding command. commands.rs exposes get_branding IPC. tauri.conf.json declares resources/branding.json. Frontend integration of get_branding is intentionally pending — alpha.
Database: web-nodejs/services/database.js + dbAdapter.js add agent_bundle_builds + agent_bundles tables with full PostgreSQL + SQLite parity.
i18n: en.json + pl.json + zh-TW.json get ~75 new keys covering generator wizard, build status, download page, and toolchain installer messages.
Validated end-to-end on prod (Ubuntu 24.04, 4-core, PostgreSQL): linux/x64/AppImage built successfully (83.7 MB, 283s) for branding hash 25e2f242. linux/deb in progress, rpm + windows/exe queued.
Known follow-ups (NOT in this commit): SolidJS invoke('get_branding') wiring in App.tsx, betterdesk.ps1 toolchain menu mirror, reset-password.js PostgreSQL support, Docker decision.
This commit was made possible thanks to Insolve.
219 lines
4.3 KiB
CSS
219 lines
4.3 KiB
CSS
/* =========================================================================
|
|
Public agent download portal
|
|
========================================================================= */
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
html, body {
|
|
min-height: 100vh;
|
|
background: linear-gradient(135deg, #0b1020 0%, #16213e 100%);
|
|
color: #e6edf3;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.portal {
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
padding: 56px 20px 32px;
|
|
}
|
|
|
|
.portal-header {
|
|
text-align: center;
|
|
margin-bottom: 48px;
|
|
}
|
|
|
|
.portal-logo {
|
|
width: 96px;
|
|
height: 96px;
|
|
margin: 0 auto 18px;
|
|
border-radius: 18px;
|
|
overflow: hidden;
|
|
background: var(--brand-primary, #2563eb);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
object-fit: contain;
|
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
img.portal-logo { padding: 0; background: white; }
|
|
|
|
.portal-logo-fallback .material-icons {
|
|
font-size: 56px;
|
|
color: white;
|
|
}
|
|
|
|
.portal-header h1 {
|
|
font-size: 36px;
|
|
font-weight: 700;
|
|
margin-bottom: 10px;
|
|
color: white;
|
|
}
|
|
|
|
.portal-subtitle {
|
|
color: #94a3b8;
|
|
font-size: 17px;
|
|
max-width: 620px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.portal-intro {
|
|
text-align: center;
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.portal-intro h2 {
|
|
font-size: 22px;
|
|
font-weight: 600;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.portal-intro p { color: #94a3b8; font-size: 15px; }
|
|
|
|
.portal-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
gap: 18px;
|
|
margin-bottom: 48px;
|
|
}
|
|
|
|
.portal-card {
|
|
background: rgba(255, 255, 255, 0.04);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 14px;
|
|
padding: 28px 20px;
|
|
text-align: center;
|
|
backdrop-filter: blur(20px);
|
|
transition: transform 0.2s ease, border-color 0.2s ease;
|
|
}
|
|
|
|
.portal-card:hover {
|
|
transform: translateY(-2px);
|
|
border-color: rgba(255, 255, 255, 0.16);
|
|
}
|
|
|
|
.card-icon {
|
|
color: var(--brand-primary, #2563eb);
|
|
margin-bottom: 16px;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.portal-card h3 {
|
|
font-size: 17px;
|
|
margin-bottom: 4px;
|
|
color: white;
|
|
}
|
|
|
|
.card-arch {
|
|
font-size: 12px;
|
|
color: #94a3b8;
|
|
margin-bottom: 18px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.card-status { min-height: 44px; display: flex; align-items: center; justify-content: center; }
|
|
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 10px 22px;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: filter 0.15s ease;
|
|
}
|
|
|
|
.btn:hover { filter: brightness(1.1); }
|
|
|
|
.btn-primary {
|
|
background: var(--brand-primary, #2563eb);
|
|
color: white;
|
|
}
|
|
|
|
.status-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 14px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.status-pending {
|
|
background: rgba(245, 158, 11, 0.15);
|
|
color: #fcd34d;
|
|
}
|
|
|
|
.status-failed {
|
|
background: rgba(220, 53, 69, 0.15);
|
|
color: #f87171;
|
|
}
|
|
|
|
.spinner {
|
|
width: 12px;
|
|
height: 12px;
|
|
border: 2px solid rgba(252, 211, 77, 0.3);
|
|
border-top-color: #fcd34d;
|
|
border-radius: 50%;
|
|
animation: portal-spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes portal-spin { to { transform: rotate(360deg); } }
|
|
|
|
.portal-contact {
|
|
background: rgba(255, 255, 255, 0.03);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 14px;
|
|
padding: 24px 28px;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.portal-contact h2 {
|
|
font-size: 18px;
|
|
margin-bottom: 14px;
|
|
color: white;
|
|
}
|
|
|
|
.contact-list {
|
|
list-style: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.contact-list li {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
color: #cbd5e1;
|
|
}
|
|
|
|
.contact-list a {
|
|
color: var(--brand-primary, #2563eb);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.contact-list a:hover { text-decoration: underline; }
|
|
|
|
.contact-list .material-icons { color: #94a3b8; font-size: 18px; }
|
|
|
|
.portal-footer {
|
|
text-align: center;
|
|
color: #64748b;
|
|
font-size: 13px;
|
|
padding: 20px 0;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.portal { padding: 32px 16px; }
|
|
.portal-header h1 { font-size: 28px; }
|
|
}
|