1import{b as Z}from"./chunk-FZFWY5Y6.js";import"./chunk-EGEBNI4V.js";import{E as U,g as K,o as Y}from"./chunk-EBOVR5NW.js";import{u as B}from"./chunk-UME7L37K.js";import{a as q}from"./chunk-R76LZEZS.js";import{Ab as b,Bb as h,Ca as s,Cb as r,Cc as z,Ec as V,Gb as p,Ib as f,Ma as y,Oh as J,Qb as W,Rb as w,Rg as Q,Sc as H,Ta as F,aa as C,bc as v,cc as X,dc as k,fa as u,fb as N,ga as m,gb as c,mb as t,nb as i,ob as M,wc as x,xf as S,yb as $,zf as j}from"./chunk-HVCWS4IF.js";import{j as A}from"./chunk-KJ7W2O2B.js";var ne=["modal"];function te(o,n){o&1&&(t(0,"li"),r(1,5),i());}function oe(o,n){o&1&&(t(0,"li"),r(1,6),i());}function ie(o,n){o&1&&(t(0,"li"),r(1,7),i());}function _e(o,n){o&1&&(t(0,"li"),r(1,8),i());}function ae(o,n){o&1&&(t(0,"li"),r(1,9),i());}function re(o,n){o&1&&(t(0,"li"),r(1,10),i());}function le(o,n){o&1&&(t(0,"li"),r(1,11),i());}function se(o,n){if(o&1){let e=$();t(0,"div",12)(1,"h4",13),r(2,1),i(),t(3,"button",14),p("click",function(){let a=u(e).close;return m(a());}),M(4,"my-global-icon",15),i()(),t(5,"div",16),M(6,"img",17),t(7,"p"),r(8,2),i(),t(9,"ul"),N(10,te,2,0,"li"),N(11,oe,2,0,"li"),N(12,ie,2,0,"li"),N(13,_e,2,0,"li"),N(14,ae,2,0,"li"),N(15,re,2,0,"li"),N(16,le,2,0,"li"),i(),t(17,"p"),b(18,3),M(19,"strong")(20,"a",18),h(),i()(),t(21,"div",19)(22,"my-peertube-checkbox",20),k("ngModelChange",function(a){u(e);let d=f();return X(d.stopDisplayModal,a)||(d.stopDisplayModal=a),m(a);}),i(),t(23,"input",21),p("click",function(){let a=u(e).close;return m(a());}
1)("key.enter",function(){let a=u(e).close;return m(a());}),i(),t(24,"a",22),r(25,4),i()();}if(o&2){let e=f();s(10),c(e.about.instance.name.toLowerCase()==="peertube"?10:-1),s(),c(e.isDefaultShortDescription(e.about.instance.shortDescription)?11:-1),s(),c(e.about.instance.administrator?-1:12),s(),c(e.about.instance.maintenanceLifetime?-1:13),s(),c(e.about.instance.businessModel?-1:14),s(),c(e.about.instance.moderationInformation?-1:15),s(),c(e.about.instance.terms?-1:16),s(6),v("ngModel",e.stopDisplayModal);}}var g=class g{userService=C(J);location=C(H);modalService=C(B);notifier=C(Q);modal=V("modal");created=z();stopDisplayModal=!1;about;LS_KEYS={NO_INSTANCE_CONFIG_WARNING_MODAL:"no_instance_config_warning_modal"};ngOnInit(){this.created.emit();}canBeOpenByUser(n){return!(this.modalService.hasOpenModals()||n.noInstanceConfigWarningModal===!0||S.getItem(this.LS_KEYS.NO_INSTANCE_CONFIG_WARNING_MODAL)==="true");}shouldAutoOpen(n,e){return this.modalService.hasOpenModals()||!n.signup.allowed?!1:n.instance.name.toLowerCase()==="peertube"||!e.instance.terms||!e.instance.administrator||!e.instance.maintenanceLifetime;}show(n){if(this.location.path().startsWith("/admin/settings/config/edit-custom"))return;this.about=n,this.modalService.open(this.modal(),{centered:!0}).result.finally(()=>{this.stopDisplayModal===!0&&this.doNotOpenAgain();});}isDefaultShortDescription(n){return n==="PeerTube, an ActivityPub-federated video streaming platform using P2P directly in your web browser.";}doNotOpenAgain(){S.setItem(this.LS_KEYS.NO_INSTANCE_CONFIG_WARNING_MODAL,"true"),this.userService.updateMyProfile({noInstanceConfigWarningModal:!0}).subscribe({next:()=>j.info("We will not open the instance config warning modal again."),error:n=>this.notifier.handleError(n)});}};A(g,"\u0275fac",function(e){return new(e||g)();}),A(g,"\u0275cmp",y({type:g,selectors:[["my-instance-config-warning-modal"]],viewQuery:function(e,l){e&1&&W(l.modal,ne,5),e&2&&w();},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let n;n="Close this modal";let e;e="Don't show me this warning anymore";let l;l="Close";let a;a="Configuration warning!";let d;d="You enabled user registration on your instance but did not configure the following fields:";let O;O=" Please consider configuring these fields to help people to choose "+"\uFFFD#19\uFFFD"+"the appropriate instance"+"\uFFFD/#19\uFFFD"+". Without them, your instance may not be referenced on the "+"\uFFFD#20\uFFFD"+"JoinPeerTube website"+"\uFFFD/#20\uFFFD"+". ";let I;I=" Configure ";let T;T="Instance name";let E;E="Instance short description";let L;L="Who you are";let P;P="How long you plan to maintain your instance";let G;G="How you plan to pay for keeping your instance running";let R;R="How you will moderate your instance";let D;return D="Instance terms",[["modal",""],a,d,O,I,T,E,L,P,G,R,D,[1,"modal-header"],[1,"modal-title"],["title",n,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["src","/client/assets/images/mascot/oh.svg","alt","mascot",1,"mascot"],["target","_blank","rel","noopener noreferrer","href","https://joinpeertube.org"],[1,"modal-footer","inputs"],["inputName","stopDisplayModal","labelText",e,3,"ngModelChange","ngModel"],["type","button","role","button","value",l,1,"peertube-button","secondary-button",3,"click","key.enter"],["ngbAutofocus","","href","/admin/settings/config/edit-custom","target","_blank","rel","noopener noreferrer",1,"peertube-button-link","primary-button"]];},template:function(e,l){e&1&&F(0,se,26,8,"ng-template",null,0,x);},dependencies:[U,K,Y,q,Z],styles:["li[_ngcontent-%COMP%]{margin-bottom:10px}.mascot[_ngcontent-%COMP%]{display:block;margin:0 auto 50px;width:25%}"]}));var ee=g;export{ee as InstanceConfigWarningModalComponent};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.