mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-29 08:24:18 +08:00
Fix selectbox issue with domain connection type #689
This commit is contained in:
parent
7878b542a5
commit
2d832ff5ea
5 changed files with 15 additions and 15 deletions
|
@ -3,7 +3,7 @@
|
|||
"IMAP": {
|
||||
"host": "localhost",
|
||||
"port": 143,
|
||||
"secure": 0,
|
||||
"type": 0,
|
||||
"shortLogin": false,
|
||||
"ssl": {
|
||||
"verify_peer": false,
|
||||
|
@ -17,7 +17,7 @@
|
|||
"SMTP": {
|
||||
"host": "localhost",
|
||||
"port": 25,
|
||||
"secure": 0,
|
||||
"type": 0,
|
||||
"shortLogin": false,
|
||||
"ssl": {
|
||||
"verify_peer": false,
|
||||
|
@ -34,7 +34,7 @@
|
|||
"Sieve": {
|
||||
"host": "localhost",
|
||||
"port": 4190,
|
||||
"secure": 0,
|
||||
"type": 0,
|
||||
"shortLogin": false,
|
||||
"ssl": {
|
||||
"verify_peer": false,
|
||||
|
|
|
@ -50,7 +50,7 @@ class ConnectSettings implements \JsonSerializable
|
|||
$object = new static;
|
||||
$object->host = $aSettings['host'];
|
||||
$object->port = $aSettings['port'];
|
||||
$object->type = $aSettings['secure'];
|
||||
$object->type = isset($aSettings['type']) ? $aSettings['type'] : $aSettings['secure'];
|
||||
$object->shortLogin = !empty($aSettings['shortLogin']);
|
||||
$object->ssl = SSLContext::fromArray($aSettings['ssl'] ?? []);
|
||||
return $object;
|
||||
|
@ -63,7 +63,7 @@ class ConnectSettings implements \JsonSerializable
|
|||
// '@Object' => 'Object/ConnectSettings',
|
||||
'host' => $this->host,
|
||||
'port' => $this->port,
|
||||
'secure' => $this->type,
|
||||
'type' => $this->type,
|
||||
'shortLogin' => $this->shortLogin,
|
||||
'ssl' => $this->ssl
|
||||
);
|
||||
|
|
|
@ -2698,7 +2698,7 @@ ko.bindingHandlers['options'] = {
|
|||
if (allBindings['has']('optionsCaption')) {
|
||||
captionValue = ko.utils.unwrapObservable(allBindings.get('optionsCaption'));
|
||||
// If caption value is null or undefined, don't show a caption
|
||||
if (captionValue !== null && captionValue !== undefined) {
|
||||
if (captionValue != null) {
|
||||
filteredArray.unshift(captionPlaceholder);
|
||||
}
|
||||
}
|
||||
|
|
16
vendors/knockout/build/output/knockout-latest.js
vendored
16
vendors/knockout/build/output/knockout-latest.js
vendored
|
@ -52,14 +52,14 @@ typeof k&&a.addEventListener(k,(...e)=>{var g=b()[k];if(g)try{f=l.$data;var h=g.
|
|||
k=>{a.__ko_hasfocusUpdating=!0;k=a.ownerDocument.activeElement===a;c.I.ob(b(),d,"hasfocus",k,!0);a.__ko_hasfocusLastValue=k;a.__ko_hasfocusUpdating=!1},l=f.bind(null,!0);f=f.bind(null,!1);a.addEventListener("focus",l);a.addEventListener("focusin",l);a.addEventListener("blur",f);a.addEventListener("focusout",f);a.__ko_hasfocusLastValue=!1},update:(a,b)=>{b=!!c.g.j(b());a.__ko_hasfocusUpdating||a.__ko_hasfocusLastValue===b||(b?a.focus():a.blur())}};c.I.mb.add("hasfocus");c.h.html={init:()=>({controlsDescendantBindings:!0}),
|
||||
update:(a,b)=>{c.g.$a(a);b=c.g.j(b());if(null!=b){const d=M.createElement("template");d.innerHTML="string"!=typeof b?b.toString():b;a.appendChild(d.content)}}};(()=>{function a(b,d,f){c.h[b]={init:(l,k,e,g,h)=>{var n,p={};d&&(p={as:e.get("as"),exportDependencies:!0});var m=e.has(c.l.ga);c.s(()=>{var r=c.g.j(k()),q=!f!==!r,t=!n;m&&(h=c.l.kb(l,h));if(q){p.dataDependency=c.u.s();var u=d?h.createChildContext("function"==typeof r?r:k,p):c.u.Ba()?h.extend(null,p):h}t&&c.u.Ba()&&(n=c.g.xa(c.m.childNodes(l),
|
||||
!0));q?(t||c.m.ta(l,c.g.xa(n)),c.yb(u,l)):(c.m.pa(l),c.l.notify(l,c.l.G))},{o:l});return{controlsDescendantBindings:!0}}};c.I.Sa[b]=!1;c.m.ca[b]=!0}a("if");a("ifnot",!1,!0);a("with",!0)})();var U={};c.h.options={init:a=>{if(!a.matches("SELECT"))throw Error("options binding applies only to SELECT elements");let b=a.length;for(;b--;)a.remove(b);return{controlsDescendantBindings:!0}},update:(a,b,d)=>{var f=a.multiple,l=0!=a.length&&f?a.scrollTop:null,k=c.g.j(b()),e=d.get("valueAllowUnset")&&d.has("value"),
|
||||
g={},h=[];b=()=>Array.from(a.options).filter(q=>q.selected);var n=(q,t,u)=>{var w=typeof t;return"function"==w?t(q):"string"==w?q[t]:u},p=(q,t)=>{r&&e?c.l.notify(a,c.l.G):h.length&&(q=h.includes(c.F.R(t[0])),t[0].selected=q,r&&!q&&c.u.S(c.g.Sb,null,[a,"change"]))};e||(f?h=b().map(c.F.R):0<=a.selectedIndex&&h.push(c.F.R(a.options[a.selectedIndex])));if(k){"undefined"==typeof k.length&&(k=[k]);var m=k.filter(q=>q||null==q);d.has("optionsCaption")&&(k=c.g.j(d.get("optionsCaption")),null!==k&&void 0!==
|
||||
k&&m.unshift(U))}var r=!1;g.beforeRemove=q=>a.removeChild(q);k=p;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(k=(q,t)=>{p(q,t);c.u.S(d.get("optionsAfterRender"),null,[t[0],q!==U?q:void 0])});c.g.Pb(a,m,(q,t,u)=>{u.length&&(h=!e&&u[0].selected?[c.F.R(u[0])]:[],r=!0);t=a.ownerDocument.createElement("option");q===U?(c.g.jb(t,d.get("optionsCaption")),c.F.Na(t,void 0)):(u=n(q,d.get("optionsValue"),q),c.F.Na(t,c.g.j(u)),q=n(q,d.get("optionsText"),u),c.g.jb(t,q));return[t]},
|
||||
g,k);e||(m=h.length,(f?m&&b().length<m:m&&0<=a.selectedIndex?c.F.R(a.options[a.selectedIndex])!==h[0]:m||0<=a.selectedIndex)&&c.u.S(c.g.Sb,null,[a,"change"]));(e||c.u.eb())&&c.l.notify(a,c.l.G);l&&20<Math.abs(l-a.scrollTop)&&(a.scrollTop=l)}};c.h.options.gb=c.g.i.Z();c.h.style={update:(a,b)=>{c.g.O(c.g.j(b()||{}),(d,f)=>{f=c.g.j(f);if(null==f||!1===f)f="";if(/^--/.test(d))a.style.setProperty(d,f);else{d=d.replace(/-(\w)/g,(k,e)=>e.toUpperCase());var l=a.style[d];a.style[d]=f;f===l||a.style[d]!=l||
|
||||
isNaN(f)||(a.style[d]=f+"px")}})}};c.h.submit={init:(a,b,d,f,l)=>{if("function"!=typeof b())throw Error("The value for a submit binding must be a function");a.addEventListener("submit",k=>{var e=b();try{var g=e.call(l.$data,a)}finally{!0!==g&&k.preventDefault()}})}};c.h.text={init:()=>({controlsDescendantBindings:!0}),update:(a,b)=>{8===a.nodeType&&(a.text||a.after(a.text=M.createTextNode("")),a=a.text);c.g.jb(a,b())}};c.m.ca.text=!0;c.h.textInput={init:(a,b,d)=>{var f=a.value,l,k,e=()=>{clearTimeout(l);
|
||||
k=l=void 0;var h=a.value;f!==h&&(f=h,c.I.ob(b(),d,"textInput",h))},g=()=>{var h=c.g.j(b());null==h&&(h="");void 0!==k&&h===k?setTimeout(g,4):a.value!==h&&(a.value=h,f=a.value)};a.addEventListener("input",e);a.addEventListener("change",e);a.addEventListener("blur",e);c.s(g,{o:a})}};c.I.mb.add("textInput");c.h.textinput={preprocess:(a,b,d)=>d("textInput",a)};c.h.value={init:(a,b,d)=>{var f=a.matches("SELECT"),l=a.matches("INPUT");if(!l||"checkbox"!=a.type&&"radio"!=a.type){var k=new Set,e=d.get("valueUpdate"),
|
||||
g=null,h=()=>{g=null;var m=b(),r=c.F.R(a);c.I.ob(m,d,"value",r)};e&&("string"==typeof e?k.add(e):e.forEach(m=>k.add(m)),k.delete("change"));k.forEach(m=>{var r=h;(m||"").startsWith("after")&&(r=()=>{g=c.F.R(a);setTimeout(h,0)},m=m.slice(5));a.addEventListener(m,r)});var n=l&&"file"==a.type?()=>{var m=c.g.j(b());null==m||""===m?a.value="":c.u.S(h)}:()=>{var m=c.g.j(b()),r=c.F.R(a);if(null!==g&&m===g)setTimeout(n,0);else if(m!==r||void 0===r)f?(r=d.get("valueAllowUnset"),c.F.Na(a,m,r),r||m===c.F.R(a)||
|
||||
c.u.S(h)):c.F.Na(a,m)};if(f){var p;c.l.subscribe(a,c.l.G,()=>{p?d.get("valueAllowUnset")?n():h():(a.addEventListener("change",h),p=c.s(n,{o:a}))},null,{notifyImmediately:!0})}else a.addEventListener("change",h),c.s(n,{o:a})}else c.wb(a,{checkedValue:b})},update:()=>{}};c.I.mb.add("value");c.h.visible={update:(a,b)=>{b=c.g.j(b());var d="none"!=a.style.display;b&&!d?a.style.display="":d&&!b&&(a.style.display="none")}};c.h.hidden={update:(a,b)=>a.hidden=!!c.g.j(b())};(function(a){c.h[a]={init:function(b,
|
||||
d,f,l,k){return c.h.event.init.call(this,b,()=>({[a]:d()}),f,l,k)}}})("click");(()=>{let a=c.g.i.Z();class b{constructor(f){this.Xa=f}Ja(...f){let l=this.Xa;if(!f.length)return c.g.i.get(l,a)||(11===this.L?l.content:1===this.L?l:void 0);c.g.i.set(l,a,f[0])}}class d extends b{constructor(f){super(f);f&&(this.L=f.matches("TEMPLATE")&&f.content?f.content.nodeType:1)}}c.Ka={Xa:d,Qa:b}})();(()=>{var a=(e,g,h)=>{var n;for(g=c.m.nextSibling(g);e&&(n=e)!==g;)e=c.m.nextSibling(n),h(n,e)},b=(e,g)=>{if(e.length){var h=
|
||||
g={},h=[];b=()=>Array.from(a.options).filter(q=>q.selected);var n=(q,t,u)=>{var w=typeof t;return"function"==w?t(q):"string"==w?q[t]:u},p=(q,t)=>{r&&e?c.l.notify(a,c.l.G):h.length&&(q=h.includes(c.F.R(t[0])),t[0].selected=q,r&&!q&&c.u.S(c.g.Sb,null,[a,"change"]))};e||(f?h=b().map(c.F.R):0<=a.selectedIndex&&h.push(c.F.R(a.options[a.selectedIndex])));if(k){"undefined"==typeof k.length&&(k=[k]);var m=k.filter(q=>q||null==q);d.has("optionsCaption")&&(k=c.g.j(d.get("optionsCaption")),null!=k&&m.unshift(U))}var r=
|
||||
!1;g.beforeRemove=q=>a.removeChild(q);k=p;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(k=(q,t)=>{p(q,t);c.u.S(d.get("optionsAfterRender"),null,[t[0],q!==U?q:void 0])});c.g.Pb(a,m,(q,t,u)=>{u.length&&(h=!e&&u[0].selected?[c.F.R(u[0])]:[],r=!0);t=a.ownerDocument.createElement("option");q===U?(c.g.jb(t,d.get("optionsCaption")),c.F.Na(t,void 0)):(u=n(q,d.get("optionsValue"),q),c.F.Na(t,c.g.j(u)),q=n(q,d.get("optionsText"),u),c.g.jb(t,q));return[t]},g,k);e||(m=h.length,
|
||||
(f?m&&b().length<m:m&&0<=a.selectedIndex?c.F.R(a.options[a.selectedIndex])!==h[0]:m||0<=a.selectedIndex)&&c.u.S(c.g.Sb,null,[a,"change"]));(e||c.u.eb())&&c.l.notify(a,c.l.G);l&&20<Math.abs(l-a.scrollTop)&&(a.scrollTop=l)}};c.h.options.gb=c.g.i.Z();c.h.style={update:(a,b)=>{c.g.O(c.g.j(b()||{}),(d,f)=>{f=c.g.j(f);if(null==f||!1===f)f="";if(/^--/.test(d))a.style.setProperty(d,f);else{d=d.replace(/-(\w)/g,(k,e)=>e.toUpperCase());var l=a.style[d];a.style[d]=f;f===l||a.style[d]!=l||isNaN(f)||(a.style[d]=
|
||||
f+"px")}})}};c.h.submit={init:(a,b,d,f,l)=>{if("function"!=typeof b())throw Error("The value for a submit binding must be a function");a.addEventListener("submit",k=>{var e=b();try{var g=e.call(l.$data,a)}finally{!0!==g&&k.preventDefault()}})}};c.h.text={init:()=>({controlsDescendantBindings:!0}),update:(a,b)=>{8===a.nodeType&&(a.text||a.after(a.text=M.createTextNode("")),a=a.text);c.g.jb(a,b())}};c.m.ca.text=!0;c.h.textInput={init:(a,b,d)=>{var f=a.value,l,k,e=()=>{clearTimeout(l);k=l=void 0;var h=
|
||||
a.value;f!==h&&(f=h,c.I.ob(b(),d,"textInput",h))},g=()=>{var h=c.g.j(b());null==h&&(h="");void 0!==k&&h===k?setTimeout(g,4):a.value!==h&&(a.value=h,f=a.value)};a.addEventListener("input",e);a.addEventListener("change",e);a.addEventListener("blur",e);c.s(g,{o:a})}};c.I.mb.add("textInput");c.h.textinput={preprocess:(a,b,d)=>d("textInput",a)};c.h.value={init:(a,b,d)=>{var f=a.matches("SELECT"),l=a.matches("INPUT");if(!l||"checkbox"!=a.type&&"radio"!=a.type){var k=new Set,e=d.get("valueUpdate"),g=null,
|
||||
h=()=>{g=null;var m=b(),r=c.F.R(a);c.I.ob(m,d,"value",r)};e&&("string"==typeof e?k.add(e):e.forEach(m=>k.add(m)),k.delete("change"));k.forEach(m=>{var r=h;(m||"").startsWith("after")&&(r=()=>{g=c.F.R(a);setTimeout(h,0)},m=m.slice(5));a.addEventListener(m,r)});var n=l&&"file"==a.type?()=>{var m=c.g.j(b());null==m||""===m?a.value="":c.u.S(h)}:()=>{var m=c.g.j(b()),r=c.F.R(a);if(null!==g&&m===g)setTimeout(n,0);else if(m!==r||void 0===r)f?(r=d.get("valueAllowUnset"),c.F.Na(a,m,r),r||m===c.F.R(a)||c.u.S(h)):
|
||||
c.F.Na(a,m)};if(f){var p;c.l.subscribe(a,c.l.G,()=>{p?d.get("valueAllowUnset")?n():h():(a.addEventListener("change",h),p=c.s(n,{o:a}))},null,{notifyImmediately:!0})}else a.addEventListener("change",h),c.s(n,{o:a})}else c.wb(a,{checkedValue:b})},update:()=>{}};c.I.mb.add("value");c.h.visible={update:(a,b)=>{b=c.g.j(b());var d="none"!=a.style.display;b&&!d?a.style.display="":d&&!b&&(a.style.display="none")}};c.h.hidden={update:(a,b)=>a.hidden=!!c.g.j(b())};(function(a){c.h[a]={init:function(b,d,f,l,
|
||||
k){return c.h.event.init.call(this,b,()=>({[a]:d()}),f,l,k)}}})("click");(()=>{let a=c.g.i.Z();class b{constructor(f){this.Xa=f}Ja(...f){let l=this.Xa;if(!f.length)return c.g.i.get(l,a)||(11===this.L?l.content:1===this.L?l:void 0);c.g.i.set(l,a,f[0])}}class d extends b{constructor(f){super(f);f&&(this.L=f.matches("TEMPLATE")&&f.content?f.content.nodeType:1)}}c.Ka={Xa:d,Qa:b}})();(()=>{var a=(e,g,h)=>{var n;for(g=c.m.nextSibling(g);e&&(n=e)!==g;)e=c.m.nextSibling(n),h(n,e)},b=(e,g)=>{if(e.length){var h=
|
||||
e[0],n=h.parentNode;a(h,e[e.length-1],p=>{1!==p.nodeType&&8!==p.nodeType||c.xb(g,p)});c.g.Aa(e,n)}},d=(e,g,h,n)=>{var p=(e&&(e.nodeType?e:0<e.length?e[0]:null)||h||{}).ownerDocument;if("string"==typeof h){p=p||M;p=p.getElementById(h);if(!p)throw Error("Cannot find template with ID "+h);h=new c.Ka.Xa(p)}else if([1,8].includes(h.nodeType))h=new c.Ka.Qa(h);else throw Error("Unknown template type: "+h);h=(h=h.Ja?h.Ja():null)?[...h.cloneNode(!0).childNodes]:null;if("number"!=typeof h.length||0<h.length&&
|
||||
"number"!=typeof h[0].nodeType)throw Error("Template engine must return an array of DOM nodes");p=!1;switch(g){case "replaceChildren":c.m.ta(e,h);p=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+g);}p&&(b(h,n),"replaceChildren"==g&&c.l.notify(e,c.l.G));return h},f=(e,g,h)=>c.T(e)?e():"function"===typeof e?e(g,h):e;c.rc=function(e,g,h,n){h=h||{};var p=p||"replaceChildren";if(n){var m=n.nodeType?n:0<n.length?n[0]:null;return c.s(()=>{var r=g instanceof c.ea?g:new c.ea(g,
|
||||
null,null,null,{exportDependencies:!0}),q=f(e,r.$data,r);d(n,p,q,r,h)},{oa:()=>!m||!c.g.Za(m),o:m})}console.log("no targetNodeOrNodeArray")};c.sc=(e,g,h,n,p)=>{function m(v,z){c.u.S(c.g.Pb,null,[n,v,t,h,u,z]);c.l.notify(n,c.l.G)}var r,q=h.as,t=(v,z)=>{r=p.createChildContext(v,{as:q,extend:C=>{C.$index=z;q&&(C[q+"Index"]=z)}});v=f(e,v,r);return d(n,"ignoreTargetNode",v,r,h)},u=(v,z)=>{b(z,r);r=null};if(!h.beforeRemove&&c.Jb(g)){m(g.P());var w=g.subscribe(v=>{m(g(),v)},null,"arrayChange");w.o(n);return w}return c.s(()=>
|
||||
|
|
|
@ -73,7 +73,7 @@ ko.bindingHandlers['options'] = {
|
|||
if (allBindings['has']('optionsCaption')) {
|
||||
captionValue = ko.utils.unwrapObservable(allBindings.get('optionsCaption'));
|
||||
// If caption value is null or undefined, don't show a caption
|
||||
if (captionValue !== null && captionValue !== undefined) {
|
||||
if (captionValue != null) {
|
||||
filteredArray.unshift(captionPlaceholder);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue