// Settings page and admin user row 'use strict'; const { escapeHtml, appleSplashLinks, themeOptions, validDateFormats, validDatetimeFormats, passwordField, } = require('./shared'); const adminUserRow = (u, currentUserId) => { const enabled = u.enabled !== false; const isSelf = u.id === currentUserId; const created = u.created_time ? new Date(u.created_time).toISOString().slice(0, 10) : ''; const modalId = `user-modal-${u.id}`; const totpEnabled = !!u.totpEnabled; return `
${escapeHtml(user.email)}
Font and theme settings — changes are saved automatically.
Control auto-lock behavior for encrypted notes.
This account's password is managed via JOPLOCK_ADMIN_PASSWORD in the deployment configuration.
Enter your current password and a new password.
Protect your account with a 6-digit code from your authenticator app.
${userTotpEnabled ? `Enabled Two-factor authentication is active on your account.
Setup in progress
Scan this QR code with your authenticator app:
Or enter manually: ${escapeHtml(userTotpSetupSeed)}
Disabled Two-factor authentication is not enabled.
| Name | Status | Created | Actions |
|---|
No users found.
'}Create and restore full Postgres backups for Joplin and Joplock.
${backupEnabled ? `${backupBusy ? 'Running' : 'Idle'} ${maintenanceMode ? escapeHtml(`Maintenance mode active${activeOperation ? ` (${activeOperation})` : ''}`) : 'No backup job running.'}
| File | Created | Size | Actions |
|---|---|---|---|
${escapeHtml(b.name)} |
${escapeHtml(new Date(b.createdTime).toISOString())} | ${escapeHtml(`${b.size} bytes`)} | Download |
No backups found yet.
'}If normal login is unavailable, use /recovery with the deployment recovery password.
Backups are not configured. Set JOPLOCK_BACKUP_DIR in deployment config.