Refractoring Stage 6.7 Migrated DAV calendar/contact state and rendering calls to the productivity feature API, and made the app shell navigate through that API rather than directly calling legacy renderer globals.
This commit is contained in:
+3
-3
@@ -188,7 +188,7 @@ function updateAccountCard(account) {
|
||||
if (!card) return;
|
||||
const email = account.email || '';
|
||||
const localName = (email.split('@')[0] || 'Mail account').replace(/[._-]+/g, ' ').replace(/\b\w/g, letter => letter.toUpperCase());
|
||||
const displayName = account.displayName?.trim() || profileSettings.name.trim() || localName;
|
||||
const displayName = account.displayName?.trim() || window.epMailFeatures.productivity?.profileName?.trim() || localName;
|
||||
const initials = displayName.split(/\s+/).filter(Boolean).map(part => part[0]).join('').slice(0, 2);
|
||||
card.querySelector('.account-avatar').textContent = initials || 'M';
|
||||
card.querySelector('.account-info strong').textContent = displayName;
|
||||
@@ -207,7 +207,7 @@ function updateAccountCard(account) {
|
||||
function openMailAccount(existingAccount = null) {
|
||||
const root = $('#modal-root');
|
||||
const editing = Boolean(existingAccount);
|
||||
const displayName = existingAccount?.displayName || profileSettings.name || '';
|
||||
const displayName = existingAccount?.displayName || window.epMailFeatures.productivity?.profileName || '';
|
||||
const ruleMarkup = (existingAccount?.rules || []).map(rule => `
|
||||
<div class="mail-rule-row">
|
||||
<input class="mail-rule-sender" maxlength="200" aria-label="Sender contains" placeholder="Sender contains" value="${esc(rule.senderContains || '')}">
|
||||
@@ -749,7 +749,7 @@ if (window.daybreakMail) {
|
||||
subject: $('#compose-subject').value.trim(),
|
||||
text: $('#compose-body').value,
|
||||
attachments: $('#modal-root .compose-modal')?._composeAttachments || [],
|
||||
displayName: connectedMailAccount.displayName || profileSettings.name,
|
||||
displayName: connectedMailAccount.displayName || window.epMailFeatures.productivity?.profileName || '',
|
||||
...(pgp ? { pgp } : {})
|
||||
});
|
||||
if (result.failed) {
|
||||
|
||||
Reference in New Issue
Block a user