diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index e6b9088..fbe9dd7 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -32,6 +32,6 @@ jobs: - run: ${{ matrix.command }} - uses: actions/upload-artifact@v4 with: - name: daybreak-mail-${{ matrix.artifact }}-v${{ steps.app-version.outputs.version }} + name: ep-mail-${{ matrix.artifact }}-v${{ steps.app-version.outputs.version }} path: ${{ matrix.files }} if-no-files-found: error diff --git a/README.md b/README.md index 3f0b5fd..6bdbe08 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Daybreak Mail +# ep-mail -A desktop-style mail client concept with the **Eternity Daylight** and **Wasteland** themes. It includes an inbox, message reader, search, starring, archive and trash actions, compose/reply/forward, contacts, and a month calendar. +An Eternity Project mail client with **Eternity Daylight**, **Wasteland**, and EP themes. It includes an inbox, message reader, search, starring, archive and trash actions, compose/reply/forward, contacts, and a month calendar. ## Desktop app @@ -16,7 +16,7 @@ Install Python 3, open a terminal in this folder, and run: python -m http.server 8000 ``` -On Windows, `py -m http.server 8000` is also available on many Python installations. Visit `http://localhost:8000` in a current browser. Use the browser's **Install app** option to add Daybreak Mail as a standalone desktop app. The service worker caches the app shell for offline use after the first visit. +On Windows, `py -m http.server 8000` is also available on many Python installations. Visit `http://localhost:8000` in a current browser. Use the browser's **Install app** option to add ep-mail as a standalone desktop app. The service worker caches the app shell for offline use after the first visit. ## Current scope diff --git a/TODO.md b/TODO.md index 1792fbd..cee0694 100644 --- a/TODO.md +++ b/TODO.md @@ -2,8 +2,8 @@ ## Product identity -- [ ] Rename the program to **ep-mail** across the app UI, package metadata, desktop builds, and documentation. -- [ ] Replace the current sun/asterisk branding with Eternity Project emblems or logos. Confirm which official asset to use before implementation. +- [x] Rename the program to **ep-mail** across the app UI, package metadata, desktop builds, and documentation. +- [x] Replace the temporary sun/asterisk app mark with the Git and webmail logo, using the EP Daylight and EP Wasteland color variants. ## Mail security diff --git a/app.js b/app.js index 90c87da..54804ef 100644 --- a/app.js +++ b/app.js @@ -14,4 +14,4 @@ function renderCalendar(){} function showEvent(){} function renderContacts(){} function showContact(){} -$$('.folder').forEach(b=>b.onclick=()=>{activeFolder=b.dataset.folder;$$('.folder').forEach(x=>x.classList.toggle('active',x===b));$('#sidebar-title').textContent=activeFolder;$('#crumb-current').textContent=activeFolder;renderList()});$$('.rail-button[data-view]').forEach(b=>b.onclick=()=>{switchView(b.dataset.view);if(b.dataset.view==='calendar')renderCalendar();if(b.dataset.view==='contacts')renderContacts()});function applyTheme(theme,showToast=false){const themes=['daylight','wasteland','ep-wasteland','ep-daylight'];const selected=themes.includes(theme)?theme:'daylight';const info={daylight:{name:'Eternity Daylight',icon:'☼'},wasteland:{name:'Wasteland',icon:'☾'},'ep-wasteland':{name:'EP Wasteland',icon:'◈'},'ep-daylight':{name:'EP Daylight',icon:'☀'}}[selected];document.body.classList.remove('wasteland','ep-wasteland','ep-daylight');if(selected!=='daylight')document.body.classList.add(selected);const button=$('#theme-toggle');button.querySelector('span').textContent=info.icon;button.title=`Theme: ${info.name} (click to switch)`;button.setAttribute('aria-label',`Theme: ${info.name}. Click to switch themes.`);document.querySelector('meta[name=theme-color]')?.setAttribute('content',selected==='ep-wasteland'?'#161210':selected==='ep-daylight'?'#f1f1e9':selected==='wasteland'?'#eee8db':'#f4f5f1');localStorage.setItem('daybreak-theme',selected);if(showToast)toast(`${info.name} theme`)}$('#theme-toggle').onclick=()=>{const themes=['daylight','wasteland','ep-wasteland','ep-daylight'];const current=localStorage.getItem('daybreak-theme')||'daylight';applyTheme(themes[(themes.indexOf(current)+1)%themes.length],true)};applyTheme(localStorage.getItem('daybreak-theme')||'daylight');$('#search').oninput=e=>{query=e.target.value;renderList()};$('#search').addEventListener('keydown',e=>{if(e.key==='Escape'){e.target.value='';query='';renderList()}});$('#compose').onclick=()=>showCompose();$('#refresh').onclick=()=>{toast('You’re all up to date');renderList()};$('#select-all').onclick=()=>{const visible=messages.filter(m=>!m.archived&&!m.deleted);const all=visible.every(m=>selectedIds.has(m.id));visible.forEach(m=>all?selectedIds.delete(m.id):selectedIds.add(m.id));renderList()};$('#archive-selected').onclick=()=>{messages.filter(m=>selectedIds.has(m.id)).forEach(m=>m.archived=true);selectedIds.clear();renderList();toast('Selected messages archived')};$('#delete-selected').onclick=()=>{messages.filter(m=>selectedIds.has(m.id)).forEach(m=>m.deleted=true);selectedIds.clear();renderList();toast('Selected messages moved to Trash')};$('#sidebar-menu').onclick=()=>toast('More mailbox options');$$('.settings-button,.help-button,.tiny-plus,.text-button').forEach(b=>b.onclick=()=>toast('You’re all caught up'));document.addEventListener('keydown',e=>{if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==='k'){e.preventDefault();$('#search').focus()}if(e.key==='Escape')$('#modal-root').innerHTML=''});$('#today-label').textContent=new Intl.DateTimeFormat('en-US',{weekday:'long',month:'long',day:'numeric'}).format(new Date()).toUpperCase();$('#reader-pane').innerHTML=emptyReader();renderList();openMessage(activeMessage); +$$('.folder').forEach(b=>b.onclick=()=>{activeFolder=b.dataset.folder;$$('.folder').forEach(x=>x.classList.toggle('active',x===b));$('#sidebar-title').textContent=activeFolder;$('#crumb-current').textContent=activeFolder;renderList()});$$('.rail-button[data-view]').forEach(b=>b.onclick=()=>{switchView(b.dataset.view);if(b.dataset.view==='calendar')renderCalendar();if(b.dataset.view==='contacts')renderContacts()});function applyTheme(theme,showToast=false){const themes=['daylight','wasteland','ep-wasteland','ep-daylight'];const selected=themes.includes(theme)?theme:'daylight';const info={daylight:{name:'Eternity Daylight',icon:'☼'},wasteland:{name:'Wasteland',icon:'☾'},'ep-wasteland':{name:'EP Wasteland',icon:'◈'},'ep-daylight':{name:'EP Daylight',icon:'☀'}}[selected];document.body.classList.remove('wasteland','ep-wasteland','ep-daylight');if(selected!=='daylight')document.body.classList.add(selected);const button=$('#theme-toggle');button.querySelector('span').textContent=info.icon;button.title=`Theme: ${info.name} (click to switch)`;button.setAttribute('aria-label',`Theme: ${info.name}. Click to switch themes.`);document.querySelector('meta[name=theme-color]')?.setAttribute('content',selected==='ep-wasteland'?'#161210':selected==='ep-daylight'?'#f1f1e9':selected==='wasteland'?'#eee8db':'#f4f5f1');localStorage.setItem('daybreak-theme',selected);const brandLogo=$("#brand-logo");if(brandLogo)brandLogo.src=selected==='ep-wasteland'?'logo-ep-wasteland.svg':'logo-ep-daylight.svg';if(showToast)toast(`${info.name} theme`)}$('#theme-toggle').onclick=()=>{const themes=['daylight','wasteland','ep-wasteland','ep-daylight'];const current=localStorage.getItem('daybreak-theme')||'daylight';applyTheme(themes[(themes.indexOf(current)+1)%themes.length],true)};applyTheme(localStorage.getItem('daybreak-theme')||'daylight');$('#search').oninput=e=>{query=e.target.value;renderList()};$('#search').addEventListener('keydown',e=>{if(e.key==='Escape'){e.target.value='';query='';renderList()}});$('#compose').onclick=()=>showCompose();$('#refresh').onclick=()=>{toast('You’re all up to date');renderList()};$('#select-all').onclick=()=>{const visible=messages.filter(m=>!m.archived&&!m.deleted);const all=visible.every(m=>selectedIds.has(m.id));visible.forEach(m=>all?selectedIds.delete(m.id):selectedIds.add(m.id));renderList()};$('#archive-selected').onclick=()=>{messages.filter(m=>selectedIds.has(m.id)).forEach(m=>m.archived=true);selectedIds.clear();renderList();toast('Selected messages archived')};$('#delete-selected').onclick=()=>{messages.filter(m=>selectedIds.has(m.id)).forEach(m=>m.deleted=true);selectedIds.clear();renderList();toast('Selected messages moved to Trash')};$('#sidebar-menu').onclick=()=>toast('More mailbox options');$$('.settings-button,.help-button,.tiny-plus,.text-button').forEach(b=>b.onclick=()=>toast('You’re all caught up'));document.addEventListener('keydown',e=>{if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==='k'){e.preventDefault();$('#search').focus()}if(e.key==='Escape')$('#modal-root').innerHTML=''});$('#today-label').textContent=new Intl.DateTimeFormat('en-US',{weekday:'long',month:'long',day:'numeric'}).format(new Date()).toUpperCase();$('#reader-pane').innerHTML=emptyReader();renderList();openMessage(activeMessage); diff --git a/branding.css b/branding.css new file mode 100644 index 0000000..06df5e2 --- /dev/null +++ b/branding.css @@ -0,0 +1,15 @@ +.brand-mark, +body.wasteland .brand-mark, +body.ep-wasteland .brand-mark, +body.ep-daylight .brand-mark { + background: transparent !important; + box-shadow: none !important; + border-radius: 0; +} + +.brand-mark img { + display: block; + width: 35px; + height: 35px; + object-fit: contain; +} diff --git a/dav-ui.js b/dav-ui.js index 5ae6950..cc26e19 100644 --- a/dav-ui.js +++ b/dav-ui.js @@ -24,7 +24,7 @@ async function openDavManager(type){ root.querySelector('#add-dav-server').onclick=()=>showDavConnect(type); root.onclick=async event=>{ const activate=event.target.closest('[data-dav-activate]');if(activate){try{await window.daybreakMail.davActivate(type,activate.dataset.davActivate);close();await syncDav(type)}catch(error){toast(error.message)}return} - const remove=event.target.closest('[data-dav-remove]');if(remove){if(!confirm(`Remove this ${label} server from Daybreak Mail?`))return;try{const result=await window.daybreakMail.davRemove(type,remove.dataset.davRemove);close();if(result.activeId)await syncDav(type);else if(type==='caldav'){savedEvents=savedEvents.filter(item=>!item._dav);productWrite(productKeys.events,savedEvents);renderCalendar()}else{savedContacts=savedContacts.filter(item=>!item._dav);productWrite(productKeys.contacts,savedContacts);renderContacts()}await openDavManager(type)}catch(error){toast(error.message)} } + const remove=event.target.closest('[data-dav-remove]');if(remove){if(!confirm(`Remove this ${label} server from ep-mail?`))return;try{const result=await window.daybreakMail.davRemove(type,remove.dataset.davRemove);close();if(result.activeId)await syncDav(type);else if(type==='caldav'){savedEvents=savedEvents.filter(item=>!item._dav);productWrite(productKeys.events,savedEvents);renderCalendar()}else{savedContacts=savedContacts.filter(item=>!item._dav);productWrite(productKeys.contacts,savedContacts);renderContacts()}await openDavManager(type)}catch(error){toast(error.message)} } }; }catch(error){toast(error.message||`Could not load ${label} servers`)} } diff --git a/desktop/main.cjs b/desktop/main.cjs index 591f5c3..f55aae9 100644 --- a/desktop/main.cjs +++ b/desktop/main.cjs @@ -51,7 +51,7 @@ function makeCalendarData(event) { const stamp = new Date().toISOString().replace(/[-:]/g, '').replace(/\.\d{3}/, ''); const start = event.time ? new Date(`${event.date}T${event.time}:00`).toISOString().replace(/[-:]/g, '').replace(/\.\d{3}/, '') : event.date.replace(/-/g, ''); const endDate = event.time ? new Date(new Date(`${event.date}T${event.time}:00`).getTime() + 3600000).toISOString().replace(/[-:]/g, '').replace(/\.\d{3}/, '') : null; - return `BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Daybreak Mail//CalDAV\r\nBEGIN:VEVENT\r\nUID:${uid}\r\nDTSTAMP:${stamp}\r\n${event.time ? `DTSTART:${start}\r\nDTEND:${endDate}\r\n` : `DTSTART;VALUE=DATE:${start}\r\n` }SUMMARY:${escapeIcal(event.title)}\r\n${event.place ? `LOCATION:${escapeIcal(event.place)}\r\n` : ''}${event.notes ? `DESCRIPTION:${escapeIcal(event.notes)}\r\n` : ''}END:VEVENT\r\nEND:VCALENDAR\r\n`; + return `BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Eternity Project//ep-mail CalDAV\r\nBEGIN:VEVENT\r\nUID:${uid}\r\nDTSTAMP:${stamp}\r\n${event.time ? `DTSTART:${start}\r\nDTEND:${endDate}\r\n` : `DTSTART;VALUE=DATE:${start}\r\n` }SUMMARY:${escapeIcal(event.title)}\r\n${event.place ? `LOCATION:${escapeIcal(event.place)}\r\n` : ''}${event.notes ? `DESCRIPTION:${escapeIcal(event.notes)}\r\n` : ''}END:VEVENT\r\nEND:VCALENDAR\r\n`; } function makeVcard(contact) { const name = String(contact.name || '').trim().split(/\s+/); @@ -374,7 +374,7 @@ ipcMain.handle('mail:send', async (_event, message) => { const to = String(message?.to || '').trim(); if (!to) throw new Error('Add at least one recipient.'); const transport = smtpTransport(account); - const sentMessageId = `<${require('node:crypto').randomUUID()}@daybreak-mail.local>`; + const sentMessageId = `<${require('node:crypto').randomUUID()}@ep-mail.local>`; const messageOptions = { from: { name: account.email, address: account.email }, to, @@ -586,7 +586,7 @@ function createWindow() { height: 920, minWidth: 920, minHeight: 680, - title: 'Daybreak Mail', + title: 'ep-mail', backgroundColor: '#f4f5f1', show: false, autoHideMenuBar: true, diff --git a/icon.svg b/icon.svg index d44acb6..72dfd11 100644 --- a/icon.svg +++ b/icon.svg @@ -1 +1,10 @@ - + + + + + + + + + + diff --git a/index.html b/index.html index 9fc854c..60ca095 100644 --- a/index.html +++ b/index.html @@ -4,16 +4,17 @@ - + - Daybreak Mail + ep-mail +