Bundle embedded web app

This commit is contained in:
Owncast
2025-03-10 00:27:29 +00:00
parent c981acbc5d
commit afcc9032f0
37 changed files with 37 additions and 37 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6559],{10887:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/chat/emojis",function(){return n(21493)}])},21493:function(e,t,n){"use strict";n.r(t);var i=n(85893),o=n(3816),s=n(23657),a=n(56469),l=n(10227),r=n(78021),c=n(8968),u=n(10647),d=n(6468),m=n(67294),h=n(5152),j=n.n(h),f=n(17586),p=n(11992),g=n(35329),y=n(28700),w=n(70869),x=n(25889);let{Meta:k}=o.default,b=j()(()=>Promise.resolve().then(n.t.bind(n,12155,23)),{loadableGenerated:{webpack:()=>[12155]},ssr:!1}),{Title:E,Paragraph:_}=s.default,T=()=>{let[e,t]=(0,m.useState)([]),[n,s]=(0,m.useState)(!1),[h,j]=(0,m.useState)(null),[x,T]=(0,m.useState)(null),v=null,B=()=>{j(null),clearTimeout(v),v=null};async function Z(){s(!0);try{let e=await (0,p.rQ)("/api/emoji");t(e)}catch(e){console.error("error fetching emojis",e)}s(!1)}async function N(e){let t="/".concat(e.split("/").slice(3).join("/"));console.log(t),s(!0),j((0,y.kg)(y.Jk,"Deleting emoji..."));try{let e=await (0,p.rQ)(p.Ff,{method:"POST",data:{name:t}});if(e instanceof Error)throw e;j((0,y.kg)(y.zv,"Emoji deleted")),v=setTimeout(B,w.sI)}catch(e){j((0,y.kg)(y.Un,"".concat(e))),s(!1),v=setTimeout(B,w.sI)}Z()}async function P(){s(!0);try{j((0,y.kg)(y.Jk,"Converting emoji..."));let e=await new Promise((e,t)=>{if(!g.dr.includes(x.type)){let e="File type is not supported: ".concat(x.type);return t(e)}(0,g.y3)(x,t=>e({name:x.name,url:t}))});j((0,y.kg)(y.Jk,"Uploading emoji..."));let t=await (0,p.rQ)(p.Qc,{method:"POST",data:{name:e.name,data:e.url}});if(t instanceof Error)throw t;j((0,y.kg)(y.zv,"Emoji uploaded successfully!")),Z()}catch(e){j((0,y.kg)(y.Un,"".concat(e)))}v=setTimeout(B,w.sI),s(!1)}return(0,m.useEffect)(()=>{Z()},[]),(0,i.jsxs)("div",{children:[(0,i.jsx)(E,{children:"Emojis"}),(0,i.jsx)(_,{children:"Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename without extension will be used as emoji name. Additionally, emoji names are case-insensitive. For best results, ensure all emoji have unique names."}),(0,i.jsx)("br",{}),(0,i.jsx)(d.Z,{name:"emoji",listType:"picture",className:"emoji-uploader",showUploadList:!1,accept:g.dr.join(","),beforeUpload:T,customRequest:P,disabled:n,children:(0,i.jsx)(a.Z,{type:"primary",disabled:n,children:"Upload new emoji"})}),(0,i.jsx)(f.Z,{status:h}),(0,i.jsx)("br",{}),(0,i.jsx)(l.Z,{children:e.map(e=>(0,i.jsx)(r.Z,{style:{padding:"10px"},children:(0,i.jsx)(o.default,{style:{width:120,marginTop:16},actions:[],children:(0,i.jsx)(k,{description:[(0,i.jsxs)("div",{style:{display:"flex",justifyItems:"center",alignItems:"center",flexDirection:"column",gap:"20px"},children:[(0,i.jsx)(c.Z,{title:e.name,children:(0,i.jsx)(u.C,{style:{height:50,width:50},src:e.url})}),(0,i.jsx)(a.Z,{size:"small",type:"ghost",title:"Delete emoji",style:{position:"absolute",right:0,top:0,height:24,width:24,border:"none",color:"gray"},onClick:()=>N(e.url),icon:(0,i.jsx)(b,{})})]})]})})},e.name))}),(0,i.jsx)("br",{})]})};T.getLayout=function(e){return(0,i.jsx)(x.l,{page:e})},t.default=T},35329:function(e,t,n){"use strict";n.d(t,{Z7:function(){return i},dr:function(){return o},kR:function(){return a},y3:function(){return s}});let i=2097152,o=["image/png","image/jpeg","image/gif"];function s(e,t){let n=new FileReader;n.addEventListener("load",()=>t(n.result)),n.readAsDataURL(e)}function a(e){let t=Math.floor(Math.log(e)/Math.log(1024)),n=1*Number((e/Math.pow(1024,t)).toFixed(2));return"".concat(n," ").concat(["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t])}}},function(e){e.O(0,[3247,83,1287,3800,7786,443,9904,3657,1175,2502,9307,1408,6356,627,5889,2888,9774,179],function(){return e(e.s=10887)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6559],{10887:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/chat/emojis",function(){return n(21493)}])},21493:function(e,t,n){"use strict";n.r(t);var i=n(85893),o=n(3816),s=n(23657),a=n(56469),r=n(10227),l=n(78021),c=n(8968),u=n(10647),d=n(6468),m=n(67294),h=n(5152),j=n.n(h),p=n(37039),f=n(17586),g=n(11992),x=n(35329),y=n(28700),w=n(70869),k=n(25889);let{Meta:b}=o.default,E=j()(()=>Promise.resolve().then(n.t.bind(n,12155,23)),{loadableGenerated:{webpack:()=>[12155]},ssr:!1}),{Title:_,Paragraph:T}=s.default,v=()=>{let[e,t]=(0,m.useState)([]),[n,s]=(0,m.useState)(!1),[h,j]=(0,m.useState)(null),[k,v]=(0,m.useState)(null),{t:B}=(0,p.$G)(),Z=null,N=()=>{j(null),clearTimeout(Z),Z=null};async function P(){s(!0);try{let e=await (0,g.rQ)("/api/emoji");t(e)}catch(e){console.error("error fetching emojis",e)}s(!1)}async function U(e){let t="/".concat(e.split("/").slice(3).join("/"));console.log(t),s(!0),j((0,y.kg)(y.Jk,"Deleting emoji..."));try{let e=await (0,g.rQ)(g.Ff,{method:"POST",data:{name:t}});if(e instanceof Error)throw e;j((0,y.kg)(y.zv,"Emoji deleted")),Z=setTimeout(N,w.sI)}catch(e){j((0,y.kg)(y.Un,"".concat(e))),s(!1),Z=setTimeout(N,w.sI)}P()}async function C(){s(!0);try{j((0,y.kg)(y.Jk,"Converting emoji..."));let e=await new Promise((e,t)=>{if(!x.dr.includes(k.type)){let e="File type is not supported: ".concat(k.type);return t(e)}(0,x.y3)(k,t=>e({name:k.name,url:t}))});j((0,y.kg)(y.Jk,"Uploading emoji..."));let t=await (0,g.rQ)(g.Qc,{method:"POST",data:{name:e.name,data:e.url}});if(t instanceof Error)throw t;j((0,y.kg)(y.zv,"Emoji uploaded successfully!")),P()}catch(e){j((0,y.kg)(y.Un,"".concat(e)))}Z=setTimeout(N,w.sI),s(!1)}return(0,m.useEffect)(()=>{P()},[]),(0,i.jsxs)("div",{children:[(0,i.jsx)(_,{children:"Emojis"}),(0,i.jsx)(T,{children:"Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename without extension will be used as emoji name. Additionally, emoji names are case-insensitive. For best results, ensure all emoji have unique names."}),(0,i.jsxs)(T,{children:[B("Want to upload custom emojis in bulk? Check out our")," ",(0,i.jsx)("a",{href:"https://owncast.online/docs/chat/emoji",rel:"noopener noreferrer",target:"_blank",children:B("Emoji guide")}),"."]}),(0,i.jsx)("br",{}),(0,i.jsx)(d.Z,{name:"emoji",listType:"picture",className:"emoji-uploader",showUploadList:!1,accept:x.dr.join(","),beforeUpload:v,customRequest:C,disabled:n,children:(0,i.jsx)(a.Z,{type:"primary",disabled:n,children:"Upload new emoji"})}),(0,i.jsx)(f.Z,{status:h}),(0,i.jsx)("br",{}),(0,i.jsx)(r.Z,{children:e.map(e=>(0,i.jsx)(l.Z,{style:{padding:"10px"},children:(0,i.jsx)(o.default,{style:{width:120,marginTop:16},actions:[],children:(0,i.jsx)(b,{description:[(0,i.jsxs)("div",{style:{display:"flex",justifyItems:"center",alignItems:"center",flexDirection:"column",gap:"20px"},children:[(0,i.jsx)(c.Z,{title:e.name,children:(0,i.jsx)(u.C,{style:{height:50,width:50},src:e.url})}),(0,i.jsx)(a.Z,{size:"small",type:"ghost",title:"Delete emoji",style:{position:"absolute",right:0,top:0,height:24,width:24,border:"none",color:"gray"},onClick:()=>U(e.url),icon:(0,i.jsx)(E,{})})]})]})})},e.name))}),(0,i.jsx)("br",{})]})};v.getLayout=function(e){return(0,i.jsx)(k.l,{page:e})},t.default=v},35329:function(e,t,n){"use strict";n.d(t,{Z7:function(){return i},dr:function(){return o},kR:function(){return a},y3:function(){return s}});let i=2097152,o=["image/png","image/jpeg","image/gif"];function s(e,t){let n=new FileReader;n.addEventListener("load",()=>t(n.result)),n.readAsDataURL(e)}function a(e){let t=Math.floor(Math.log(e)/Math.log(1024)),n=1*Number((e/Math.pow(1024,t)).toFixed(2));return"".concat(n," ").concat(["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t])}}},function(e){e.O(0,[3247,83,1287,3800,7786,443,9904,3657,1175,2502,9307,7039,1408,6356,627,5889,3064,2888,9774,179],function(){return e(e.s=10887)}),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long