import{j as w,b as M,g as V,h as H,d as k,m as u,a,c as m,q as p,w as o,f as t,o as l,l as d,t as r,F as _,G as x,e as s}from"./index-CTxlYqj4.js";import{a as I}from"./admin-CjK02gmr.js";import{V as C,a as B}from"./VToolbar-Cd2iSn8H.js";import{b as g,c as f,V as v}from"./VCard-DRptUN8Y.js";import{V as b}from"./VAlert-BiAap6Bx.js";import{V as A}from"./VDataTableVirtual-B6iCEfal.js";import{u as G}from"./global.store-C4iiNxy1.js";import"./tag-Dx3OexMp.js";import"./VAvatar-x_79C0tA.js";import"./VProgressCircular-ubzZW5PC.js";import"./VDataTable-CYPG0MtF.js";import"./VSelect-tV4GZAtn.js";import"./VTextField-CWm47OUI.js";import"./forwardRefs-BSESyuUp.js";import"./ssrBoot-DGgZQEVC.js";import"./VMenu-DTm7W1Hp.js";import"./VCheckboxBtn-xrhfoOlo.js";import"./VSelectionControl-Bdgm37Tl.js";import"./VChip-Def9BYoN.js";import"./VTable-B-HE2nmK.js";import"./filter-DaBUD6Rp.js";const N={class:"mt-4"},S=["innerHTML"],D=["innerHTML"],E=["innerHTML"],F=["innerHTML"],O=["innerHTML"],j=["innerHTML"],q=["innerHTML"],P={tag:"p"},R={tag:"p",class:"text-body-2"},U=["href"],Y={__name:"InformationView",setup($){const{$gettext:e}=M(),h=G(),c=V([]),T=[{title:e("Name"),value:"name"},{title:e("Installed version"),value:"version"},{title:e("Latest version"),value:"last_version"},{title:e("Description"),value:"description"}],y=H(()=>c.value.filter(i=>i.update).length>0);function L(i){return i.update?"green lighten-5":""}return k(()=>{I.getComponentsInformation().then(i=>{c.value=i.data})}),(i,z)=>(l(),u("div",null,[a(C,{flat:""},{default:o(()=>[a(B,null,{default:o(()=>[d(r(t(e)("Information")),1)]),_:1})]),_:1}),t(h).notifications.length?(l(),m(g,{key:0,class:"my-6"},{default:o(()=>[a(f,null,{default:o(()=>[d(r(t(e)("Important messages")),1)]),_:1}),a(v,null,{default:o(()=>[(l(!0),u(_,null,x(t(h).notifications,n=>(l(),m(b,{key:n.id,type:n.level,title:n.text,border:"start",variant:"tonal"},{default:o(()=>[n.id==="deprecatedpasswordscheme"?(l(),u(_,{key:0},[d(r(t(e)("The password scheme you are using has been deprecated and will be removed in the next minor version. The procedure to upgrade to a stronger scheme is as follows:"))+" ",1),s("ol",N,[s("li",{innerHTML:t(e)("Go to <strong>Settings > General</strong> section",!0)},null,8,S),s("li",{innerHTML:t(e)("Change the value of <strong>Default password scheme</strong>",!0)},null,8,D),s("li",{innerHTML:t(e)("Make sure <strong>Update password scheme at login</strong> option is enabled",!0)},null,8,E),s("li",{innerHTML:t(e)("Save your changes")},null,8,F),s("li",null,r(t(e)("Logout / Login with your current account so its password gets updated")),1),s("li",{innerHTML:t(e)("Inform <strong>ALL</strong> your users that they must login to Modoboa to complete the operation",!0)},null,8,O)]),s("p",{class:"mt-4",innerHTML:t(e)("You must apply this procedure <strong>BEFORE</strong> you install a newest version of Modoboa, otherwise <strong>you will be unable to connect to the web interface anymore</strong>.",!0)},null,8,j),s("p",{class:"mt-4",innerHTML:t(e)("Please note that you will see this message until <strong>ALL</strong> user passwords have been converted using the new scheme.",!0)},null,8,q)],64)):p("",!0)]),_:2},1032,["type","title"]))),128))]),_:1})]),_:1})):p("",!0),a(g,{class:"mt-6"},{default:o(()=>[a(f,null,{default:o(()=>[d(r(t(e)("Installed components")),1)]),_:1}),a(v,null,{default:o(()=>[y.value?(l(),m(b,{key:0,variant:"tonal",type:"success",text:"",border:"start"},{default:o(()=>[s("div",P,r(t(e)("One or more updates are available")),1),s("div",R,r(t(e)("Check out the following list to find related components")),1)]),_:1})):p("",!0),a(A,{headers:T,items:c.value,"item-class":L},{"item.last_version":o(({item:n})=>[n.changelog_url?(l(),u("a",{key:0,href:n.changelog_url,target:"_blank"},r(n.last_version),9,U)):(l(),u(_,{key:1},[d(r(n.last_version),1)],64))]),_:2},1032,["items"])]),_:1})]),_:1})]))}},he=w(Y,[["__scopeId","data-v-f05bf0f7"]]);export{he as default};
