Bundle embedded web app
This commit is contained in:
parent
44a547e43f
commit
063dbccebc
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
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
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1559],{51559:function(e,t,r){r.r(t),r.d(t,{EmojiPicker:function(){return s}});var n=r(85893),c=r(67294),o=r(57741);let s=e=>{let{onEmojiSelect:t,onCustomEmojiSelect:r}=e,[s,a]=(0,c.useState)([]),u=(0,c.useRef)(),i=async()=>{try{let e=await fetch("/api/emoji"),t=await e.json();a(t)}catch(r){console.error("cannot fetch custom emoji",r)}};return(0,c.useEffect)(()=>{i()},[]),(0,c.useEffect)(()=>{let e=s.map(e=>({emoji:e.name,label:e.name,url:e.url})),n=(0,o.wU)({rootElement:u.current,custom:e,initialCategory:"custom",showPreview:!1,showRecents:!0});n.addEventListener("emoji:select",e=>{e.url?r(e.name,e.url):t(e.emoji)})},[s]),(0,n.jsx)("div",{ref:u})}}}]);
|
||||
//# sourceMappingURL=1559.2e58e7c39b343623.js.map
|
||||
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1559],{51559:function(e,t,r){r.r(t),r.d(t,{EmojiPicker:function(){return s}});var n=r(85893),c=r(67294),o=r(57741);let s=e=>{let{onEmojiSelect:t,onCustomEmojiSelect:r}=e,[s,a]=(0,c.useState)([]),u=(0,c.useRef)(),i=async()=>{try{let e=await fetch("/api/emoji"),t=await e.json();a(t)}catch(e){console.error("cannot fetch custom emoji",e)}};return(0,c.useEffect)(()=>{i()},[]),(0,c.useEffect)(()=>{let e=s.map(e=>({emoji:e.name,label:e.name,url:e.url})),n=(0,o.wU)({rootElement:u.current,custom:e,initialCategory:"custom",showPreview:!1,showRecents:!0});n.addEventListener("emoji:select",e=>{e.url?r(e.name,e.url):t(e.emoji)})},[s]),(0,n.jsx)("div",{ref:u})}}}]);
|
||||
//# sourceMappingURL=1559.6f5bd14ccd571646.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"static/chunks/1559.2e58e7c39b343623.js","mappings":"yLASO,IAAMA,EAAoC,GAA4C,IAA3C,CAAEC,cAAAA,CAAAA,CAAeC,oBAAAA,CAAAA,CAAqB,CAAAC,EAChF,CAACC,EAAaC,EAAe,CAAGC,CAAAA,EAAAA,EAAAA,QAAAA,EAAS,EAAE,EAC3CC,EAAMC,CAAAA,EAAAA,EAAAA,MAAAA,IAENC,EAAiB,SAAY,CACjC,GAAI,CACF,IAAMC,EAAW,MAAMC,MAZJ,cAabC,EAAQ,MAAMF,EAASG,IAAI,GACjCR,EAAeO,EACjB,CAAE,MAAOE,EAAG,CACVC,QAAQC,KAAK,CAAC,4BAA6BF,EAC7C,CACF,EA+BA,MA5BAG,CAAAA,EAAAA,EAAAA,SAAAA,EAAU,IAAM,CACdR,GACF,EAAG,EAAE,EAGLQ,CAAAA,EAAAA,EAAAA,SAAAA,EAAU,IAAM,CACd,IAAMH,EAAIV,EAAYc,GAAG,CAACN,GAAU,EAClCA,MAAOA,EAAMO,IAAI,CACjBC,MAAOR,EAAMO,IAAI,CACjBE,IAAKT,EAAMS,GAAG,CAChB,GAEMC,EAASC,CAAAA,EAAAA,EAAAA,EAAAA,EAAa,CAC1BC,YAAajB,EAAIkB,OAAO,CACxBC,OAAQZ,EACRa,gBAAiB,SACjBC,YAAa,GACbC,YAAa,EACf,GACAP,EAAOQ,gBAAgB,CAAC,eAAgBC,GAAS,CAC3CA,EAAMV,GAAG,CACXnB,EAAoB6B,EAAMZ,IAAI,CAAEY,EAAMV,GAAG,EAEzCpB,EAAc8B,EAAMnB,KAAK,CAE7B,EACF,EAAG,CAACR,EAAY,EAET,GAAA4B,EAAAC,GAAA,EAACC,MAAAA,CAAI3B,IAAKA,GACnB","sources":["webpack://_N_E/./components/chat/ChatTextField/EmojiPicker.tsx","webpack://_N_E/<anon>"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react';\nimport { createPicker } from 'picmo';\n\nconst CUSTOM_EMOJI_URL = '/api/emoji';\nexport type EmojiPickerProps = {\n onEmojiSelect: (emoji: string) => void;\n onCustomEmojiSelect: (name: string, url: string) => void;\n};\n\nexport const EmojiPicker: FC<EmojiPickerProps> = ({ onEmojiSelect, onCustomEmojiSelect }) => {\n const [customEmoji, setCustomEmoji] = useState([]);\n const ref = useRef();\n\n const getCustomEmoji = async () => {\n try {\n const response = await fetch(CUSTOM_EMOJI_URL);\n const emoji = await response.json();\n setCustomEmoji(emoji);\n } catch (e) {\n console.error('cannot fetch custom emoji', e);\n }\n };\n\n // Fetch the custom emoji on component mount.\n useEffect(() => {\n getCustomEmoji();\n }, []);\n\n // Recreate the emoji picker when the custom emoji changes.\n useEffect(() => {\n const e = customEmoji.map(emoji => ({\n emoji: emoji.name,\n label: emoji.name,\n url: emoji.url,\n }));\n\n const picker = createPicker({\n rootElement: ref.current,\n custom: e,\n initialCategory: 'custom',\n showPreview: false,\n showRecents: true,\n });\n picker.addEventListener('emoji:select', event => {\n if (event.url) {\n onCustomEmojiSelect(event.name, event.url);\n } else {\n onEmojiSelect(event.emoji);\n }\n });\n }, [customEmoji]);\n\n return <div ref={ref} />;\n};\n"],"names":["EmojiPicker","onEmojiSelect","onCustomEmojiSelect","param","customEmoji","setCustomEmoji","useState","ref","useRef","getCustomEmoji","response","fetch","emoji","json","e","console","error","useEffect","map","name","label","url","picker","createPicker","rootElement","current","custom","initialCategory","showPreview","showRecents","addEventListener","event","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","div"],"sourceRoot":""}
|
||||
{"version":3,"file":"static/chunks/1559.6f5bd14ccd571646.js","mappings":"yLASO,IAAMA,EAAoC,GAA4C,IAA3C,CAAEC,cAAAA,CAAAA,CAAeC,oBAAAA,CAAAA,CAAqB,CAAAC,EAChF,CAACC,EAAaC,EAAe,CAAGC,CAAAA,EAAAA,EAAAA,QAAAA,EAAS,EAAE,EAC3CC,EAAMC,CAAAA,EAAAA,EAAAA,MAAAA,IAENC,EAAiB,SAAY,CACjC,GAAI,CACF,IAAMC,EAAW,MAAMC,MAZJ,cAabC,EAAQ,MAAMF,EAASG,IAAI,GACjCR,EAAeO,EACjB,CAAE,MAAOE,EAAG,CACVC,QAAQC,KAAK,CAAC,4BAA6BF,EAC7C,CACF,EA+BA,MA5BAG,CAAAA,EAAAA,EAAAA,SAAAA,EAAU,IAAM,CACdR,GACF,EAAG,EAAE,EAGLQ,CAAAA,EAAAA,EAAAA,SAAAA,EAAU,IAAM,CACd,IAAMH,EAAIV,EAAYc,GAAG,CAACN,GAAU,EAClCA,MAAOA,EAAMO,IAAI,CACjBC,MAAOR,EAAMO,IAAI,CACjBE,IAAKT,EAAMS,GAAG,CAChB,GAEMC,EAASC,CAAAA,EAAAA,EAAAA,EAAAA,EAAa,CAC1BC,YAAajB,EAAIkB,OAAO,CACxBC,OAAQZ,EACRa,gBAAiB,SACjBC,YAAa,GACbC,YAAa,EACf,GACAP,EAAOQ,gBAAgB,CAAC,eAAgBC,GAAS,CAC3CA,EAAMV,GAAG,CACXnB,EAAoB6B,EAAMZ,IAAI,CAAEY,EAAMV,GAAG,EAEzCpB,EAAc8B,EAAMnB,KAAK,CAE7B,EACF,EAAG,CAACR,EAAY,EAET,GAAA4B,EAAAC,GAAA,EAACC,MAAAA,CAAI3B,IAAKA,GACnB","sources":["webpack://_N_E/./components/chat/ChatTextField/EmojiPicker.tsx","webpack://_N_E/<anon>"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react';\nimport { createPicker } from 'picmo';\n\nconst CUSTOM_EMOJI_URL = '/api/emoji';\nexport type EmojiPickerProps = {\n onEmojiSelect: (emoji: string) => void;\n onCustomEmojiSelect: (name: string, url: string) => void;\n};\n\nexport const EmojiPicker: FC<EmojiPickerProps> = ({ onEmojiSelect, onCustomEmojiSelect }) => {\n const [customEmoji, setCustomEmoji] = useState([]);\n const ref = useRef();\n\n const getCustomEmoji = async () => {\n try {\n const response = await fetch(CUSTOM_EMOJI_URL);\n const emoji = await response.json();\n setCustomEmoji(emoji);\n } catch (e) {\n console.error('cannot fetch custom emoji', e);\n }\n };\n\n // Fetch the custom emoji on component mount.\n useEffect(() => {\n getCustomEmoji();\n }, []);\n\n // Recreate the emoji picker when the custom emoji changes.\n useEffect(() => {\n const e = customEmoji.map(emoji => ({\n emoji: emoji.name,\n label: emoji.name,\n url: emoji.url,\n }));\n\n const picker = createPicker({\n rootElement: ref.current,\n custom: e,\n initialCategory: 'custom',\n showPreview: false,\n showRecents: true,\n });\n picker.addEventListener('emoji:select', event => {\n if (event.url) {\n onCustomEmojiSelect(event.name, event.url);\n } else {\n onEmojiSelect(event.emoji);\n }\n });\n }, [customEmoji]);\n\n return <div ref={ref} />;\n};\n"],"names":["EmojiPicker","onEmojiSelect","onCustomEmojiSelect","param","customEmoji","setCustomEmoji","useState","ref","useRef","getCustomEmoji","response","fetch","emoji","json","e","console","error","useEffect","map","name","label","url","picker","createPicker","rootElement","current","custom","initialCategory","showPreview","showRecents","addEventListener","event","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","div"],"sourceRoot":""}
|
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
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
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
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
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
static/web/_next/static/chunks/4550-4947557af9de886d.js
Normal file
2
static/web/_next/static/chunks/4550-4947557af9de886d.js
Normal file
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
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
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
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
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
7
static/web/_next/static/chunks/4986-beb7e8c6666e06ac.js
Normal file
7
static/web/_next/static/chunks/4986-beb7e8c6666e06ac.js
Normal file
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
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
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
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
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,2 +1,2 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{77177:function(e,o,l){"use strict";l.r(o),l.d(o,{FollowModal:function(){return h}});var s=l(85893),r=l(26713),t=l(11382),a=l(14670),n=l(79531),i=l(71577),c=l(67294),d=l(66009),u=l.n(d);let h=e=>{let{handleClose:o,account:l,name:d}=e,[h,w]=(0,c.useState)(null),[_,f]=(0,c.useState)(!1),[m,v]=(0,c.useState)(!1),[j,x]=(0,c.useState)(null),g=e=>{w(e),function(e){let o=e.replace(/^@+/,"");return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(o).toLowerCase())}(e)?f(!0):f(!1)},p=()=>{window.open("https://owncast.online/join-fediverse","_blank")},F=async()=>{if(_){v(!0);try{let e=h.replace(/^@+/,""),l=await fetch("/api/remotefollow",{method:"POST",body:JSON.stringify({account:e})}),s=await l.json();if(s.redirectUrl&&(window.open(s.redirectUrl,"_blank"),o()),!s.success){x(s.message),v(!1);return}if(!s.redirectUrl){x("Unable to follow."),v(!1);return}}catch(r){x(r.message)}v(!1)}};return(0,s.jsxs)(r.Z,{direction:"vertical",id:"follow-modal",children:[(0,s.jsxs)("div",{className:u().header,children:["By following this stream you'll get notified on the Fediverse when it goes live. Now is a great time to",(0,s.jsx)("a",{href:"https://owncast.online/join-fediverse",target:"_blank",rel:"noreferrer",children:"\xa0learn about the Fediverse\xa0"}),"if it's new to you."]}),(0,s.jsxs)(t.Z,{spinning:m,children:[j&&(0,s.jsx)(a.Z,{message:"Follow Error",description:j,type:"error",showIcon:!0}),(0,s.jsxs)("div",{className:u().account,children:[(0,s.jsx)("img",{src:"/logo",alt:"logo",className:u().logo}),(0,s.jsxs)("div",{className:u().username,children:[(0,s.jsx)("div",{className:u().name,children:d}),(0,s.jsx)("div",{children:l})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:u().instructions,children:"Enter your username @server to follow"}),(0,s.jsx)(n.Z,{value:h,size:"large",onChange:e=>g(e.target.value),placeholder:"Your fediverse account @account@server",defaultValue:h}),(0,s.jsx)("div",{className:u().footer,children:"You'll be redirected to your Fediverse server and asked to confirm the action."})]}),(0,s.jsxs)(r.Z,{className:u().buttons,children:[(0,s.jsx)(i.Z,{disabled:!_,type:"primary",onClick:F,children:"Follow"}),(0,s.jsx)(i.Z,{onClick:p,type:"primary",children:"Join the Fediverse"})]})]})]})}},66009:function(e){e.exports={header:"FollowModal_header__la1ji",buttons:"FollowModal_buttons__tt4Mc",instructions:"FollowModal_instructions__HiKFF",footer:"FollowModal_footer__AjucH",account:"FollowModal_account__cmHkm",logo:"FollowModal_logo__Ew8xK",username:"FollowModal_username__A_OTw",name:"FollowModal_name__Sf_TP"}}}]);
|
||||
//# sourceMappingURL=7177.a14880d482bc307d.js.map
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{77177:function(e,o,l){"use strict";l.r(o),l.d(o,{FollowModal:function(){return h}});var s=l(85893),r=l(26713),t=l(11382),a=l(14670),n=l(79531),i=l(71577),c=l(67294),d=l(66009),u=l.n(d);let h=e=>{let{handleClose:o,account:l,name:d}=e,[h,w]=(0,c.useState)(null),[_,f]=(0,c.useState)(!1),[m,v]=(0,c.useState)(!1),[j,x]=(0,c.useState)(null),g=e=>{w(e),function(e){let o=e.replace(/^@+/,"");return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(o).toLowerCase())}(e)?f(!0):f(!1)},p=()=>{window.open("https://owncast.online/join-fediverse","_blank")},F=async()=>{if(_){v(!0);try{let e=h.replace(/^@+/,""),l=await fetch("/api/remotefollow",{method:"POST",body:JSON.stringify({account:e})}),s=await l.json();if(s.redirectUrl&&(window.open(s.redirectUrl,"_blank"),o()),!s.success){x(s.message),v(!1);return}if(!s.redirectUrl){x("Unable to follow."),v(!1);return}}catch(e){x(e.message)}v(!1)}};return(0,s.jsxs)(r.Z,{direction:"vertical",id:"follow-modal",children:[(0,s.jsxs)("div",{className:u().header,children:["By following this stream you'll get notified on the Fediverse when it goes live. Now is a great time to",(0,s.jsx)("a",{href:"https://owncast.online/join-fediverse",target:"_blank",rel:"noreferrer",children:"\xa0learn about the Fediverse\xa0"}),"if it's new to you."]}),(0,s.jsxs)(t.Z,{spinning:m,children:[j&&(0,s.jsx)(a.Z,{message:"Follow Error",description:j,type:"error",showIcon:!0}),(0,s.jsxs)("div",{className:u().account,children:[(0,s.jsx)("img",{src:"/logo",alt:"logo",className:u().logo}),(0,s.jsxs)("div",{className:u().username,children:[(0,s.jsx)("div",{className:u().name,children:d}),(0,s.jsx)("div",{children:l})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:u().instructions,children:"Enter your username @server to follow"}),(0,s.jsx)(n.Z,{value:h,size:"large",onChange:e=>g(e.target.value),placeholder:"Your fediverse account @account@server",defaultValue:h}),(0,s.jsx)("div",{className:u().footer,children:"You'll be redirected to your Fediverse server and asked to confirm the action."})]}),(0,s.jsxs)(r.Z,{className:u().buttons,children:[(0,s.jsx)(i.Z,{disabled:!_,type:"primary",onClick:F,children:"Follow"}),(0,s.jsx)(i.Z,{onClick:p,type:"primary",children:"Join the Fediverse"})]})]})]})}},66009:function(e){e.exports={header:"FollowModal_header__la1ji",buttons:"FollowModal_buttons__tt4Mc",instructions:"FollowModal_instructions__HiKFF",footer:"FollowModal_footer__AjucH",account:"FollowModal_account__cmHkm",logo:"FollowModal_logo__Ew8xK",username:"FollowModal_username__A_OTw",name:"FollowModal_name__Sf_TP"}}}]);
|
||||
//# sourceMappingURL=7177.d6842813d5ab1fbc.js.map
|
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
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
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
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user