D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
local
/
psa
/
admin
/
cp
/
public
/
javascript
/
components
/
common
/
Filename :
ServerMailAntivirusPromo.js
back
Copy
(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/common/ServerMailAntivirusPromo"],{3066:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>p});var t=i(596),s=i.n(t),r=i(586),o=i(286),a=i(89),l=i(646),c=(i(3067),i(3068)),d=i.n(c),m=i(285);const u=a.Locale.getSection("components.common.ServerMailAntivirusPromo"),v=a.Locale.getTranslate("components.common.ServerMailAntivirusPromo"),f=a.Locale.getTranslate("admin.controllers.server.tools"),h=({isAnchor:e,to:n,children:i})=>e?(0,m.jsx)("a",{href:n,children:i}):(0,m.jsx)(l.default,{to:n,children:i});h.propTypes={isAnchor:s().bool.isRequired,to:s().string.isRequired,children:s().node.isRequired};const k="premium-av",g=({isOnDomainEmailPage:e=!1})=>{const{data:n,loading:i,error:t}=(0,r.useQuery)(d());if(i)return(0,m.jsx)(o.Skeleton,{height:100});if(t)return(0,m.jsx)(o.StatusMessage,{intent:"danger",children:t.message});const{serverMail:{availableAntivirusExtensions:s},os:{isWindows:l}}=n;if(!s.length)return(0,m.jsx)(o.Status,{icon:{size:"24"},intent:"info",children:(0,m.jsx)(v,{content:"noAntivirus"})});const c=s.filter((({isInstalled:e})=>e));if(!c.length)return(0,m.jsxs)(o.Status,{icon:{size:"24"},intent:"info",children:[(0,m.jsx)(v,{content:"noAntivirus"})," ",(0,m.jsx)(v,{content:"warning"}),(0,m.jsx)("br",{}),(0,m.jsx)(v,{content:"promoDescription"}),(0,m.jsx)("ul",{className:"server-mail-antivirus-promo__list",children:s.map((({name:e,isRecommended:n,catalogUrl:i})=>(0,m.jsx)("li",{children:(0,m.jsxs)("a",{href:i,children:[e,n&&` ${u.lmsg("recommended")}`]})},e)))})]});const g=c.find((({code:e})=>e===k))||c[0],p=[{key:"purchase",instruction:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(v,{content:"toEnable"})," ",(0,m.jsx)("a",{href:g.catalogUrl,"data-action":"ServerMailAVPromoPurchase",children:(0,m.jsx)(v,{content:"purchase"})})]}),show:g.code!==k},{key:"enableAVComponent",instruction:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(v,{content:"enableAt"})," ",(0,m.jsx)(h,{to:"/cp/server/components",isAnchor:e,children:(0,m.jsx)(f,{content:"serverComponents"})})]}),show:l},{key:"enableServerMailAV",instruction:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(v,{content:"enableAt"})," ",(0,m.jsx)(h,{to:"/cp/server/mail/antivirus",isAnchor:e,children:a.Locale.getSection("admin.controllers.mail-settings.index").lmsg("title")})]}),show:!l&&e}].filter((({show:e=!0})=>e));return(0,m.jsxs)(o.Status,{icon:{size:"24"},intent:"info",children:[(0,m.jsx)(v,{content:"needActivation",params:{name:g.name}})," ",1===p.length?p[0].instruction:(0,m.jsx)("ul",{className:"server-mail-antivirus-promo__list",children:p.map((({key:e,instruction:n})=>(0,m.jsx)("li",{children:n},e)))})]})};g.propTypes={isOnDomainEmailPage:s().bool};const p=g},3065:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>t.default});var t=i(3066)},3068:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ServerMailAntivirusPromo"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"serverMail"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableAntivirusExtensions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isInstalled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isRecommended"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"catalogUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"os"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isWindows"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:247}};n.loc.source={body:"query ServerMailAntivirusPromo {\n serverMail {\n availableAntivirusExtensions {\n name\n isInstalled\n isRecommended\n catalogUrl\n code\n }\n }\n os {\n isWindows\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var t={};function s(e,n){for(var i=0;i<e.definitions.length;i++){var t=e.definitions[i];if(t.name&&t.name.value==n)return t}}n.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),t[e.name.value]=n}})),e.exports=n,e.exports.ServerMailAntivirusPromo=function(e,n){var i={kind:e.kind,definitions:[s(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var r=t[n]||new Set,o=new Set,a=new Set;for(r.forEach((function(e){a.add(e)}));a.size>0;){var l=a;a=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(t[e]||new Set).forEach((function(e){a.add(e)})))}))}return o.forEach((function(n){var t=s(e,n);t&&i.definitions.push(t)})),i}(n,"ServerMailAntivirusPromo")},3067:(e,n,i)=>{"use strict";i.r(n)}}]); //# sourceMappingURL=ServerMailAntivirusPromo.js.map?27644f097bcb6c0cc2e0