1 "use strict";(self.webpackChunkpleroma_fe=self.webpackChunkpleroma_fe||[]).push([[8859],{17135:(t,e,n)=>{n.r(e),n.d(e,{default:()=>oe});var a=n(66252),i=n(3577),r=["label"],l=["label"],o={class:"setting-item"},s={href:"https://docs-develop.pleroma.social/backend/configuration/howto_database_config/",target:"_blank"},c=(0,a._)("code",null,"config :pleroma, configurable_from_database",-1),d=(0,a._)("code",null,"true",-1),u=["label"],p=["label"],m=["label"],f=n(79354),h=["label"],_={class:"setting-item"},b={class:"setting-list"},g={key:0},w={class:"setting-item"},v={class:"setting-list"},y={class:"setting-list suboptions"},k={class:"setting-list suboptions"},O={class:"setting-list"},D={class:"setting-list suboptions"},S={key:0},j={class:"setting-list"},P={class:"setting-item"},$={class:"setting-list"},W={key:0},z={class:"setting-list"},Z={class:"setting-list"},C={class:"setting-list"},L={class:"setting-list"},q=n(4942),I=n(59236),M=n(77218),x=n(87449),U={key:0,class:"StringSetting"},E=["for"],A=["id","disabled","value"],B=n(7761);function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}const T=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?F(Object(n),!0).forEach((function(e){(0,q.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},B.Z);var Y=n(83744);const H=(0,Y.Z)(T,[["render",function(t,e,n,r,l,o){var s=(0,a.up)("ModifiedIndicator"),c=(0,a.up)("ProfileSettingIndicator"),d=(0,a.up)("DraftButtons");return t.matchesExpertLevel?((0,a.wg)(),(0,a.iD)("label",U,[(0,a._)("label",{for:t.path,class:(0,i.C_)({faint:t.shouldBeDisabled})},[t.backendDescriptionLabel?((0,a.wg)(),(0,a.iD)(a.HY,{key:0},[(0,a.Uk)((0,i.zw)(t.backendDescriptionLabel+" "),1)],64)):"admin"===t.source?((0,a.wg)(),(0,a.iD)(a.HY,{key:1},[(0,a.Uk)(" MISSING LABEL FOR "+(0,i.zw)(t.path),1)],64)):(0,a.WI)(t.$slots,"default",{key:2})],10,E),(0,a._)("input",{id:t.path,class:"string-input",disabled:t.shouldBeDisabled,value:t.realDraftMode?t.draft:t.state,onChange:e[0]||(e[0]=function(){return t.update&&t.update.apply(t,arguments)})},null,40,A),(0,a.Uk)(" "+(0,i.zw)(" ")+" "),(0,a.Wm)(s,{changed:t.isChanged,onclick:t.reset},null,8,["changed","onclick"]),(0,a.Wm)(c,{"is-profile":t.isProfileSetting},null,8,["is-profile"]),(0,a.Wm)(d),t.backendDescriptionDescription?((0,a.wg)(),(0,a.iD)("p",{key:0,class:(0,i.C_)(["setting-description",{faint:t.shouldBeDisabled}])},(0,i.zw)(t.backendDescriptionDescription+" "),3)):(0,a.kq)("",!0)])):(0,a.kq)("",!0)}]]);var G={key:0,class:"GroupSetting"},K=n(18446),N=n.n(K);function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){(0,q.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const X=V(V({},B.Z),{},{computed:V(V({},B.Z.computed),{},{isDirty:function(){return!N()(this.state,this.draft)}})}),J=(0,Y.Z)(X,[["render",function(t,e,n,i,r,l){var o=(0,a.up)("ModifiedIndicator"),s=(0,a.up)("ProfileSettingIndicator"),c=(0,a.up)("DraftButtons");return t.matchesExpertLevel?((0,a.wg)(),(0,a.iD)("span",G,[(0,a.Wm)(o,{changed:t.isChanged,onclick:t.reset},null,8,["changed","onclick"]),(0,a.Wm)(s,{"is-profile":t.isProfileSetting},null,8,["is-profile"]),(0,a.Wm)(c)])):(0,a.kq)("",!0)}]]);var Q=["for"],tt={class:"attachment-input"},et={class:"controls control-field"},nt={for:"path"},at=["id","disabled","value"],it={key:0},rt={class:"controls control-upload"},lt=n(58394),ot=n(37804),st=n(66596);function ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(n),!0).forEach((function(e){(0,q.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const ut=dt(dt({},B.Z),{},{props:dt(dt({},B.Z.props),{},{compact:Boolean,acceptTypes:{type:String,required:!1,default:"image/*"}}),components:dt(dt({},B.Z.components),{},{MediaUpload:ot.Z,Attachment:st.Z}),computed:dt(dt({},B.Z.computed),{},{attachment:function(){var t=this.realDraftMode?this.draft:this.state,e=t.includes("://")?t:this.$store.state.instance.server+t;return{mimetype:(0,lt.iL)(e),url:e}}}),methods:dt(dt({},B.Z.methods),{},{setMediaFile:function(t){this.realDraftMode?this.draft=t.url:this.configSink(this.path,t.url)}})}),pt=(0,Y.Z)(ut,[["render",function(t,e,n,r,l,o){var s=(0,a.up)("ModifiedIndicator"),c=(0,a.up)("ProfileSettingIndicator"),d=(0,a.up)("Attachment"),u=(0,a.up)("MediaUpload"),p=(0,a.up)("DraftButtons");return t.matchesExpertLevel?((0,a.wg)(),(0,a.iD)("span",{key:0,class:(0,i.C_)(["AttachmentSetting",{"-compact":t.compact}])},[(0,a._)("label",{for:t.path,class:(0,i.C_)({faint:t.shouldBeDisabled})},[t.backendDescriptionLabel?((0,a.wg)(),(0,a.iD)(a.HY,{key:0},[(0,a.Uk)((0,i.zw)(t.backendDescriptionLabel+" "),1)],64)):"admin"===t.source?((0,a.wg)(),(0,a.iD)(a.HY,{key:1},[(0,a.Uk)(" MISSING LABEL FOR "+(0,i.zw)(t.path),1)],64)):(0,a.WI)(t.$slots,"default",{key:2})],10,Q),t.backendDescriptionDescription?((0,a.wg)(),(0,a.iD)("p",{key:0,class:(0,i.C_)(["setting-description",{faint:t.shouldBeDisabled}])},(0,i.zw)(t.backendDescriptionDescription+" "),3)):(0,a.kq)("",!0),(0,a._)("div",tt,[(0,a._)("div",et,[(0,a._)("label",nt,(0,i.zw)(t.$t("settings.url")),1),(0,a._)("input",{id:t.path,class:"string-input",disabled:t.shouldBeDisabled,value:t.realDraftMode?t.draft:t.state,onChange:e[0]||(e[0]=function(){return t.update&&t.update.apply(t,arguments)})},null,40,at),(0,a.Uk)(" "+(0,i.zw)(" ")+" "),(0,a.Wm)(s,{changed:t.isChanged,onclick:t.reset},null,8,["changed","onclick"]),(0,a.Wm)(c,{"is-profile":t.isProfileSetting},null,8,["is-profile"])]),t.compact?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",it,(0,i.zw)(t.$t("settings.preview")),1)),(0,a.Wm)(d,{class:"attachment",compact:t.compact,attachment:t.attachment,size:"small","hide-description":"",onSetMedia:t.onMedia,onNaturalSizeLoad:t.onNaturalSizeLoad},null,8,["compact","attachment","onSetMedia","onNaturalSizeLoad"]),(0,a._)("div",rt,[(0,a.Wm)(u,{ref:"mediaUpload",class:"media-upload-icon","drop-files":t.dropFiles,"normal-button":"","accept-types":t.acceptTypes,onUploaded:t.setMediaFile,onUploadFailed:t.uploadFailed},null,8,["drop-files","accept-types","onUploaded","onUploadFailed"])])]),(0,a.Wm)(p)],2)):(0,a.kq)("",!0)}]]);var mt=n(76875),ft=n(9382),ht=n(84131);function _t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}ft.vI.add(ht.g4A);const bt={provide:function(){return{defaultDraftMode:!0,defaultSource:"admin"}},components:{BooleanSetting:I.Z,ChoiceSetting:M.Z,IntegerSetting:x.Z,StringSetting:H,AttachmentSetting:pt,GroupSetting:J},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(n),!0).forEach((function(e){(0,q.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,mt.Z)())},gt=(0,Y.Z)(bt,[["render",function(t,e,n,r,l,o){var s=(0,a.up)("StringSetting"),c=(0,a.up)("AttachmentSetting"),d=(0,a.up)("BooleanSetting"),u=(0,a.up)("IntegerSetting"),p=(0,a.up)("ChoiceSetting"),m=(0,a.up)("GroupSetting");return(0,a.wg)(),(0,a.iD)("div",{label:t.$t("admin_dash.tabs.instance")},[(0,a._)("div",_,[(0,a._)("h2",null,(0,i.zw)(t.$t("admin_dash.instance.instance")),1),(0,a._)("ul",b,[(0,a._)("li",null,[(0,a.Wm)(s,{path:":pleroma.:instance.:name"})]),void 0!==t.adminDraft[":pleroma"][":instance"][":favicon"]?((0,a.wg)(),(0,a.iD)("li",g,[(0,a.Wm)(c,{compact:"",path:":pleroma.:instance.:favicon"})])):(0,a.kq)("",!0),(0,a._)("li",null,[(0,a.Wm)(s,{path:":pleroma.:instance.:email"})]),(0,a._)("li",null,[(0,a.Wm)(s,{path:":pleroma.:instance.:description"})]),(0,a._)("li",null,[(0,a.Wm)(s,{path:":pleroma.:instance.:short_description"})]),(0,a._)("li",null,[(0,a.Wm)(c,{compact:"",path:":pleroma.:instance.:instance_thumbnail"})]),(0,a._)("li",null,[(0,a.Wm)(c,{path:":pleroma.:instance.:background_image"})])])]),(0,a._)("div",w,[(0,a._)("h2",null,(0,i.zw)(t.$t("admin_dash.instance.registrations")),1),(0,a._)("ul",v,[(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:instance.:registrations_open"}),(0,a._)("ul",y,[(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:instance.:invites_enabled","parent-path":":pleroma.:instance.:registrations_open","parent-invert":""})])])]),(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:instance.:birthday_required"}),(0,a._)("ul",k,[(0,a._)("li",null,[(0,a.Wm)(u,{path:":pleroma.:instance.:birthday_min_age","parent-path":":pleroma.:instance.:birthday_required"})])])]),(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:instance.:account_activation_required"})]),(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:instance.:account_approval_required"})]),(0,a._)("li",null,[(0,a._)("h3",null,(0,i.zw)(t.$t("admin_dash.instance.captcha_header")),1),(0,a._)("ul",O,[(0,a._)("li",null,[(0,a.Wm)(d,{path:[":pleroma","Pleroma.Captcha",":enabled"]},null,8,["path"]),(0,a._)("ul",D,[(0,a._)("li",null,[(0,a.Wm)(p,{path:[":pleroma","Pleroma.Captcha",":method"],"parent-path":[":pleroma","Pleroma.Captcha",":enabled"],"option-label-map":{"Pleroma.Captcha.Native":t.$t("admin_dash.captcha.native"),"Pleroma.Captcha.Kocaptcha":t.$t("admin_dash.captcha.kocaptcha")}},null,8,["path","parent-path","option-label-map"]),(0,a.Wm)(u,{path:[":pleroma","Pleroma.Captcha",":seconds_valid"],"parent-path":[":pleroma","Pleroma.Captcha",":enabled"]},null,8,["path","parent-path"])]),t.adminDraft[":pleroma"]["Pleroma.Captcha"][":enabled"]&&"Pleroma.Captcha.Kocaptcha"===t.adminDraft[":pleroma"]["Pleroma.Captcha"][":method"]?((0,a.wg)(),(0,a.iD)("li",S,[(0,a._)("h4",null,(0,i.zw)(t.$t("admin_dash.instance.kocaptcha")),1),(0,a._)("ul",j,[(0,a._)("li",null,[(0,a.Wm)(s,{path:[":pleroma","Pleroma.Captcha.Kocaptcha",":endpoint"]},null,8,["path"])])])])):(0,a.kq)("",!0)])])])])])]),(0,a._)("div",P,[(0,a._)("h2",null,(0,i.zw)(t.$t("admin_dash.instance.access")),1),(0,a._)("ul",$,[(0,a._)("li",null,[(0,a.Wm)(d,{"override-backend-description":"","override-backend-description-label":"",path:":pleroma.:instance.:public"})]),(0,a._)("li",null,[(0,a.Wm)(p,{"override-backend-description":"","override-backend-description-label":"",path:":pleroma.:instance.:limit_to_local_content"})]),t.expertLevel?((0,a.wg)(),(0,a.iD)("li",W,[(0,a._)("h3",null,(0,i.zw)(t.$t("admin_dash.instance.restrict.header")),1),(0,a._)("p",null,(0,i.zw)(t.$t("admin_dash.instance.restrict.description")),1),(0,a._)("ul",z,[(0,a._)("li",null,[(0,a._)("h4",null,(0,i.zw)(t.$t("admin_dash.instance.restrict.timelines")),1),(0,a._)("ul",Z,[(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:restrict_unauthenticated.:timelines.:local","indeterminate-state":":if_instance_is_private","swap-description-and-label":"","hide-description":""})]),(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:restrict_unauthenticated.:timelines.:federated","indeterminate-state":":if_instance_is_private","swap-description-and-label":"","hide-description":""})]),(0,a._)("li",null,[(0,a.Wm)(m,{path:":pleroma.:restrict_unauthenticated.:timelines"})])])]),(0,a._)("li",null,[(0,a._)("h4",null,(0,i.zw)(t.$t("admin_dash.instance.restrict.profiles")),1),(0,a._)("ul",C,[(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:restrict_unauthenticated.:profiles.:local","indeterminate-state":":if_instance_is_private","swap-description-and-label":"","hide-description":""})]),(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:restrict_unauthenticated.:profiles.:remote","indeterminate-state":":if_instance_is_private","swap-description-and-label":"","hide-description":""})]),(0,a._)("li",null,[(0,a.Wm)(m,{path:":pleroma.:restrict_unauthenticated.:profiles"})])])]),(0,a._)("li",null,[(0,a._)("h4",null,(0,i.zw)(t.$t("admin_dash.instance.restrict.activities")),1),(0,a._)("ul",L,[(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:restrict_unauthenticated.:activities.:local","indeterminate-state":":if_instance_is_private","swap-description-and-label":"","hide-description":""})]),(0,a._)("li",null,[(0,a.Wm)(d,{path:":pleroma.:restrict_unauthenticated.:activities.:remote","indeterminate-state":":if_instance_is_private","swap-description-and-label":"","hide-description":""})]),(0,a._)("li",null,[(0,a.Wm)(m,{path:":pleroma.:restrict_unauthenticated.:activities"})])])])])])):(0,a.kq)("",!0)])])],8,h)}]]);var wt=["label"],vt={class:"setting-item"},yt={class:"setting-list"},kt={class:"setting-list"},Ot={class:"setting-list"},Dt={class:"setting-list"},St={class:"setting-list"},jt={class:"setting-list"};function Pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}ft.vI.add(ht.g4A);const $t={data:function(){},components:{BooleanSetting:I.Z,ChoiceSetting:M.Z,IntegerSetting:x.Z,StringSetting:H},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(n),!0).forEach((function(e){(0,q.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,mt.Z)())},Wt=(0,Y.Z)($t,[["render",function(t,e,n,r,l,o){var s=(0,a.up)("IntegerSetting");return(0,a.wg)(),(0,a.iD)("div",{label:t.$t("admin_dash.tabs.limits")},[(0,a._)("div",vt,[(0,a._)("h2",null,(0,i.zw)(t.$t("admin_dash.limits.arbitrary_limits")),1),(0,a._)("ul",yt,[(0,a._)("li",null,[(0,a._)("h3",null,(0,i.zw)(t.$t("admin_dash.limits.posts")),1),(0,a._)("ul",kt,[(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:limit","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:remote_limit",expert:"1","draft-mode":""})])])]),(0,a._)("li",null,[(0,a._)("h3",null,(0,i.zw)(t.$t("admin_dash.limits.uploads")),1),(0,a._)("ul",Ot,[(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:description_limit","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:upload_limit","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:max_media_attachments","draft-mode":""})])])]),(0,a._)("li",null,[(0,a._)("h3",null,(0,i.zw)(t.$t("admin_dash.limits.users")),1),(0,a._)("ul",Dt,[(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:max_pinned_statuses","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:user_bio_length","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:user_name_length","draft-mode":""})]),(0,a._)("li",null,[(0,a._)("h4",null,(0,i.zw)(t.$t("admin_dash.limits.profile_fields")),1),(0,a._)("ul",St,[(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:max_account_fields","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:max_remote_account_fields","draft-mode":"",expert:"1"})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:account_field_name_length","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:account_field_value_length","draft-mode":""})])])]),(0,a._)("li",null,[(0,a._)("h4",null,(0,i.zw)(t.$t("admin_dash.limits.user_uploads")),1),(0,a._)("ul",jt,[(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:avatar_upload_limit","draft-mode":""})]),(0,a._)("li",null,[(0,a.Wm)(s,{source:"admin",path:":pleroma.:instance.:banner_upload_limit","draft-mode":""})])])])])])])])],8,wt)}]]);var zt=n(49963),Zt=["label"],Ct={class:"setting-item"},Lt={class:"setting-list"},qt={class:"setting-list"},It={class:"setting-list relative"},Mt={class:"cards-list"},xt={key:0},Ut=["href"],Et={key:1},At={key:2},Bt=["href"],Ft={class:"btn-group"},Tt=["onClick"],Yt={class:"dropdown-menu"},Ht=["onClick"],Gt=["title"],Kt={key:0,class:"btn-group"},Nt=["disabled","onClick"],Rt={class:"dropdown-menu"},Vt=["onClick"],Xt=["title"],Jt=n(15861),Qt=n(64687),te=n.n(Qt),ee=n(84535),ne=n(29187);function ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}ft.vI.add(ht.g4A);const ie={provide:function(){return{defaultDraftMode:!0,defaultSource:"admin"}},data:function(){return{working:!1}},components:{BooleanSetting:I.Z,ChoiceSetting:M.Z,IntegerSetting:x.Z,StringSetting:H,GroupSetting:J,PanelLoading:ne.Z,Popover:ee.default},created:function(){this.user.rights.admin&&this.$store.dispatch("loadFrontendsStuff")},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ae(Object(n),!0).forEach((function(e){(0,q.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({frontends:function(){return this.$store.state.adminSettings.frontends}},(0,mt.Z)()),methods:{canInstall:function(t){var e=this.frontends.find((function(e){return e.name===t.name}));return!!e&&e.refs.includes(t.ref)},getSuggestedRef:function(t){var e=this.adminDraft[":pleroma"][":frontends"][":primary"];return(null==e?void 0:e.name)===t.name&&this.canInstall(e)?e.ref:t.refs[0]},update:function(t,e){var n=this,a=e||this.getSuggestedRef(t),i=t.name,r={name:i,ref:a};this.working=!0,this.$store.state.api.backendInteractor.installFrontend({payload:r}).finally((function(){n.working=!1})).then(function(){var t=(0,Jt.Z)(te().mark((function t(e){var r;return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.$store.dispatch("loadFrontendsStuff"),!e.error){t.next=8;break}return t.next=4,e.error.json();case 4:r=t.sent,n.$store.dispatch("pushGlobalNotice",{level:"error",messageKey:"admin_dash.frontend.failure_installing_frontend",messageArgs:{version:i+"/"+a,reason:r.error},timeout:5e3}),t.next=9;break;case 8:n.$store.dispatch("pushGlobalNotice",{level:"success",messageKey:"admin_dash.frontend.success_installing_frontend",messageArgs:{version:i+"/"+a},timeout:2e3});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},setDefault:function(t,e){var n=e||this.getSuggestedRef(t),a=t.name;this.$store.commit("updateAdminDraft",{path:[":pleroma",":frontends",":primary"],value:{name:a,ref:n}})}}},re=(0,Y.Z)(ie,[["render",function(t,e,n,r,l,o){var s=(0,a.up)("StringSetting"),c=(0,a.up)("GroupSetting"),d=(0,a.up)("PanelLoading"),u=(0,a.up)("i18n-t"),p=(0,a.up)("FAIcon"),m=(0,a.up)("Popover");return(0,a.wg)(),(0,a.iD)("div",{class:"frontends-tab",label:t.$t("admin_dash.tabs.frontends")},[(0,a._)("div",Ct,[(0,a._)("h2",null,(0,i.zw)(t.$t("admin_dash.tabs.frontends")),1),(0,a._)("p",null,(0,i.zw)(t.$t("admin_dash.frontend.wip_notice")),1),(0,a._)("ul",Lt,[(0,a._)("li",null,[(0,a._)("h3",null,(0,i.zw)(t.$t("admin_dash.frontend.default_frontend")),1),(0,a._)("p",null,(0,i.zw)(t.$t("admin_dash.frontend.default_frontend_tip")),1),(0,a._)("ul",qt,[(0,a._)("li",null,[(0,a.Wm)(s,{path:":pleroma.:frontends.:primary.name"})]),(0,a._)("li",null,[(0,a.Wm)(s,{path:":pleroma.:frontends.:primary.ref"})]),(0,a._)("li",null,[(0,a.Wm)(c,{path:":pleroma.:frontends.:primary"})])])])]),(0,a._)("div",It,[t.working?((0,a.wg)(),(0,a.j4)(d,{key:0,class:"overlay"})):(0,a.kq)("",!0),(0,a._)("h3",null,(0,i.zw)(t.$t("admin_dash.frontend.available_frontends")),1),(0,a._)("ul",Mt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(t.frontends,(function(e){var n,r,l,o;return(0,a.wg)(),(0,a.iD)("li",{key:e.name},[(0,a._)("strong",null,(0,i.zw)(e.name),1),(0,a.Uk)(" "+(0,i.zw)(" ")+" "),(null===(n=t.adminDraft[":pleroma"][":frontends"][":primary"])||void 0===n?void 0:n.name)===e.name?((0,a.wg)(),(0,a.iD)("span",xt,[(null===(r=t.adminDraft[":pleroma"][":frontends"][":primary"])||void 0===r?void 0:r.ref)===e.refs[0]?((0,a.wg)(),(0,a.j4)(u,{key:0,keypath:"admin_dash.frontend.is_default"})):((0,a.wg)(),(0,a.j4)(u,{key:1,keypath:"admin_dash.frontend.is_default_custom"},{version:(0,a.w5)((function(){return[(0,a._)("code",null,(0,i.zw)(t.adminDraft[":pleroma"][":frontends"][":primary"].ref),1)]})),_:1}))])):(0,a.kq)("",!0),(0,a._)("dl",null,[(0,a._)("dt",null,(0,i.zw)(t.$t("admin_dash.frontend.repository")),1),(0,a._)("dd",null,[(0,a._)("a",{href:e.git,target:"_blank"},(0,i.zw)(e.git),9,Ut)]),t.expertLevel?((0,a.wg)(),(0,a.iD)(a.HY,{key:0},[(0,a._)("dt",null,(0,i.zw)(t.$t("admin_dash.frontend.versions")),1),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.refs,(function(t){return(0,a.wg)(),(0,a.iD)("dd",{key:t},[(0,a._)("code",null,(0,i.zw)(t),1)])})),128))],64)):(0,a.kq)("",!0),t.expertLevel?((0,a.wg)(),(0,a.iD)("dt",Et,(0,i.zw)(t.$t("admin_dash.frontend.build_url")),1)):(0,a.kq)("",!0),t.expertLevel?((0,a.wg)(),(0,a.iD)("dd",At,[(0,a._)("a",{href:e.build_url,target:"_blank"},(0,i.zw)(e.build_url),9,Bt)])):(0,a.kq)("",!0)]),(0,a._)("div",null,[(0,a._)("span",Ft,[(0,a._)("button",{class:"button button-default btn",type:"button",onClick:function(n){return t.update(e)}},[(0,a.Uk)((0,i.zw)(e.installed?t.$t("admin_dash.frontend.reinstall"):t.$t("admin_dash.frontend.install"))+" ",1),(0,a._)("code",null,(0,i.zw)(t.getSuggestedRef(e)),1)],8,Tt),e.refs.length>1?((0,a.wg)(),(0,a.j4)(m,{key:0,trigger:"click",class:"button-dropdown",placement:"bottom"},{content:(0,a.w5)((function(n){var r=n.close;return[(0,a._)("div",Yt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.refs,(function(n){return(0,a.wg)(),(0,a.iD)("button",{key:n,class:"button-default dropdown-item",onClick:[(0,zt.iM)((function(a){return t.update(e,n)}),["prevent"]),r]},[(0,a.Wm)(u,{keypath:"admin_dash.frontend.install_version"},{version:(0,a.w5)((function(){return[(0,a._)("code",null,(0,i.zw)(n),1)]})),_:2},1024)],8,Ht)})),128))])]})),trigger:(0,a.w5)((function(){return[(0,a._)("button",{class:"button button-default btn dropdown-button",type:"button",title:t.$t("admin_dash.frontend.more_install_options")},[(0,a.Wm)(p,{icon:"chevron-down"})],8,Gt)]})),_:2},1024)):(0,a.kq)("",!0)]),e.installed&&"admin-fe"!==e.name?((0,a.wg)(),(0,a.iD)("span",Kt,[(0,a._)("button",{class:"button button-default btn",type:"button",disabled:(null===(l=t.adminDraft[":pleroma"][":frontends"][":primary"])||void 0===l?void 0:l.name)===e.name&&(null===(o=t.adminDraft[":pleroma"][":frontends"][":primary"])||void 0===o?void 0:o.ref)===e.refs[0],onClick:function(n){return t.setDefault(e)}},[(0,a.Uk)((0,i.zw)(t.$t("admin_dash.frontend.set_default"))+" ",1),(0,a._)("code",null,(0,i.zw)(t.getSuggestedRef(e)),1)],8,Nt),(0,a.Uk)(" "+(0,i.zw)(" ")+" "),e.refs.length>1?((0,a.wg)(),(0,a.j4)(m,{key:0,trigger:"click",class:"button-dropdown",placement:"bottom"},{content:(0,a.w5)((function(n){var r=n.close;return[(0,a._)("div",Rt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.installedRefs||e.refs,(function(n){return(0,a.wg)(),(0,a.iD)("button",{key:n,class:"button-default dropdown-item",onClick:[(0,zt.iM)((function(a){return t.setDefault(e,n)}),["prevent"]),r]},[(0,a.Wm)(u,{keypath:"admin_dash.frontend.set_default_version"},{version:(0,a.w5)((function(){return[(0,a._)("code",null,(0,i.zw)(n),1)]})),_:2},1024)],8,Vt)})),128))])]})),trigger:(0,a.w5)((function(){return[(0,a._)("button",{class:"button button-default btn dropdown-button",type:"button",title:t.$t("admin_dash.frontend.more_default_options")},[(0,a.Wm)(p,{icon:"chevron-down"})],8,Xt)]})),_:2},1024)):(0,a.kq)("",!0)])):(0,a.kq)("",!0)])])})),128))])])])],8,Zt)}]]);ft.vI.add(ht.klh,ht.ioV,ht.py1,ht.XsY,ht.qmU,ht.q7m,ht.Aq,ht.YHc);const le={components:{TabSwitcher:f.Z,InstanceTab:gt,LimitsTab:Wt,FrontendsTab:re},computed:{user:function(){return this.$store.state.users.currentUser},isLoggedIn:function(){return!!this.$store.state.users.currentUser},open:function(){return"hidden"!==this.$store.state.interface.settingsModalState},bodyLock:function(){return"visible"===this.$store.state.interface.settingsModalState},adminDbLoaded:function(){return this.$store.state.adminSettings.loaded},adminDescriptionsLoaded:function(){return null!==this.$store.state.adminSettings.descriptions},noDb:function(){return!1===this.$store.state.adminSettings.dbConfigEnabled}},created:function(){this.user.rights.admin&&this.$store.dispatch("loadAdminStuff")},methods:{onOpen:function(){var t=this.$store.state.interface.settingsModalTargetTab;if(t){var e=this.$refs.tabSwitcher.$slots.default().findIndex((function(e){return e.props&&e.props["data-tab-name"]===t}));e>=0&&this.$refs.tabSwitcher.setTab(e)}this.$store.dispatch("clearSettingsModalTargetTab")}},mounted:function(){this.onOpen()},watch:{open:function(t){t&&this.onOpen()}}},oe=(0,Y.Z)(le,[["render",function(t,e,n,f,h,_){var b=(0,a.up)("i18n-t"),g=(0,a.up)("InstanceTab"),w=(0,a.up)("LimitsTab"),v=(0,a.up)("FrontendsTab"),y=(0,a.up)("tab-switcher");return t.adminDescriptionsLoaded&&(t.noDb||t.adminDbLoaded)?((0,a.wg)(),(0,a.j4)(y,{key:0,ref:"tabSwitcher",class:"settings_tab-switcher","side-tab-bar":!0,"scrollable-tabs":!0,"render-only-focused":!0,"body-scroll-lock":t.bodyLock},{default:(0,a.w5)((function(){return[t.noDb?((0,a.wg)(),(0,a.iD)("div",{key:0,label:t.$t("admin_dash.tabs.nodb"),icon:"exclamation-triangle","data-tab-name":"nodb-notice"},[(0,a._)("div",{label:t.$t("admin_dash.tabs.nodb")},[(0,a._)("div",o,[(0,a._)("h2",null,(0,i.zw)(t.$t("admin_dash.nodb.heading")),1),(0,a.Wm)(b,{keypath:"admin_dash.nodb.text"},{documentation:(0,a.w5)((function(){return[(0,a._)("a",s,(0,i.zw)(t.$t("admin_dash.nodb.documentation")),1)]})),property:(0,a.w5)((function(){return[c]})),value:(0,a.w5)((function(){return[d]})),_:1}),(0,a._)("p",null,(0,i.zw)(t.$t("admin_dash.nodb.text2")),1)])],8,l)],8,r)):(0,a.kq)("",!0),t.adminDbLoaded?((0,a.wg)(),(0,a.iD)("div",{key:1,label:t.$t("admin_dash.tabs.instance"),icon:"wrench","data-tab-name":"general"},[(0,a.Wm)(g)],8,u)):(0,a.kq)("",!0),t.adminDbLoaded?((0,a.wg)(),(0,a.iD)("div",{key:2,label:t.$t("admin_dash.tabs.limits"),icon:"hand","data-tab-name":"limits"},[(0,a.Wm)(w)],8,p)):(0,a.kq)("",!0),(0,a._)("div",{label:t.$t("admin_dash.tabs.frontends"),icon:"laptop-code","data-tab-name":"frontends"},[(0,a.Wm)(v)],8,m)]})),_:1},8,["body-scroll-lock"])):(0,a.kq)("",!0)}]])}}]);