domma-cms 1.61.3 → 1.62.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/admin/js/lib/page-clone.js +4 -4
- package/admin/js/lib/pasted-front-matter.js +2 -0
- package/admin/js/templates/docs/usage-pages.html +7 -0
- package/admin/js/views/page-editor.js +10 -10
- package/admin/js/views/pages.js +3 -3
- package/docs/DommaFeatures.md +8 -0
- package/package.json +1 -1
- package/plugins/_lib/admin/mail/body-menu.js +1 -1
- package/plugins/_lib/admin/mail/cms-host.js +1 -1
- package/plugins/_lib/admin/mail/compose-window.js +1 -1
- package/plugins/_lib/admin/mail/contacts.js +1 -1
- package/plugins/_lib/admin/mail/diagnostics-section.js +1 -1
- package/plugins/_lib/admin/mail/drag-drop.js +1 -1
- package/plugins/_lib/admin/mail/folder-tree.js +1 -1
- package/plugins/_lib/admin/mail/font-controls.js +1 -1
- package/plugins/_lib/admin/mail/fonts.js +1 -1
- package/plugins/_lib/admin/mail/host-context.js +1 -1
- package/plugins/_lib/admin/mail/identity.js +1 -1
- package/plugins/_lib/admin/mail/image-senders-section.js +1 -1
- package/plugins/_lib/admin/mail/keyboard.js +1 -1
- package/plugins/_lib/admin/mail/mail.html +1 -1
- package/plugins/_lib/admin/mail/message-actions.js +1 -1
- package/plugins/_lib/admin/mail/oauth-panel.js +1 -1
- package/plugins/_lib/admin/mail/panes.js +1 -1
- package/plugins/_lib/admin/mail/reader-kit.js +18 -1
- package/plugins/_lib/admin/mail/reader-runtime.js +7 -7
- package/plugins/_lib/admin/mail/reader-view.js +1 -1
- package/plugins/_lib/admin/mail/resizable.js +1 -1
- package/plugins/_lib/admin/mail/restore-spam.js +1 -1
- package/plugins/_lib/admin/mail/rules.js +1 -1
- package/plugins/_lib/admin/mail/scheduling.js +1 -1
- package/plugins/_lib/admin/mail/section-kit.js +1 -1
- package/plugins/_lib/admin/mail/security-note.js +1 -1
- package/plugins/_lib/admin/mail/settings-section.js +1 -1
- package/plugins/_lib/admin/mail/templates.js +1 -1
- package/plugins/_lib/admin/mail/threads.js +1 -1
- package/plugins/_lib/admin/mail/vacation.js +1 -1
- package/plugins/_lib/admin/mail/when-closed.js +1 -1
- package/plugins/_lib/admin/ui/dates.js +1 -1
- package/plugins/_lib/admin/ui/resizable.js +1 -1
- package/plugins/_lib/domma-mail.lock.json +80 -80
- package/plugins/_lib/mail/accountFileStore.js +1 -1
- package/plugins/_lib/mail/accountRepository.js +1 -1
- package/plugins/_lib/mail/accountRoutes.js +1 -1
- package/plugins/_lib/mail/bodyTokenProvider.js +1 -1
- package/plugins/_lib/mail/bodyTokens.js +1 -1
- package/plugins/_lib/mail/compose.js +1 -1
- package/plugins/_lib/mail/defaults.js +1 -1
- package/plugins/_lib/mail/envelope.js +1 -1
- package/plugins/_lib/mail/folderActions.js +1 -1
- package/plugins/_lib/mail/folderRuntime.js +1 -1
- package/plugins/_lib/mail/folders.js +1 -1
- package/plugins/_lib/mail/imapPoolRuntime.js +1 -1
- package/plugins/_lib/mail/mbox.js +1 -1
- package/plugins/_lib/mail/message-action.js +1 -1
- package/plugins/_lib/mail/messageSecurity.js +1 -1
- package/plugins/_lib/mail/messageSecurityProvider.js +1 -1
- package/plugins/_lib/mail/networkAddresses.js +1 -1
- package/plugins/_lib/mail/networkPolicy.js +1 -1
- package/plugins/_lib/mail/oauthAccounts.js +1 -1
- package/plugins/_lib/mail/oauthRouteRuntime.js +1 -1
- package/plugins/_lib/mail/oauthRuntime.js +1 -1
- package/plugins/_lib/mail/pollSchedule.js +1 -1
- package/plugins/_lib/mail/poller.js +1 -1
- package/plugins/_lib/mail/pollerRuntime.js +1 -1
- package/plugins/_lib/mail/priority.js +1 -1
- package/plugins/_lib/mail/publicMailbox.js +1 -1
- package/plugins/_lib/mail/readRuntime.js +1 -1
- package/plugins/_lib/mail/render.js +1 -1
- package/plugins/_lib/mail/ruleRunner.js +1 -1
- package/plugins/_lib/mail/schedulerRuntime.js +1 -1
- package/plugins/_lib/mail/secretProvider.js +1 -1
- package/plugins/_lib/mail/secretbox.js +1 -1
- package/plugins/_lib/mail/senderAuth.js +1 -1
- package/plugins/_lib/mail/sieve.js +1 -1
- package/plugins/_lib/mail/smtpService.js +1 -1
- package/plugins/_lib/mail/snoozeRuntime.js +1 -1
- package/plugins/_lib/mail/store.js +1 -1
- package/plugins/_lib/mail/subscriptions.js +1 -1
- package/plugins/_lib/mail/syncPlan.js +1 -1
- package/plugins/_lib/mail/syncRuntime.js +1 -1
- package/plugins/_lib/mail/syncSelection.js +1 -1
- package/plugins/_lib/mail/unreadBadge.js +1 -1
- package/plugins/_lib/mail/unsubscribe.js +1 -1
- package/plugins/_lib/mail/vacationRuntime.js +1 -1
- package/plugins/_lib/mail/write.js +1 -1
package/admin/js/views/pages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{api as
|
|
1
|
+
import{api as u}from"../api.js";import{openPageClone as Ie,savedCloneInput as qe}from"../lib/page-clone.js";import{SHAPES as Ke,whileLoading as He}from"../lib/loading.js";import{addBannerAction as ie}from"../lib/plugin-chrome.js";import{helpPopovers as ce}from"../lib/help-popover.js";import{onceClosed as Fe,openMenuAt as de,settingsStore as Ue,sidebarCount as ue,viewLifetime as _e}from"../lib/tool-kit.js";import{filterByProject as pe,getProjectFromHash as Oe}from"../lib/project-context.js";import{arrangePages as Ve,checkPrune as ze,normaliseSettings as ge,pageRow as We,statusCounts as Ye,treeRows as Ge}from"../lib/pages-arrange.js";import{activeNote as he,askManualTagName as Je,manualNames as Qe,openTagSettings as Xe,same as Ze,sharedTagFilter as et,tagCounts as tt,tagMenuItems as at,tagsOf as st}from"../lib/list-tags.js";const ve=/^#\/(pages|projects\/[^/?#]+\/pages)\/?(\?.*)?$/,me="#/pages",L="pages.prune.draft",nt=`
|
|
2
2
|
<div class="pgx-row" data-path="{{urlPath}}" tabindex="0" data-bind-class="rowCls">
|
|
3
3
|
<span class="pgx-main"><strong>{{title}}</strong><small>{{meta}} <span class="pgx-tags">{{tagsText}}</span></small></span>
|
|
4
4
|
<span class="pgx-chips">
|
|
@@ -10,7 +10,7 @@ import{api as g}from"../api.js";import{SHAPES as je,whileLoading as Be}from"../l
|
|
|
10
10
|
<span class="pgx-chip" data-bind-class="statusCls">{{statusText}}</span>
|
|
11
11
|
</span>
|
|
12
12
|
<button type="button" class="pgx-kebab" aria-label="Actions for {{title}}" title="Actions">\u22EE</button>
|
|
13
|
-
</div
|
|
13
|
+
</div>`,$=c=>String(c??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function ot(c){const i=document.createElement("template");return i.innerHTML=c.trim(),i.content.firstElementChild}const fe=Ue("pages.settings",ge),l=_e(ve),lt=c=>`#/pages/edit${c}`;export const pagesView={templateUrl:"/admin/js/templates/pages.html",async onMount(c){l.reset();const i=c.get(0).querySelector(".pgx")||c.get(0),N=()=>ve.test(location.hash)&&i.isConnected,p=Oe(),A=fe.read(),s=M.observable([]),z=M.observable(0),W=M.observable(!0),R=M.observable(""),h=M.observable(A.status),j=M.observable(A.sort),w=M.observable(A.mode),B=M.observable(""),Y=et(A.tag),f=Y.tag;l.add(Y.dispose);const k=M.observable([]),b=M.observable({});l.add(M.effect(()=>fe.write(ge({status:h.value,sort:j.value,mode:w.value}))));const P=M.observable([]);l.add(M.effect(()=>{P.value=Ve(s.value,{status:h.value,query:B.value,sort:j.value,tag:f.value,tools:b.value})}));const q=M.observable([]);l.add(M.effect(()=>{const e=b.value;q.value=P.value.map(t=>We(t,Date.now(),e))}));const be=M.computed(()=>Ye(s.value)),G=M.computed(()=>!!f.value&&s.value.length>0&&!P.value.length),ye=M.computed(()=>G.value&&!B.value.trim()&&h.value==="all"?he(f.value,0,"pages"):s.value.length?"No pages match.":"No pages yet - New page in the banner makes one."),we=M.computed(()=>{const e=z.value;return!p||!e?"":`Showing only pages in ${p}. ${e} other page${e===1?" is":"s are"} filed elsewhere.`}),K=M.computed(()=>tt(k.value,s.value,b.value)),ke=M.computed(()=>he(f.value,P.value.length,"pages")),J=e=>s.peek().find(t=>t.urlPath===e);async function Pe(){try{const e=await He(i.querySelector(".dm-loading-slot"),u.pages.list(),Ke.rows);if(!N())return;const t=Array.isArray(e)?e:[],a=p?pe(t,p):t;z.value=t.length-a.length,s.value=a,R.value="",await Q()}catch(e){R.value=`Could not load the pages: ${e.message||e}`}finally{W.value=!1}}async function Q(){try{const e=await u.listTags.load("pages");b.value=e.tools,k.value=e.tags}catch{}}async function X(e,t){try{const a=await u.listTags.changeItem("pages",e.urlPath,t);s.value=s.peek().map(r=>r.urlPath===e.urlPath?{...r,adminTags:a}:r);const n=a.filter(r=>!k.peek().some(m=>Ze(m.name,r)));n.length&&(k.value=[...k.peek(),...n.map(r=>({name:r}))])}catch(a){E.toast(`Tags not saved: ${a.message||a}`,{type:"error"})}}async function Me(){const e=await u.pages.list(),t=Array.isArray(e)?e:[];s.value=p?pe(t,p):t,await Q()}const Ee=()=>Xe({kind:"pages",noun:"pages",title:"Pages settings - tags",tags:K,tools:b,active:f,reload:Me}),T=e=>{location.hash=lt(e)},Te=()=>{location.hash=p?`#/pages/new?project=${encodeURIComponent(p)}`:"#/pages/new"};async function xe(e){const t=e.plugin?`"${$(e.title||e.urlPath)}" is managed by the <strong>${$(e.plugin)}</strong> plugin - deleting it may stop that plugin working. Delete it anyway?`:`Delete the page at <strong>${$(e.urlPath)}</strong>? This cannot be undone.`;if(await E.confirm(t))try{await u.pages.delete(e.urlPath),E.toast("Page deleted.",{type:"success"}),s.value=s.peek().filter(a=>a.urlPath!==e.urlPath),ue(me)}catch(a){E.toast(`Not deleted: ${a.message||a}`,{type:"error"})}}async function Ce(e){const t=new URL(e.urlPath,location.origin).href;try{await navigator.clipboard.writeText(t),E.toast("Address copied.",{type:"success",duration:2e3})}catch{E.toast(t,{type:"info",duration:8e3})}}async function H(e,t){if(e.status!==t)try{const a=await u.pages.get(e.urlPath);await u.pages.update(e.urlPath,{frontmatter:{status:t},body:a.content||""}),s.value=s.peek().map(n=>n.urlPath===e.urlPath?{...n,status:t}:n),E.toast(t==="published"?"Page published.":t==="review"?"Page moved to review.":"Page moved to drafts.",{type:"success"}),ue(me)}catch(a){E.toast(`Could not change page status: ${a.message||a}`,{type:"error"})}}let v=null;const F=new Set;let Z=!1;function ee(e,t=null){const a=e.versionCount||0,n=M.observable(String(t?.keep??Math.min(5,a))),r=M.observable(!1),m=M.computed(()=>ze(n.value,a)),ne={keep:n,saving:r,err:M.computed(()=>m.value.error),summary:M.computed(()=>{const o=m.value;return o.error?"":o.deletes?`Deletes the ${o.deletes} oldest, keeps the newest ${Math.min(o.keep,a)}.`:"Nothing to delete - that keeps them all."}),cannot:M.computed(()=>r.value||!!m.value.error||m.value.deletes===0),intro:`${e.title||e.urlPath} has ${a} saved revision${a===1?"":"s"} - earlier versions you can compare with and restore from the editor's History.`},Le=String(n.peek()),oe=()=>String(n.peek())!==Le||!!t,d=E.slideover({title:`Trim revisions - ${$(e.title||e.urlPath)}`,size:"sm",position:"right"}),y=ot(`
|
|
14
14
|
<div class="pgx-form">
|
|
15
15
|
<p class="pgx-note" data-bind-text="intro"></p>
|
|
16
16
|
<div>
|
|
@@ -26,4 +26,4 @@ import{api as g}from"../api.js";import{SHAPES as je,whileLoading as Be}from"../l
|
|
|
26
26
|
<button type="button" class="btn btn-sm btn-danger" data-on-click="trim" data-bind-disabled="cannot.value">
|
|
27
27
|
<span data-icon="archive" data-icon-size="13"></span> Trim</button>
|
|
28
28
|
</div>
|
|
29
|
-
</div>`);async function
|
|
29
|
+
</div>`);async function le(){if(!ne.cannot.peek()){r.value=!0;try{const o=await u.versions.prune(e.urlPath,m.peek().keep);E.toast(`Removed ${o.deleted} revision${o.deleted===1?"":"s"}; kept ${o.kept}.`,{type:"success"}),s.value=s.peek().map(C=>C.urlPath===e.urlPath?{...C,versionCount:o.kept}:C),O=!0,d.close()}catch(o){E.toast(o.message||"Could not trim the revisions.",{type:"error"})}finally{r.value=!1}}}d.element.appendChild(y);const Ne=ce(y),Re=M.applyBindings(ne,y,{methods:{trim:le,cancel:()=>d.close()}}),je=o=>{o.key==="Enter"&&o.target.id==="pgx-f-keep"&&(o.preventDefault(),le())};y.addEventListener("keydown",je);const re={path:e.urlPath,dirty:oe,values:()=>({keep:n.peek()})};v=re,F.add(d),Fe(d,()=>{Re.dispose(),Ne(),F.delete(d),v===re&&(v=null)});const Be=d.close.bind(d);let O=!1,V=!1;d.close=async o=>{if(!O&&o!==!0&&!Z&&oe()){if(V)return;V=!0;const C=await E.confirm("Discard the change you have not applied?");if(V=!1,!C)return}return O=!0,Be()},I.scan(y),d.open(),y.querySelector("#pgx-f-keep")?.select()}let U=null;async function Se(e){let t;try{t=await u.pages.get(e.urlPath)}catch(a){E.toast("Could not open the page to copy: "+(a.message||"unknown error"),{type:"error"});return}i.isConnected&&(U?.close(),U=Ie({page:t,...qe(t),source:e.urlPath,pages:s.peek(),heading:"Duplicate page",note:"Create a draft copy of this page as it is saved: its text and settings.",onCloned:a=>T(a)}))}l.add(()=>U?.close());function $e(e){const t=J(e);if(!t)return[];const a=t.versionCount||0;return[{header:t.title||t.urlPath},{label:"Edit",icon:"edit",action:()=>T(t.urlPath)},{label:t.status==="published"?"View on the site":"Preview (draft)",icon:"external-link",action:()=>window.open(t.urlPath,"_blank","noopener")},{label:"Copy address",icon:"link",action:()=>Ce(t)},{label:"Duplicate\u2026",icon:"copy",action:()=>Se(t)},{label:"Transition",icon:"circle",submenu:[{label:"Published",disabled:t.status==="published",action:()=>H(t,"published")},{label:"Draft",disabled:t.status==="draft",action:()=>H(t,"draft")},{label:"Review",disabled:t.status==="review",action:()=>H(t,"review")}]},{type:"divider"},...at({all:Qe(K.peek()),current:st(t),change:n=>X(t,n),newTag:async()=>{const n=await Je(K.peek(),b.peek());n&&await X(t,{add:[n]})}}),{type:"divider"},{label:a?`Trim revisions (${a})\u2026`:"No revisions to trim",icon:"archive",disabled:!a,action:()=>ee(t)},{type:"divider"},{label:"Delete\u2026",icon:"trash",danger:!0,action:()=>xe(t)}]}const g=i.querySelector(".pgx-list");g.innerHTML=nt;const Ae=M.applyBindings({pages:s,loading:W,loadError:R,status:h,sort:j,mode:w,query:B,rows:q,counts:be,emptyText:ye,projectNote:we,tagNote:ke,tagEmpty:G},i,{methods:{showAllTags:()=>{f.value=""},showAll:()=>{h.value="all"},showPublished:()=>{h.value="published"},showDrafts:()=>{h.value="draft"},showList:()=>{w.value="list"},showTree:()=>{w.value="tree"}}});l.add(()=>Ae.dispose()),l.add(ce(i,{position:"bottom"})),l.add(M.effect(()=>{q.value,requestAnimationFrame(()=>{g.isConnected&&I.scan(g)})}));const _=i.querySelector(".pgx-tree");let D=null;l.add(M.effect(()=>{const e=w.value==="tree",t=e?Ge(P.value):null;try{D?.destroy?.()}catch{}D=null,_.replaceChildren(),!(!e||!t.length)&&(D=E.treeView(_,{data:t,idKey:"id",parentKey:"parent_id",labelKey:"name",iconKey:"icon",expandedByDefault:!0,onSelect:a=>T(a)}),I.scan(_))})),l.add(()=>{try{D?.destroy?.()}catch{}});const De=E.contextMenu(g,{cursor:"glyph",match:".pgx-row",inherit:!1,density:"compact",items:e=>$e(e.dataset.path)});l.add(()=>De?.destroy?.());const te=e=>{const t=e.target.closest(".pgx-row");if(!t)return;const a=e.target.closest(".pgx-kebab");if(a){de(a);return}T(t.dataset.path)},ae=e=>{const t=e.target.closest(".pgx-row");t&&(e.key==="F10"&&e.shiftKey?(e.preventDefault(),de(t)):e.key==="Enter"&&e.target===t&&T(t.dataset.path))};g.addEventListener("click",te),g.addEventListener("keydown",ae),l.add(()=>{g.removeEventListener("click",te),g.removeEventListener("keydown",ae)}),ie(c,{id:"pages-settings",icon:"settings",title:"Pages settings - tags",onClick:Ee}),ie(c,{id:"pages-new",icon:"plus",title:"New page",onClick:Te});const se=e=>{v?.dirty()&&(e.preventDefault(),e.returnValue="")};if(window.addEventListener("beforeunload",se),l.add(()=>window.removeEventListener("beforeunload",se)),l.add(()=>{if(v?.dirty())try{S.set(L,{path:v.path,values:v.values(),at:new Date().toISOString()})}catch{}Z=!0,[...F].forEach(e=>{try{e.close(!0)}catch{}})}),I.scan(i),await Pe(),!N())return;let x=null;try{x=S.get(L)}catch{}if(x?.path&&x.values){try{S.remove?S.remove(L):S.set(L,null)}catch{}const e=J(x.path);e&&(e.versionCount||0)>0&&await E.confirm(`You left trimming the revisions of "${$(e.title||e.urlPath)}" unfinished. Pick up where you left off?`)&&N()&&ee(e,x.values)}}};
|
package/docs/DommaFeatures.md
CHANGED
|
@@ -204,6 +204,14 @@ visibility: ["=candidate", "=employer"] # those two roles and nobody else
|
|
|
204
204
|
- **Safety nets** - Unsaved marker and Discard; Save checks the URL path (must start with `/`, no spaces) and DConfig JSON and jumps to the tab with the problem; leaving (or closing the browser tab) with unsaved changes asks and keeps a local draft that is offered back next time, warning if the saved page has changed since. A page switcher jumps to another page (disabled while dirty). Banner actions: Back, Editor reference (built-in shortcode help), View on the site, Save, Settings.
|
|
205
205
|
- Since: Tool redesign 0.77.0; reactive bindings 0.89.1
|
|
206
206
|
|
|
207
|
+
- **Pasted front matter caught** - pasting text that holds a page's settings block (front matter between `---` lines, for example a whole page file) asks whether to leave the block out, since in a page's body it would show on the page as a rule and a heading. **Leave it out** pastes the rest; **Paste as is** pastes everything.
|
|
208
|
+
- Where: **Page editor > Edit** (paste into the Markdown pane); `admin/js/lib/pasted-front-matter.js`
|
|
209
|
+
- Since: unreleased
|
|
210
|
+
|
|
211
|
+
- **Clone and Duplicate** - the editor's banner copy button (or the tab's menu) makes a draft copy of the page with its unsaved edits; **Duplicate…** in the Pages list's right-click menu does the same from the list with the page as saved. The copy is a draft at a new URL (`/<page>-copy` suggested), out of the navigation.
|
|
212
|
+
- Where: page editor banner; **Content > Pages** right-click; `admin/js/lib/page-clone.js`
|
|
213
|
+
- Since: Clone 1.6.31; Duplicate in the list unreleased
|
|
214
|
+
|
|
207
215
|
- **Built-in reference and tutorial** - an Editor reference slideover documents every shortcode (including the named celebration tags), and a guided CRUD tutorial can be launched from the toolbar.
|
|
208
216
|
- Where: page editor banner help icon; `admin/js/lib/page-editor-reference.js`
|
|
209
217
|
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/body-menu.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The reading pane's right-click menu - the pure parts.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/cms-host.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** The CMS shell boundary. Standalone never imports this adapter. */
|
|
4
4
|
const version = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/compose-window.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
4
4
|
const {createMailHost} = await import(new URL(`./host-context.js?v=${MAIL_MODULE_VERSION}`, import.meta.url).href);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/contacts.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Recipient suggestions from the host address book.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/diagnostics-section.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The settings section that answers "which build is this, and what went wrong".
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/drag-drop.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Drag identities include the mailbox and source folder: UIDs alone are not unique. */
|
|
4
4
|
const PROTECTED_USES = new Set(['\\Inbox', '\\Sent', '\\Drafts', '\\Trash', '\\Junk', '\\Archive', '\\All', '\\Flagged']);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/folder-tree.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Mail folder presentation, shared by the Mail Reader and Email Pro.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/font-controls.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/fonts.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The fonts and sizes the mail editor offers - pure, so both the compose
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/host-context.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Services supplied by the application that hosts the shared mail interface. */
|
|
4
4
|
export function createMailApi({getToken, fetch: request = globalThis.fetch, onUnauthorized = () => {}}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/identity.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Who a mailbox sends as, and what it signs off with.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/image-senders-section.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The settings section for senders whose images always load.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/keyboard.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Keyboard navigation for the reader.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/message-actions.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* What other Tools add to a message's menu - Booking's "Book Sam...".
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/oauth-panel.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* "Sign in with Microsoft / Google" for a mailbox - the part of the mailbox
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/panes.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Pane sizing for the mail reader, shared by the Mail Reader and Email Pro.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/reader-kit.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The reader view's decisions that need no DOM - escaping, the mailbox form's
|
|
@@ -28,6 +28,23 @@ export function esc(value) {
|
|
|
28
28
|
.replace(/'/g, ''');
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* An address list in full, as the header details show it: `Name <address>`,
|
|
33
|
+
* or the bare address when there is no name. The one-line summary keeps
|
|
34
|
+
* names alone; the details are where people go to see who really sent it.
|
|
35
|
+
*
|
|
36
|
+
* @param {{name?: string, address?: string}[]} list
|
|
37
|
+
* @returns {string}
|
|
38
|
+
*/
|
|
39
|
+
export function fullAddresses(list) {
|
|
40
|
+
return (list ?? []).map(a => {
|
|
41
|
+
const name = String(a?.name ?? '').trim();
|
|
42
|
+
const address = String(a?.address ?? '').trim();
|
|
43
|
+
if (name && address && name.toLowerCase() !== address.toLowerCase()) return `${name} <${address}>`;
|
|
44
|
+
return address || name;
|
|
45
|
+
}).filter(Boolean).join(', ');
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
// ---------------------------------------------------------------------------
|
|
32
49
|
// The mailbox form's draft
|
|
33
50
|
// ---------------------------------------------------------------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/reader-runtime.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
4
4
|
const {createMailHost} = await import(new URL(`./host-context.js?v=${MAIL_MODULE_VERSION}`, import.meta.url).href);
|
|
@@ -73,7 +73,7 @@ const {
|
|
|
73
73
|
esc, mailboxDraftsKey, mailboxDraftId, mailboxDraftData, mailboxFingerprint, normaliseDraftMap,
|
|
74
74
|
pruneDraftMap, mailboxDraftDecision, mailboxRestoreQuestion, RESTORE_BUTTONS, settingsDiscardQuestion,
|
|
75
75
|
onceOnly, accountMenuModel, folderReadMenuModel, mailboxRowMenuModel, menuItems, sidebarUrl, hasNewMail,
|
|
76
|
-
holdEscapeOn, extensionMenuItems, extensionPaneActions, mergeExtensionItems
|
|
76
|
+
holdEscapeOn, extensionMenuItems, extensionPaneActions, mergeExtensionItems, fullAddresses
|
|
77
77
|
} = await import(versioned('reader-kit.js'));
|
|
78
78
|
|
|
79
79
|
/**
|
|
@@ -4855,13 +4855,13 @@ return {
|
|
|
4855
4855
|
details.className = 'mail-header-details';
|
|
4856
4856
|
|
|
4857
4857
|
const rows = [
|
|
4858
|
-
['From',
|
|
4859
|
-
['Reply to',
|
|
4860
|
-
['To',
|
|
4861
|
-
['Cc',
|
|
4858
|
+
['From', fullAddresses(message.from)],
|
|
4859
|
+
['Reply to', fullAddresses(message.replyTo)],
|
|
4860
|
+
['To', fullAddresses(message.to)],
|
|
4861
|
+
['Cc', fullAddresses(message.cc)],
|
|
4862
4862
|
// Only ever present on your own copy in Sent; a received
|
|
4863
4863
|
// message carries none, which is the whole point of it.
|
|
4864
|
-
['Bcc',
|
|
4864
|
+
['Bcc', fullAddresses(message.bcc)],
|
|
4865
4865
|
// Omitted when normal, like every other absent header: saying
|
|
4866
4866
|
// "Priority: Normal" is saying nothing at length.
|
|
4867
4867
|
['Priority', message.priority === 'high' ? 'High'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/reader-view.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Existing CMS entry point for the shared mail view. */
|
|
4
4
|
const version = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/resizable.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The mail reader's resizable slideovers.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/restore-spam.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Undo restores both junk status and the original folder, following each UID remap. */
|
|
4
4
|
export async function restoreSpam({api, base, account, from, destination, uids, spam}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/scheduling.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/section-kit.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/security-note.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* What the reader says about a signed or encrypted (S/MIME) message.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/settings-section.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/** Browser preferences for the shared mail reader. */
|
|
4
4
|
export const READ_DELAY_KEY = 'domma-mail.mark-read-seconds';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/templates.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/threads.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Grouping messages into conversations.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/vacation.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* The automatic reply, and everything that must stop it.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/mail/when-closed.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Run code when a Domma modal or slideover actually closes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Source: @domma-mail/core 0.24.
|
|
1
|
+
// Source: @domma-mail/core 0.24.4, packages/core/src/admin/ui/dates.js.
|
|
2
2
|
// Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
|
|
3
3
|
/**
|
|
4
4
|
* Dates as a plugin shows them to a person: dd/mm/yyyy, and dd/mm/yyyy HH:mm
|