summaryrefslogtreecommitdiff
path: root/static/admin/_next/static/chunks/pages/config-federation-ddff59205ab33383.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/admin/_next/static/chunks/pages/config-federation-ddff59205ab33383.js')
-rw-r--r--static/admin/_next/static/chunks/pages/config-federation-ddff59205ab33383.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/static/admin/_next/static/chunks/pages/config-federation-ddff59205ab33383.js b/static/admin/_next/static/chunks/pages/config-federation-ddff59205ab33383.js
new file mode 100644
index 000000000..e5e5b5599
--- /dev/null
+++ b/static/admin/_next/static/chunks/pages/config-federation-ddff59205ab33383.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[457],{50291:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config-federation",function(){return t(6898)}])},10063:function(e,n,t){"use strict";t.d(n,{Q:function(){return d},Z:function(){return u}});var a=t(85893),s=t(67294),i=t(44068),r=t(20550),l=t(48419),o=t(78464),c=i.Z.Title,d="#5a67d8";function u(e){var n=(0,s.useState)(""),t=n[0],i=n[1],u=e.title,h=e.description,f=e.placeholder,p=e.maxLength,m=e.values,v=e.handleDeleteIndex,g=e.handleCreateString,b=e.submitStatus,x=e.continuousStatusMessage;return(0,a.jsxs)("div",{className:"edit-string-array-container",children:[(0,a.jsx)(c,{level:3,className:"section-title",children:u}),(0,a.jsx)("p",{className:"description",children:h}),(0,a.jsx)("div",{className:"edit-current-strings",children:null===m||void 0===m?void 0:m.map((function(e,n){return(0,a.jsx)(r.Z,{closable:!0,onClose:function(){v(n)},color:d,children:e},"tag-".concat(e,"-").concat(n))}))}),x&&(0,a.jsx)("div",{className:"continuous-status-section",children:(0,a.jsx)(o.Z,{status:x})}),(0,a.jsx)("div",{className:"add-new-string-section",children:(0,a.jsx)(l.ZP,{fieldName:"string-input",value:t,onChange:function(e){var n=e.value;i(n)},onPressEnter:function(){var e=t.trim();g(e),i("")},maxLength:p,placeholder:f,status:b})})]})}u.defaultProps={maxLength:50,description:null,submitStatus:null,continuousStatusMessage:null}},15976:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var a=t(28520),s=t.n(a),i=t(85893),r=t(67294),l=t(94594),o=t(83200),c=t(78464),d=t(25964),u=t(35159);function h(e,n,t,a,s,i,r){try{var l=e[i](r),o=l.value}catch(c){return void t(c)}l.done?n(o):Promise.resolve(o).then(a,s)}function f(e){var n,t=(0,r.useState)(null),a=t[0],f=t[1],p=null,m=((0,r.useContext)(u.aC)||{}).setFieldInConfigState,v=e.apiPath,g=e.checked,b=e.reversed,x=void 0!==b&&b,w=e.configPath,j=void 0===w?"":w,y=e.disabled,k=void 0!==y&&y,P=e.fieldName,N=e.label,S=e.tip,C=e.useSubmit,Z=e.onChange,E=function(){f(null),clearTimeout(p),p=null},T=(n=s().mark((function e(n){var t;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!C){e.next=6;break}return f((0,o.kg)(o.Jk)),t=x?!n:n,e.next=5,(0,d.Si)({apiPath:v,data:{value:t},onSuccess:function(){m({fieldName:P,value:t,path:j}),f((0,o.kg)(o.zv))},onError:function(e){f((0,o.kg)(o.Un,"There was an error: ".concat(e)))}});case 5:p=setTimeout(E,d.sI);case 6:Z&&Z(n);case 7:case"end":return e.stop()}}),e)})),function(){var e=this,t=arguments;return new Promise((function(a,s){var i=n.apply(e,t);function r(e){h(i,a,s,r,l,"next",e)}function l(e){h(i,a,s,r,l,"throw",e)}r(void 0)}))}),O=null!==a&&a.type===o.Jk;return(0,i.jsxs)("div",{className:"formfield-container toggleswitch-container",children:[N&&(0,i.jsx)("div",{className:"label-side",children:(0,i.jsx)("span",{className:"formfield-label",children:N})}),(0,i.jsxs)("div",{className:"input-side",children:[(0,i.jsxs)("div",{className:"input-group",children:[(0,i.jsx)(l.Z,{className:"switch field-".concat(P),loading:O,onChange:T,defaultChecked:g,checked:g,checkedChildren:"ON",unCheckedChildren:"OFF",disabled:k}),(0,i.jsx)(c.Z,{status:a})]}),(0,i.jsx)("p",{className:"field-tip",children:S})]})]})}f.defaultProps={apiPath:"",checked:!1,reversed:!1,configPath:"",disabled:!1,label:"",tip:"",useSubmit:!1,onChange:null}},6898:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return y}});var a=t(85893),s=t(56516),i=t(71577),r=t(44068),l=t(25968),o=t(6226),c=t(67294),d=t(45697),u=t.n(d),h=t(48419),f=t(50197),p=t(15976),m=t(10063),v=t(25964),g=t(35159),b=t(83200);function x(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),a.forEach((function(n){x(e,n,t[n])}))}return e}function j(e){var n=e.cancelPressed,t=e.okPressed;return(0,a.jsxs)(s.Z,{width:"70%",title:"Enable Social Features",visible:!0,onCancel:n,footer:(0,a.jsxs)("div",{children:[(0,a.jsx)(i.Z,{onClick:n,children:"Do not enable"}),(0,a.jsx)(i.Z,{type:"primary",onClick:t,children:"Enable Social Features"})]}),children:[(0,a.jsx)(r.Z.Title,{level:3,children:"How do Owncast's social features work?"}),(0,a.jsxs)(r.Z.Paragraph,{children:["Owncast's social features are accomplished by having your server join The"," ",(0,a.jsx)("a",{href:"https://en.wikipedia.org/wiki/Fediverse",rel:"noopener noreferrer",target:"_blank",children:"Fediverse"}),", a decentralized, open, collection of independent servers, like yours."]}),"Please"," ",(0,a.jsx)("a",{href:"https://owncast.online/docs/social",rel:"noopener noreferrer",target:"_blank",children:"read more"})," ","about these features, the details behind them, and how they work.",(0,a.jsx)(r.Z.Paragraph,{}),(0,a.jsx)(r.Z.Title,{level:3,children:"What do you need to know?"}),(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:"These features are brand new. Given the variability of interfacing with the rest of the world, bugs are possible. Please report anything that you think isn't working quite right."}),(0,a.jsx)("li",{children:"You must always host your Owncast server with SSL using a https url."}),(0,a.jsx)("li",{children:"You should not change your server name URL or social username once people begin following you, as you will be seen as a completely different user on the Fediverse, and the old user will disappear."}),(0,a.jsxs)("li",{children:["Turning on ",(0,a.jsx)("i",{children:"Private mode"})," will allow you to manually approve each follower and limit the visibility of your posts to followers only."]})]}),(0,a.jsx)(r.Z.Title,{level:3,children:"Learn more about The Fediverse"}),(0,a.jsxs)(r.Z.Paragraph,{children:["If these concepts are new you should discover more about what this functionality has to offer. Visit"," ",(0,a.jsx)("a",{href:"https://owncast.online/docs/social",rel:"noopener noreferrer",target:"_blank",children:"our documentation"})," ","to be pointed at some resources that will help get you started on The Fediverse."]})]})}function y(){var e=function(){E(null)},n=function(){try{(0,v.Si)({apiPath:v.pE,data:{value:i.blockedDomains},onSuccess:function(){S({fieldName:"forbiddenUsernames",value:i.forbiddenUsernames}),E(b.zv),setTimeout(e,v.sI)},onError:function(n){E((0,b.kg)(b.Un,n)),setTimeout(e,v.sI)}})}catch(n){console.error(n),E(b.Un)}},t=r.Z.Title,s=(0,c.useState)(null),i=s[0],d=s[1],u=(0,c.useState)(!1),y=u[0],k=u[1],P=(0,c.useContext)(g.aC)||{},N=P.serverConfig,S=P.setFieldInConfigState,C=(0,c.useState)(null),Z=C[0],E=C[1],T=N.federation,O=N.yp,_=N.instanceDetails,U=T.enabled,F=T.isPrivate,D=T.username,L=T.goLiveMessage,I=T.showEngagement,R=T.blockedDomains,M=O.instanceUrl,q=_.nsfw,V=function(e){var n=e.fieldName,t=e.value;d(w({},i,x({},n,t)))};if((0,c.useEffect)((function(){d({enabled:U,isPrivate:F,username:D,goLiveMessage:L,showEngagement:I,blockedDomains:R,nsfw:q,instanceUrl:O.instanceUrl})}),[N,O]),!i)return null;var z=""!==M,K=M.startsWith("https://");return(0,a.jsxs)("div",{children:[(0,a.jsx)(t,{children:"Configure Social Features"}),(0,a.jsx)("p",{children:"Owncast provides the ability for people to follow and engage with your instance. It's a great way to promote alerting, sharing and engagement of your stream."}),(0,a.jsx)("p",{children:"Once enabled you'll alert your followers when you go live as well as gain the ability to compose custom posts to share any information you like."}),(0,a.jsx)("p",{children:(0,a.jsx)("a",{href:"https://owncast.online/docs/social",rel:"noopener noreferrer",target:"_blank",children:"Read more about the specifics of these social features."})}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)(o.Z,{span:15,className:"form-module",style:{marginRight:"15px"},children:[(0,a.jsx)(p.Z,w({fieldName:"enabled",onChange:function(e){e?k(!0):d(w({},i,{enabled:!1}))}},v.Kl,{checked:i.enabled,disabled:!z||!K})),(0,a.jsx)(f.ZP,w({fieldName:"instanceUrl"},v.yi,{value:i.instanceUrl,initialValue:O.instanceUrl,type:h.xA,onChange:V,onSubmit:function(){var e=""!==i.instanceUrl,n=i.instanceUrl.startsWith("https://");e&&n||((0,v.Si)({apiPath:v.Kl.apiPath,data:{value:!1}}),d(w({},i,{enabled:!1})))}})),(0,a.jsx)(p.Z,w({fieldName:"isPrivate"},v.LC,{checked:i.isPrivate,disabled:!U})),(0,a.jsx)(p.Z,w({fieldName:"nsfw",useSubmit:!0},v.B_,{checked:i.nsfw,disabled:!z})),(0,a.jsx)(f.ZP,w({required:!0,fieldName:"username",type:h.Kx},v.Xc,{value:i.username,initialValue:D,onChange:V,disabled:!U})),(0,a.jsx)(f.ZP,w({fieldName:"goLiveMessage"},v.BF,{type:h.Sk,value:i.goLiveMessage,initialValue:L,onChange:V,disabled:!U})),(0,a.jsx)(p.Z,w({fieldName:"showEngagement"},v.FE,{checked:i.showEngagement,disabled:!U}))]}),(0,a.jsx)(o.Z,{span:8,className:"form-module",children:(0,a.jsx)(m.Z,{title:v.dR.label,placeholder:v.dR.placeholder,description:v.dR.tip,values:i.blockedDomains,handleDeleteIndex:function(e){i.blockedDomains.splice(e,1),n()},handleCreateString:function(e){var t;try{t=new URL(e).host}catch(a){t=e}i.blockedDomains.push(t),V({fieldName:"blockedDomains",value:i.blockedDomains}),n()},submitStatus:(0,b.kg)(Z)})})]}),y&&(0,a.jsx)(j,{cancelPressed:function(){k(!1),d(w({},i,{enabled:!1}))},okPressed:function(){k(!1),d(w({},i,{enabled:!0}))}})]})}j.propTypes={cancelPressed:u().func.isRequired,okPressed:u().func.isRequired}}},function(e){e.O(0,[674,774,888,179],(function(){return n=50291,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file