(self.webpackChunkncpasswords=self.webpackChunkncpasswords||[]).push([[5322],{61758(t,s,e){"use strict";e.r(s),e.d(s,{default:()=>r});const r={}},39921(t,s,e){"use strict";e.r(s),e.d(s,{default:()=>v});var r=function(){var t=this,s=t._self._c;return s("div",{class:t.getContentClass,attrs:{id:"app-content"}},[s("div",{staticClass:"app-content-left"},[s("breadcrumb",{attrs:{showAddNew:!1,items:t.getBreadcrumb}}),t._v(" "),s("div",{staticClass:"item-list"},[t.isNotEmpty?s("header-line",{attrs:{field:t.sorting.field,ascending:t.sorting.ascending},on:{updateSorting:function(s){return t.updateSorting(s)}}}):t._e(),t._v(" "),t._l(t.securityStatus,function(e,r){return void 0===t.$route.params.status?s("security-line",{key:e,attrs:{status:r,label:e}}):t._e()}),t._v(" "),t._l(t.passwords,function(t){return s("password-line",{key:t.id,attrs:{password:t}})}),t._v(" "),t.isNotEmpty?s("footer-line",{attrs:{passwords:t.passwords}}):t._e(),t._v(" "),t.isEmpty?s("empty",{attrs:{text:t.getEmptyText}}):t._e()],2)],1)])};r._withStripped=!0;var a=e(56423),i=e(45314),o=e(83571),n=e(30845),l=e(56394),u=function(){var t=this,s=t._self._c;return s("div",{staticClass:"row security",attrs:{"data-security-level":t.status},on:{click:t.setSecurityStatus}},[s("translate",{staticClass:"title",attrs:{say:t.label}},[s("shield-half-full-icon",{staticClass:"icon",attrs:{slot:"icon","fill-color":t.fillColor},slot:"icon"})],1)],1)};u._withStripped=!0;var c=e(53024);const d={components:{ShieldHalfFullIcon:e(35628).A,Translate:c.A},props:{status:{type:Number},label:{type:String}},computed:{fillColor(){switch(this.status){case 0:return"var(--color-element-success)";case 1:return"var(--color-element-warning)";case 2:return"var(--color-element-error)"}}},methods:{setSecurityStatus(){this.$router.push({name:"Security",params:{status:this.status.toString()}})}}};e(5189);var h=e(14486);const p=(0,h.A)(d,u,[],!1,null,null,null).exports;var m=e(54164),y=e(87778),f=e(90512),g=e(80444);const w={extends:m.A,components:{Breadcrumb:i.A,HeaderLine:o.A,FooterLine:n.A,PasswordLine:l.A,SecurityLine:p,empty:()=>e.e(5645).then(e.bind(e,80149))},data:()=>({loading:!1,securityStatus:["Secure","Weak","Breached"]}),computed:{isEmpty(){return!this.loading&&(!(!this.search.active||0!==this.search.total)||!this.passwords.length&&void 0!==this.$route.params.status)},isNotEmpty(){return!this.loading&&!this.isEmpty&&void 0!==this.$route.params.status},getEmptyText(){return this.search.active?g.A.translate('We could not find anything for "{query}"',{query:this.search.query}):"0"===this.$route.params.status.toString()?"Better check the other sections":"That's probably a good sign"},getBreadcrumb(){if(void 0!==this.$route.params.status){let t=this.$route.params.status,s=this.securityStatus[t];return[{path:{name:"Security"},label:g.A.translate("Security")},{path:this.$route.path,label:g.A.translate(s)}]}return[]}},methods:{refreshView:function(){if(void 0!==this.$route.params.status){let t=parseInt(this.$route.params.status),s=this.ui.showTags?"model+tags":"model";a.A.findPasswords({status:t},s).then(s=>{this.updatePasswordList(s,t)}).catch(console.error),this.passwords.length||(this.loading=!0)}else this.loading=!1,this.passwords=[]},updatePasswordList:function(t,s){parseInt(this.$route.params.status)===s&&(this.loading=!1,this.passwords=f.A.sortApiObjectArray(t,this.getPasswordsSortingField(),this.sorting.ascending))}},watch:{$route:function(){this.refreshView(),y.A.sidebar=null}}},v=(0,h.A)(w,r,[],!1,null,null,null).exports},5189(t,s,e){var r=e(61758);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.id,r,""]]),r.locals&&(t.exports=r.locals),(0,e(70534).A)("4ee9e0c6",r,!1,{})}}]);