{"version":3,"sources":["config.ts","layout/Header.tsx","common/DefaultPage.tsx","common/LoadingSpinner.tsx","inject.tsx","snack/browserNotification.ts","layout/Navigation.tsx","common/ScrollUpButton.tsx","common/SettingsDialog.tsx","snack/SnackBarHandler.tsx","common/ConfirmDialog.tsx","message/extras.ts","common/ToggleVisibility.tsx","application/AddApplicationDialog.tsx","application/UpdateApplicationDialog.tsx","application/Applications.tsx","client/AddClientDialog.tsx","client/UpdateClientDialog.tsx","client/Clients.tsx","plugin/Plugins.tsx","common/Markdown.tsx","common/Container.tsx","plugin/PluginDetailView.tsx","user/Register.tsx","user/Login.tsx","message/Message.tsx","message/Messages.tsx","user/AddEditUserDialog.tsx","user/Users.tsx","common/ConnectionErrorBanner.tsx","layout/Layout.tsx","CurrentUser.ts","common/BaseStore.ts","application/AppStore.ts","message/WebSocketStore.ts","snack/SnackManager.ts","user/UserStore.ts","message/MessagesStore.ts","client/ClientStore.ts","plugin/PluginStore.ts","reactions.ts","index.tsx","apiAuth.ts","registerServiceWorker.ts"],"names":["config","url","register","version","commit","buildDate","window","get","key","Header","observer","this","props","classes","name","loggedIn","admin","toggleTheme","logout","style","setNavOpen","width","position","AppBar","className","appBar","Toolbar","toolbar","title","to","link","Typography","variant","titleName","color","href","renderButtons","IconButton","onClick","target","rel","showSettings","menuButtons","Hidden","smUp","implementation","icon","label","id","Component","ResponsiveButton","rest","Button","startIcon","withWidth","withStyles","theme","createStyles","zIndex","drawer","breakpoints","down","paddingBottom","justifyContent","flexWrap","display","flex","flexBasis","marginTop","order","up","paddingRight","textDecoration","withTheme","DefaultPage","rightControl","maxWidth","children","margin","Grid","container","spacing","item","xs","LoadingSpinner","textAlign","CircularProgress","size","inject","stores","node","mobxInject","InjectProvider","mayAllowPermission","Notify","needsPermission","isSupported","Notification","permission","closeAndFocus","event","parent","focus","location","close","closeAfterTimeout","setTimeout","Navigation","state","showRequestNotification","appStore","navOpen","apps","getItems","userApps","length","map","app","ListItem","button","ListItemText","primary","placeholderItems","disabled","root","paper","drawerPaper","Divider","align","requestPermission","console","log","setState","ResponsiveDrawer","Drawer","open","xsDown","height","minHeight","mixins","ScrollUpButton","opacity","scrollHandler","currentScrollPos","pageYOffset","nextState","Math","min","scrollUp","scrollTo","addEventListener","removeEventListener","Fab","bottom","right","SettingsDialog","pass","fClose","currentUser","Dialog","onClose","DialogTitle","DialogContent","TextField","autoFocus","type","value","onChange","e","fullWidth","DialogActions","Tooltip","changePassword","observable","SnackBarHandler","dispose","componentDidMount","reaction","snackManager","counter","onNewSnack","componentWillUnmount","openWhen","snackOpenSince","Date","now","MIN_VISIBLE_SNACK_TIME_IN_MS","closeCurrentSnack","openNextSnack","hasNext","next","current","message","duration","MAX_VISIBLE_SNACK_TIME_IN_MS","Snackbar","anchorOrigin","vertical","horizontal","autoHideDuration","onExited","action","ConfirmDialog","text","fOnSubmit","DialogContentText","RenderMode","ToggleVisibility","visible","toggleVisibility","fontFamily","fontSize","AddDialog","description","submitEnabled","handleChange","bind","multiline","propertyName","UpdateDialog","initialName","initialDescription","Applications","uploadId","upload","refresh","uploadImage","click","onUploadImage","file","files","indexOf","alert","createDialog","deleteId","updateId","Paper","elevation","Table","TableHead","TableRow","TableCell","padding","TableBody","image","token","fUpload","fDelete","fEdit","noDelete","internal","ref","create","update","getByID","remove","Row","Avatar","src","alignItems","placement","Clients","clientStore","showDialog","clients","client","Plugins","pluginStore","plugins","plugin","enabled","fToggleStatus","changeEnabledState","Switch","checked","Markdown","gfm","PluginDetailView","pluginID","parseInt","match","params","pluginInfo","displayText","currentConfig","refreshFeatures","nextProps","Promise","all","refreshConfigurer","refreshDisplayer","capabilities","requestConfig","response","requestDisplay","Info","Build","initialConfig","save","newConfig","a","changeConfig","Subject","PanelWrapper","Icon","float","toLowerCase","trim","replace","ConfigurerPanel","unsavedChanges","options","mode","lineNumbers","_","_1","newConf","then","DisplayerPanel","PluginInfo","author","modulePath","website","license","join","RegistrationDialog","namePresent","passPresent","success","Login","login","preventDefault","username","password","registerButton","registerDialog","onSubmit","connectionErrorMessage","marginBottom","contentType","extras","extract","Object","keys","k","some","Plain","path","Message","getBoundingClientRect","renderContent","content","date","wrapperPadding","imageWrapper","alt","messageContentWrapper","header","headerTitle","trash","component","React","PureComponent","marginRight","whiteSpace","wordBreak","overflow","Messages","appId","isLoadingMore","updateAllWithProps","messagesStore","exists","loadMore","updateAll","deleteMessage","removeSingle","renderMessage","heights","gutterBottom","onscroll","innerHeight","document","body","offsetHeight","checkIfLoadMore","messages","hasMore","canLoadMore","getName","hasMessages","refreshByApp","removeByApp","useWindowAsScrollContainer","preloadBatchSize","elementHeight","m","undefined","AddEditDialog","isEdit","FormControlLabel","control","handleChecked","UserRow","Users","userStore","editId","users","user","wrapper","ConnectionErrorBanner","retry","backgroundColor","lineHeight","localStorageThemeKey","themeMap","light","createMuiTheme","palette","dark","Layout","localStorageTheme","localStorage","getItem","currentTheme","setItem","authenticating","tryReconnect","flexDirection","CssBaseline","top","exact","render","tokenKey","CurrentUser","snack","tokenCache","reconnectTimeoutId","reconnectTime","localStorageToken","setToken","axios","post","catch","error","data","errorDescription","browser","detect","request","method","headers","Authorization","Base64","encode","resp","tryAuthenticate","reject","passThrough","status","connectionError","statusText","filter","forEach","delete","resolve","removeItem","quiet","clearTimeout","BaseStore","getByIDOrUndefined","Error","items","find","hasId","requestDelete","requestItems","AppStore","onDelete","formData","FormData","append","put","WebSocketStore","wsActive","ws","listen","callback","wsUrl","WebSocket","onerror","onmessage","JSON","parse","onclose","SnackManager","shift","push","UserStore","AllMessages","MessagesStore","loading","stateOf","emptyState","loaded","clear","fetchMessages","since","getUnCached","appToImage","reduce","appid","createTransformer","clearCache","createEmptyStatesForApps","array","nextSince","messageToDelete","index","findIndex","splice","pagedResult","paging","unshift","clearAll","removeFromList","ClientStore","createNoNotifcation","PluginStore","registerReactions","wsStore","loadAll","msg","publishSingleMessage","removeMarkdown","silent","notifyClick","notifyShow","show","priority","Audio","play","port","hostname","protocol","pathname","slashes","concat","endsWith","substring","lastIndexOf","prodUrl","initStores","interceptors","use","onbeforeunload","ReactDOM","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"mLAeMA,EAAe,aACjBC,IAAK,QACLC,UAAU,EACVC,QAAS,CAACC,OAAQ,UAAWC,UAAW,UAAWF,QAAS,YACzDG,OAAON,QAOP,SAASO,EAA6BC,GACzC,OAAOR,EAAOQ,G,2ZCqDZC,GADLC,Y,8JAEG,WACI,MAWIC,KAAKC,MAVLC,EADJ,EACIA,QACAV,EAFJ,EAEIA,QACAW,EAHJ,EAGIA,KACAC,EAJJ,EAIIA,SACAC,EALJ,EAKIA,MACAC,EANJ,EAMIA,YACAC,EAPJ,EAOIA,OACAC,EARJ,EAQIA,MACAC,EATJ,EASIA,WACAC,EAVJ,EAUIA,MAGEC,EAAqB,OAAVD,EAAiB,SAAW,QAE7C,OACI,eAACE,EAAA,EAAD,CAAQD,SAAUA,EAAUH,MAAOA,EAAOK,UAAWX,EAAQY,OAA7D,SACI,gBAACC,EAAA,EAAD,CAASF,UAAWX,EAAQc,QAA5B,UACI,uBAAKH,UAAWX,EAAQe,MAAxB,UACI,eAAC,IAAD,CAAMC,GAAG,IAAIL,UAAWX,EAAQiB,KAAhC,SACI,eAACC,EAAA,EAAD,CAAYC,QAAQ,KAAKR,UAAWX,EAAQoB,UAAWC,MAAM,UAA7D,sBAIJ,oBACIC,KAAM,kDAAoDhC,EAC1DqB,UAAWX,EAAQiB,KAFvB,SAII,gBAACC,EAAA,EAAD,CAAYC,QAAQ,SAASE,MAAM,UAAnC,cACM/B,UAIbY,GAAYJ,KAAKyB,cAActB,EAAME,EAAOE,EAAQG,EAAOD,GAC5D,iCACI,eAACiB,EAAA,EAAD,CAAYC,QAASrB,EAAaiB,MAAM,UAAxC,SACI,eAAC,IAAD,MAGJ,oBACIC,KAAK,mCACLX,UAAWX,EAAQiB,KACnBS,OAAO,SACPC,IAAI,sBAJR,SAMI,eAACH,EAAA,EAAD,CAAYH,MAAM,UAAlB,SACI,eAA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,EAAaC,gBFgDzB,K","file":"static/js/main.3595cf72.chunk.js","sourcesContent":["import {IVersion} from './types';\n\nexport interface IConfig {\n url: string;\n register: boolean;\n version: IVersion;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare global {\n interface Window {\n config?: Partial;\n }\n}\n\nconst config: IConfig = {\n url: 'unset',\n register: false,\n version: {commit: 'unknown', buildDate: 'unknown', version: 'unknown'},\n ...window.config,\n};\n\nexport function set(key: Key, value: IConfig[Key]): void {\n config[key] = value;\n}\n\nexport function get(key: K): IConfig[K] {\n return config[key];\n}\n","import AppBar from '@material-ui/core/AppBar';\nimport Button from '@material-ui/core/Button';\nimport IconButton from '@material-ui/core/IconButton';\nimport {createStyles, Theme, WithStyles, withStyles} from '@material-ui/core/styles';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Typography from '@material-ui/core/Typography';\nimport AccountCircle from '@material-ui/icons/AccountCircle';\nimport Chat from '@material-ui/icons/Chat';\nimport DevicesOther from '@material-ui/icons/DevicesOther';\nimport ExitToApp from '@material-ui/icons/ExitToApp';\nimport Highlight from '@material-ui/icons/Highlight';\nimport GitHubIcon from '@material-ui/icons/GitHub';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport Apps from '@material-ui/icons/Apps';\nimport SupervisorAccount from '@material-ui/icons/SupervisorAccount';\nimport React, {Component, CSSProperties} from 'react';\nimport {Link} from 'react-router-dom';\nimport {observer} from 'mobx-react';\nimport {Hidden, PropTypes, withWidth} from '@material-ui/core';\nimport {Breakpoint} from '@material-ui/core/styles/createBreakpoints';\n\nconst styles = (theme: Theme) =>\n createStyles({\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n [theme.breakpoints.down('xs')]: {\n paddingBottom: 10,\n },\n },\n toolbar: {\n justifyContent: 'space-between',\n [theme.breakpoints.down('xs')]: {\n flexWrap: 'wrap',\n },\n },\n menuButtons: {\n display: 'flex',\n [theme.breakpoints.down('sm')]: {\n flex: 1,\n },\n justifyContent: 'center',\n [theme.breakpoints.down('xs')]: {\n flexBasis: '100%',\n marginTop: 5,\n order: 1,\n justifyContent: 'space-between',\n },\n },\n title: {\n [theme.breakpoints.up('md')]: {\n flex: 1,\n },\n display: 'flex',\n alignItems: 'center',\n },\n titleName: {\n paddingRight: 10,\n },\n link: {\n color: 'inherit',\n textDecoration: 'none',\n },\n });\n\ntype Styles = WithStyles<'link' | 'menuButtons' | 'toolbar' | 'titleName' | 'title' | 'appBar'>;\n\ninterface IProps extends Styles {\n loggedIn: boolean;\n name: string;\n admin: boolean;\n version: string;\n toggleTheme: VoidFunction;\n showSettings: VoidFunction;\n logout: VoidFunction;\n style: CSSProperties;\n width: Breakpoint;\n setNavOpen: (open: boolean) => void;\n}\n\n@observer\nclass Header extends Component {\n public render() {\n const {\n classes,\n version,\n name,\n loggedIn,\n admin,\n toggleTheme,\n logout,\n style,\n setNavOpen,\n width,\n } = this.props;\n\n const position = width === 'xs' ? 'sticky' : 'fixed';\n\n return (\n \n \n
\n \n \n Gotify\n \n \n \n \n @{version}\n \n \n
\n {loggedIn && this.renderButtons(name, admin, logout, width, setNavOpen)}\n
\n \n \n \n\n \n \n \n \n \n
\n
\n
\n );\n }\n\n private renderButtons(\n name: string,\n admin: boolean,\n logout: VoidFunction,\n width: Breakpoint,\n setNavOpen: (open: boolean) => void\n ) {\n const {classes, showSettings} = this.props;\n return (\n
\n \n }\n onClick={() => setNavOpen(true)}\n label=\"menu\"\n width={width}\n color=\"inherit\"\n />\n \n {admin && (\n \n }\n label=\"users\"\n width={width}\n color=\"inherit\"\n />\n \n )}\n \n } label=\"apps\" width={width} color=\"inherit\" />\n \n \n }\n label=\"clients\"\n width={width}\n color=\"inherit\"\n />\n \n \n }\n label=\"plugins\"\n width={width}\n color=\"inherit\"\n />\n \n }\n label={name}\n onClick={showSettings}\n id=\"changepw\"\n width={width}\n color=\"inherit\"\n />\n }\n label=\"Logout\"\n onClick={logout}\n id=\"logout\"\n width={width}\n color=\"inherit\"\n />\n
\n );\n }\n}\n\nconst ResponsiveButton: React.FC<{\n width: Breakpoint;\n color: PropTypes.Color;\n label: string;\n id?: string;\n onClick?: () => void;\n icon: React.ReactNode;\n}> = ({width, icon, label, ...rest}) => {\n if (width === 'xs' || width === 'sm') {\n return {icon};\n }\n return (\n \n );\n};\n\nexport default withWidth()(withStyles(styles, {withTheme: true})(Header));\n","import Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport React, {FC} from 'react';\n\ninterface IProps {\n title: string;\n rightControl?: React.ReactNode;\n maxWidth?: number;\n}\n\nconst DefaultPage: FC = ({title, rightControl, maxWidth = 700, children}) => (\n
\n \n \n \n {title}\n \n {rightControl}\n \n {children}\n \n
\n);\nexport default DefaultPage;\n","import CircularProgress from '@material-ui/core/CircularProgress';\nimport Grid from '@material-ui/core/Grid';\nimport React from 'react';\nimport DefaultPage from './DefaultPage';\n\nexport default function LoadingSpinner() {\n return (\n \n \n \n \n \n );\n}\n","import * as React from 'react';\nimport {UserStore} from './user/UserStore';\nimport {SnackManager} from './snack/SnackManager';\nimport {MessagesStore} from './message/MessagesStore';\nimport {CurrentUser} from './CurrentUser';\nimport {ClientStore} from './client/ClientStore';\nimport {AppStore} from './application/AppStore';\nimport {inject as mobxInject, Provider} from 'mobx-react';\nimport {WebSocketStore} from './message/WebSocketStore';\nimport {PluginStore} from './plugin/PluginStore';\n\nexport interface StoreMapping {\n userStore: UserStore;\n snackManager: SnackManager;\n messagesStore: MessagesStore;\n currentUser: CurrentUser;\n clientStore: ClientStore;\n appStore: AppStore;\n pluginStore: PluginStore;\n wsStore: WebSocketStore;\n}\n\nexport type AllStores = Extract;\nexport type Stores = Pick;\n\nexport const inject =\n (...stores: I[]) =>\n // eslint-disable-next-line @typescript-eslint/ban-types\n

(\n node: React.ComponentType

\n ): React.ComponentType>> =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n mobxInject(...stores)(node) as any;\n\nexport const InjectProvider: React.FC<{stores: StoreMapping}> = ({children, stores}) => (\n {children}\n);\n","import Notify from 'notifyjs';\nimport removeMarkdown from 'remove-markdown';\nimport {IMessage} from '../types';\n\nexport function mayAllowPermission(): boolean {\n return Notify.needsPermission && Notify.isSupported() && Notification.permission !== 'denied';\n}\n\nexport function requestPermission() {\n if (Notify.needsPermission && Notify.isSupported()) {\n Notify.requestPermission(\n () => console.log('granted notification permissions'),\n () => console.log('notification permission denied')\n );\n }\n}\n\nexport function notifyNewMessage(msg: IMessage) {\n const notify = new Notify(msg.title, {\n body: removeMarkdown(msg.message),\n icon: msg.image,\n silent: true,\n notifyClick: closeAndFocus,\n notifyShow: closeAfterTimeout,\n });\n notify.show();\n}\n\nfunction closeAndFocus(event: Event) {\n if (window.parent) {\n window.parent.focus();\n }\n window.focus();\n window.location.href = '/';\n const target = event.target as Notification;\n target.close();\n}\n\nfunction closeAfterTimeout(event: Event) {\n setTimeout(() => {\n const target = event.target as Notification;\n target.close();\n }, 5000);\n}\n","import Divider from '@material-ui/core/Divider';\nimport Drawer from '@material-ui/core/Drawer';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport {StyleRules, Theme, WithStyles, withStyles} from '@material-ui/core/styles';\nimport React, {Component} from 'react';\nimport {Link} from 'react-router-dom';\nimport {observer} from 'mobx-react';\nimport {inject, Stores} from '../inject';\nimport {mayAllowPermission, requestPermission} from '../snack/browserNotification';\nimport {Button, Hidden, IconButton, Typography} from '@material-ui/core';\nimport {DrawerProps} from '@material-ui/core/Drawer/Drawer';\nimport CloseIcon from '@material-ui/icons/Close';\n\nconst styles = (theme: Theme): StyleRules<'root' | 'drawerPaper' | 'toolbar' | 'link'> => ({\n root: {\n height: '100%',\n },\n drawerPaper: {\n position: 'relative',\n width: 250,\n minHeight: '100%',\n height: '100vh',\n },\n toolbar: theme.mixins.toolbar,\n link: {\n color: 'inherit',\n textDecoration: 'none',\n },\n});\n\ntype Styles = WithStyles<'root' | 'drawerPaper' | 'toolbar' | 'link'>;\n\ninterface IProps {\n loggedIn: boolean;\n navOpen: boolean;\n setNavOpen: (open: boolean) => void;\n}\n\n@observer\nclass Navigation extends Component<\n IProps & Styles & Stores<'appStore'>,\n {showRequestNotification: boolean}\n> {\n public state = {showRequestNotification: mayAllowPermission()};\n\n public render() {\n const {classes, loggedIn, appStore, navOpen, setNavOpen} = this.props;\n const {showRequestNotification} = this.state;\n const apps = appStore.getItems();\n\n const userApps =\n apps.length === 0\n ? null\n : apps.map((app) => (\n setNavOpen(false)}\n className={`${classes.link} item`}\n to={'/messages/' + app.id}\n key={app.id}\n >\n \n \n \n \n ));\n\n const placeholderItems = [\n \n \n ,\n \n \n ,\n ];\n\n return (\n \n

\n setNavOpen(false)}>\n \n \n \n \n \n
{loggedIn ? userApps : placeholderItems}
\n \n \n {showRequestNotification ? (\n {\n requestPermission();\n this.setState({showRequestNotification: false});\n }}\n >\n Enable Notifications\n \n ) : null}\n \n \n );\n }\n}\n\nconst ResponsiveDrawer: React.FC<\n DrawerProps & {navOpen: boolean; setNavOpen: (open: boolean) => void}\n> = ({navOpen, setNavOpen, children, ...rest}) => (\n <>\n \n \n setNavOpen(false)}>\n \n \n {children}\n \n \n \n \n {children}\n \n \n \n);\n\nexport default withStyles(styles, {withTheme: true})(inject('appStore')(Navigation));\n","import Fab from '@material-ui/core/Fab';\nimport KeyboardArrowUp from '@material-ui/icons/KeyboardArrowUp';\nimport React, {Component} from 'react';\n\nclass ScrollUpButton extends Component {\n state = {\n display: 'none',\n opacity: 0,\n };\n componentDidMount() {\n window.addEventListener('scroll', this.scrollHandler);\n }\n\n componentWillUnmount() {\n window.removeEventListener('scroll', this.scrollHandler);\n }\n\n scrollHandler = () => {\n const currentScrollPos = window.pageYOffset;\n const opacity = Math.min(currentScrollPos / 500, 1);\n const nextState = {display: currentScrollPos > 0 ? 'inherit' : 'none', opacity};\n if (this.state.display !== nextState.display || this.state.opacity !== nextState.opacity) {\n this.setState(nextState);\n }\n };\n\n public render() {\n return (\n \n \n \n );\n }\n\n private scrollUp = () => window.scrollTo(0, 0);\n}\n\nexport default ScrollUpButton;\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport React, {Component} from 'react';\nimport {observable} from 'mobx';\nimport {observer} from 'mobx-react';\nimport {inject, Stores} from '../inject';\n\ninterface IProps {\n fClose: VoidFunction;\n}\n\n@observer\nclass SettingsDialog extends Component> {\n @observable\n private pass = '';\n\n public render() {\n const {pass} = this;\n const {fClose, currentUser} = this.props;\n const submitAndClose = () => {\n currentUser.changePassword(pass);\n fClose();\n };\n return (\n \n Change Password\n \n (this.pass = e.target.value)}\n fullWidth\n />\n \n \n \n \n
\n \n Change\n \n
\n
\n
\n \n );\n }\n}\n\nexport default inject('currentUser')(SettingsDialog);\n","import IconButton from '@material-ui/core/IconButton';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport Close from '@material-ui/icons/Close';\nimport React, {Component} from 'react';\nimport {observable, reaction} from 'mobx';\nimport {observer} from 'mobx-react';\nimport {inject, Stores} from '../inject';\n\n@observer\nclass SnackBarHandler extends Component> {\n private static MAX_VISIBLE_SNACK_TIME_IN_MS = 6000;\n private static MIN_VISIBLE_SNACK_TIME_IN_MS = 1000;\n\n @observable\n private open = false;\n @observable\n private openWhen = 0;\n\n private dispose: () => void = () => {};\n\n public componentDidMount = () =>\n (this.dispose = reaction(() => this.props.snackManager.counter, this.onNewSnack));\n\n public componentWillUnmount = () => this.dispose();\n\n public render() {\n const {message: current, hasNext} = this.props.snackManager;\n const duration = hasNext()\n ? SnackBarHandler.MIN_VISIBLE_SNACK_TIME_IN_MS\n : SnackBarHandler.MAX_VISIBLE_SNACK_TIME_IN_MS;\n\n return (\n {current}}\n action={\n \n \n \n }\n />\n );\n }\n\n private onNewSnack = () => {\n const {open, openWhen} = this;\n\n if (!open) {\n this.openNextSnack();\n return;\n }\n\n const snackOpenSince = Date.now() - openWhen;\n if (snackOpenSince > SnackBarHandler.MIN_VISIBLE_SNACK_TIME_IN_MS) {\n this.closeCurrentSnack();\n } else {\n setTimeout(\n this.closeCurrentSnack,\n SnackBarHandler.MIN_VISIBLE_SNACK_TIME_IN_MS - snackOpenSince\n );\n }\n };\n\n private openNextSnack = () => {\n if (this.props.snackManager.hasNext()) {\n this.open = true;\n this.openWhen = Date.now();\n this.props.snackManager.next();\n }\n };\n\n private closeCurrentSnack = () => (this.open = false);\n}\n\nexport default inject('snackManager')(SnackBarHandler);\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport React from 'react';\n\ninterface IProps {\n title: string;\n text: string;\n fClose: VoidFunction;\n fOnSubmit: VoidFunction;\n}\n\nexport default function ConfirmDialog({title, text, fClose, fOnSubmit}: IProps) {\n const submitAndClose = () => {\n fOnSubmit();\n fClose();\n };\n return (\n \n {title}\n \n {text}\n \n \n \n \n Yes\n \n \n \n );\n}\n","import {IMessageExtras} from '../types';\n\nexport enum RenderMode {\n Markdown = 'text/markdown',\n Plain = 'text/plain',\n}\n\nexport const contentType = (extras?: IMessageExtras): RenderMode => {\n const type = extract(extras, 'client::display', 'contentType');\n const valid = Object.keys(RenderMode)\n .map((k) => RenderMode[k])\n .some((mode) => mode === type);\n return valid ? type : RenderMode.Plain;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst extract = (extras: IMessageExtras | undefined, key: string, path: string): any => {\n if (!extras) {\n return null;\n }\n\n if (!extras[key]) {\n return null;\n }\n\n if (!extras[key][path]) {\n return null;\n }\n\n return extras[key][path];\n};\n","import IconButton from '@material-ui/core/IconButton';\nimport Typography from '@material-ui/core/Typography';\nimport Visibility from '@material-ui/icons/Visibility';\nimport VisibilityOff from '@material-ui/icons/VisibilityOff';\nimport React, {Component, CSSProperties} from 'react';\n\ninterface IProps {\n value: string;\n style?: CSSProperties;\n}\n\ninterface IState {\n visible: boolean;\n}\n\nclass ToggleVisibility extends Component {\n public state = {visible: false};\n\n public render() {\n const {value, style} = this.props;\n const text = this.state.visible ? value : '•••••••••••••••';\n return (\n
\n \n {this.state.visible ? : }\n \n {text}\n
\n );\n }\n\n private toggleVisibility = () => this.setState({visible: !this.state.visible});\n}\n\nexport default ToggleVisibility;\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport React, {Component} from 'react';\n\ninterface IProps {\n fClose: VoidFunction;\n fOnSubmit: (name: string, description: string) => void;\n}\n\ninterface IState {\n name: string;\n description: string;\n}\n\nexport default class AddDialog extends Component {\n public state = {name: '', description: ''};\n\n public render() {\n const {fClose, fOnSubmit} = this.props;\n const {name, description} = this.state;\n const submitEnabled = this.state.name.length !== 0;\n const submitAndClose = () => {\n fOnSubmit(name, description);\n fClose();\n };\n return (\n \n Create an application\n \n \n An application is allowed to send messages.\n \n \n \n \n \n \n \n
\n \n Create\n \n
\n
\n
\n \n );\n }\n\n private handleChange(propertyName: string, event: React.ChangeEvent) {\n const state = this.state;\n state[propertyName] = event.target.value;\n this.setState(state);\n }\n}\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport React, {Component} from 'react';\n\ninterface IProps {\n fClose: VoidFunction;\n fOnSubmit: (name: string, description: string) => void;\n initialName: string;\n initialDescription: string;\n}\n\ninterface IState {\n name: string;\n description: string;\n}\n\nexport default class UpdateDialog extends Component {\n public state = {name: '', description: ''};\n\n constructor(props: IProps) {\n super(props);\n this.state = {\n name: props.initialName,\n description: props.initialDescription,\n };\n }\n\n public render() {\n const {fClose, fOnSubmit} = this.props;\n const {name, description} = this.state;\n const submitEnabled = this.state.name.length !== 0;\n const submitAndClose = () => {\n fOnSubmit(name, description);\n fClose();\n };\n return (\n \n Update an application\n \n \n An application is allowed to send messages.\n \n \n \n \n \n \n \n
\n \n Update\n \n
\n
\n
\n \n );\n }\n\n private handleChange(propertyName: string, event: React.ChangeEvent) {\n const state = this.state;\n state[propertyName] = event.target.value;\n this.setState(state);\n }\n}\n","import Avatar from '@material-ui/core/Avatar';\nimport Grid from '@material-ui/core/Grid';\nimport IconButton from '@material-ui/core/IconButton';\nimport Paper from '@material-ui/core/Paper';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport Delete from '@material-ui/icons/Delete';\nimport Edit from '@material-ui/icons/Edit';\nimport CloudUpload from '@material-ui/icons/CloudUpload';\nimport React, {ChangeEvent, Component, SFC} from 'react';\nimport ConfirmDialog from '../common/ConfirmDialog';\nimport DefaultPage from '../common/DefaultPage';\nimport Button from '@material-ui/core/Button';\nimport ToggleVisibility from '../common/ToggleVisibility';\nimport AddApplicationDialog from './AddApplicationDialog';\nimport {observer} from 'mobx-react';\nimport {observable} from 'mobx';\nimport {inject, Stores} from '../inject';\nimport * as config from '../config';\nimport UpdateDialog from './UpdateApplicationDialog';\nimport {IApplication} from '../types';\n\n@observer\nclass Applications extends Component> {\n @observable\n private deleteId: number | false = false;\n @observable\n private updateId: number | false = false;\n @observable\n private createDialog = false;\n\n private uploadId = -1;\n private upload: HTMLInputElement | null = null;\n\n public componentDidMount = () => this.props.appStore.refresh();\n\n public render() {\n const {\n createDialog,\n deleteId,\n updateId,\n props: {appStore},\n } = this;\n const apps = appStore.getItems();\n return (\n (this.createDialog = true)}\n >\n Create Application\n \n }\n maxWidth={1000}\n >\n \n \n \n \n \n \n Name\n Token\n Description\n \n \n \n \n \n {apps.map((app: IApplication) => (\n this.uploadImage(app.id)}\n fDelete={() => (this.deleteId = app.id)}\n fEdit={() => (this.updateId = app.id)}\n noDelete={app.internal}\n />\n ))}\n \n
\n (this.upload = upload)}\n type=\"file\"\n style={{display: 'none'}}\n onChange={this.onUploadImage}\n />\n
\n
\n {createDialog && (\n (this.createDialog = false)}\n fOnSubmit={appStore.create}\n />\n )}\n {updateId !== false && (\n (this.updateId = false)}\n fOnSubmit={(name, description) =>\n appStore.update(updateId, name, description)\n }\n initialDescription={appStore.getByID(updateId).description}\n initialName={appStore.getByID(updateId).name}\n />\n )}\n {deleteId !== false && (\n (this.deleteId = false)}\n fOnSubmit={() => appStore.remove(deleteId)}\n />\n )}\n \n );\n }\n\n private uploadImage = (id: number) => {\n this.uploadId = id;\n if (this.upload) {\n this.upload.click();\n }\n };\n\n private onUploadImage = (e: ChangeEvent) => {\n const file = e.target.files?.[0];\n if (!file) {\n return;\n }\n if (['image/png', 'image/jpeg', 'image/gif'].indexOf(file.type) !== -1) {\n this.props.appStore.uploadImage(this.uploadId, file);\n } else {\n alert('Uploaded file must be of type png, jpeg or gif.');\n }\n };\n}\n\ninterface IRowProps {\n name: string;\n value: string;\n noDelete: boolean;\n description: string;\n fUpload: VoidFunction;\n image: string;\n fDelete: VoidFunction;\n fEdit: VoidFunction;\n}\n\nconst Row: SFC = observer(\n ({name, value, noDelete, description, fDelete, fUpload, image, fEdit}) => (\n \n \n
\n \n \n \n \n
\n
\n {name}\n \n \n \n {description}\n \n \n \n \n \n \n \n \n \n \n
\n )\n);\n\nexport default inject('appStore')(Applications);\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport React, {Component} from 'react';\n\ninterface IProps {\n fClose: VoidFunction;\n fOnSubmit: (name: string) => void;\n}\n\nexport default class AddDialog extends Component {\n public state = {name: ''};\n\n public render() {\n const {fClose, fOnSubmit} = this.props;\n const {name} = this.state;\n const submitEnabled = this.state.name.length !== 0;\n const submitAndClose = () => {\n fOnSubmit(name);\n fClose();\n };\n return (\n \n Create a client\n \n \n \n \n \n \n
\n \n Create\n \n
\n \n
\n \n );\n }\n\n private handleChange(propertyName: string, event: React.ChangeEvent) {\n const state = this.state;\n state[propertyName] = event.target.value;\n this.setState(state);\n }\n}\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport React, {Component} from 'react';\n\ninterface IProps {\n fClose: VoidFunction;\n fOnSubmit: (name: string) => void;\n initialName: string;\n}\n\ninterface IState {\n name: string;\n}\n\nexport default class UpdateDialog extends Component {\n public state = {name: ''};\n\n constructor(props: IProps) {\n super(props);\n this.state = {\n name: props.initialName,\n };\n }\n\n public render() {\n const {fClose, fOnSubmit} = this.props;\n const {name} = this.state;\n const submitEnabled = this.state.name.length !== 0;\n const submitAndClose = () => {\n fOnSubmit(name);\n fClose();\n };\n return (\n \n Update a Client\n \n \n A client manages messages, clients, applications and users (with admin\n permissions).\n \n \n \n \n \n \n
\n \n Update\n \n
\n
\n
\n \n );\n }\n\n private handleChange(propertyName: string, event: React.ChangeEvent) {\n const state = {};\n state[propertyName] = event.target.value;\n this.setState(state);\n }\n}\n","import Grid from '@material-ui/core/Grid';\nimport IconButton from '@material-ui/core/IconButton';\nimport Paper from '@material-ui/core/Paper';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport Delete from '@material-ui/icons/Delete';\nimport Edit from '@material-ui/icons/Edit';\nimport React, {Component, SFC} from 'react';\nimport ConfirmDialog from '../common/ConfirmDialog';\nimport DefaultPage from '../common/DefaultPage';\nimport Button from '@material-ui/core/Button';\nimport ToggleVisibility from '../common/ToggleVisibility';\nimport AddClientDialog from './AddClientDialog';\nimport UpdateDialog from './UpdateClientDialog';\nimport {observer} from 'mobx-react';\nimport {observable} from 'mobx';\nimport {inject, Stores} from '../inject';\nimport {IClient} from '../types';\n\n@observer\nclass Clients extends Component> {\n @observable\n private showDialog = false;\n @observable\n private deleteId: false | number = false;\n @observable\n private updateId: false | number = false;\n\n public componentDidMount = () => this.props.clientStore.refresh();\n\n public render() {\n const {\n deleteId,\n updateId,\n showDialog,\n props: {clientStore},\n } = this;\n const clients = clientStore.getItems();\n\n return (\n (this.showDialog = true)}\n >\n Create Client\n \n }\n >\n \n \n \n \n \n Name\n Token\n \n \n \n \n \n {clients.map((client: IClient) => (\n (this.updateId = client.id)}\n fDelete={() => (this.deleteId = client.id)}\n />\n ))}\n \n
\n
\n
\n {showDialog && (\n (this.showDialog = false)}\n fOnSubmit={clientStore.create}\n />\n )}\n {updateId !== false && (\n (this.updateId = false)}\n fOnSubmit={(name) => clientStore.update(updateId, name)}\n initialName={clientStore.getByID(updateId).name}\n />\n )}\n {deleteId !== false && (\n (this.deleteId = false)}\n fOnSubmit={() => clientStore.remove(deleteId)}\n />\n )}\n \n );\n }\n}\n\ninterface IRowProps {\n name: string;\n value: string;\n fEdit: VoidFunction;\n fDelete: VoidFunction;\n}\n\nconst Row: SFC = ({name, value, fEdit, fDelete}) => (\n \n {name}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport default inject('clientStore')(Clients);\n","import React, {Component, SFC} from 'react';\nimport {Link} from 'react-router-dom';\nimport Grid from '@material-ui/core/Grid';\nimport Paper from '@material-ui/core/Paper';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport Settings from '@material-ui/icons/Settings';\nimport {Switch, Button} from '@material-ui/core';\nimport DefaultPage from '../common/DefaultPage';\nimport ToggleVisibility from '../common/ToggleVisibility';\nimport {observer} from 'mobx-react';\nimport {inject, Stores} from '../inject';\nimport {IPlugin} from '../types';\n\n@observer\nclass Plugins extends Component> {\n public componentDidMount = () => this.props.pluginStore.refresh();\n\n public render() {\n const {\n props: {pluginStore},\n } = this;\n const plugins = pluginStore.getItems();\n return (\n \n \n \n \n \n \n ID\n Enabled\n Name\n Token\n Details\n \n \n \n {plugins.map((plugin: IPlugin) => (\n \n this.props.pluginStore.changeEnabledState(\n plugin.id,\n !plugin.enabled\n )\n }\n />\n ))}\n \n
\n
\n
\n
\n );\n }\n}\n\ninterface IRowProps {\n id: number;\n name: string;\n token: string;\n enabled: boolean;\n fToggleStatus: VoidFunction;\n}\n\nconst Row: SFC = observer(({name, id, token, enabled, fToggleStatus}) => (\n \n {id}\n \n \n \n {name}\n \n \n \n \n \n \n \n \n \n));\n\nexport default inject('pluginStore')(Plugins);\n","import React from 'react';\nimport ReactMarkdown from 'react-markdown';\nimport gfm from 'remark-gfm';\n\nexport const Markdown = ({children}: {children: string}) => (\n {children}\n);\n","import Paper from '@material-ui/core/Paper';\nimport {withStyles, WithStyles} from '@material-ui/core/styles';\nimport * as React from 'react';\n\nconst styles = () => ({\n paper: {\n padding: 16,\n },\n});\n\ninterface IProps extends WithStyles<'paper'> {\n style?: React.CSSProperties;\n}\n\nconst Container: React.FC = ({classes, children, style}) => (\n \n {children}\n \n);\n\nexport default withStyles(styles)(Container);\n","import React, {Component} from 'react';\nimport {RouteComponentProps} from 'react-router';\nimport {Markdown} from '../common/Markdown';\nimport {UnControlled as CodeMirror} from 'react-codemirror2';\nimport 'codemirror/lib/codemirror.css';\nimport 'codemirror/theme/material.css';\nimport 'codemirror/mode/yaml/yaml';\nimport Info from '@material-ui/icons/Info';\nimport Build from '@material-ui/icons/Build';\nimport Subject from '@material-ui/icons/Subject';\nimport Refresh from '@material-ui/icons/Refresh';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport DefaultPage from '../common/DefaultPage';\nimport * as config from '../config';\nimport Container from '../common/Container';\nimport {inject, Stores} from '../inject';\nimport {IPlugin} from '../types';\n\ntype IProps = RouteComponentProps<{id: string}>;\n\ninterface IState {\n displayText: string | null;\n currentConfig: string | null;\n}\n\nclass PluginDetailView extends Component, IState> {\n private pluginID: number = parseInt(this.props.match.params.id, 10);\n private pluginInfo = () => this.props.pluginStore.getByID(this.pluginID);\n\n public state: IState = {\n displayText: null,\n currentConfig: null,\n };\n\n public componentWillMount() {\n this.refreshFeatures();\n }\n\n public componentWillReceiveProps(nextProps: IProps & Stores<'pluginStore'>) {\n this.pluginID = parseInt(nextProps.match.params.id, 10);\n this.refreshFeatures();\n }\n\n private refreshFeatures() {\n return Promise.all([this.refreshConfigurer(), this.refreshDisplayer()]);\n }\n\n private async refreshConfigurer() {\n const {\n props: {pluginStore},\n } = this;\n if (this.pluginInfo().capabilities.indexOf('configurer') !== -1) {\n const response = await pluginStore.requestConfig(this.pluginID);\n this.setState({currentConfig: response});\n }\n }\n\n private async refreshDisplayer() {\n const {\n props: {pluginStore},\n } = this;\n if (this.pluginInfo().capabilities.indexOf('displayer') !== -1) {\n const response = await pluginStore.requestDisplay(this.pluginID);\n this.setState({displayText: response});\n }\n }\n\n public render() {\n const pluginInfo = this.pluginInfo();\n const {name, capabilities} = pluginInfo;\n return (\n \n \n \n \n {capabilities.indexOf('configurer') !== -1 ? (\n \n {\n await this.props.pluginStore.changeConfig(this.pluginID, newConfig);\n await this.refreshFeatures();\n }}\n />\n \n ) : null}{' '}\n {capabilities.indexOf('displayer') !== -1 ? (\n \n \n \n ) : null}\n \n );\n }\n}\n\ninterface IPanelWrapperProps {\n name: string;\n description?: string;\n refresh?: () => Promise;\n icon?: React.ComponentType;\n}\n\nconst PanelWrapper: React.FC = ({\n name,\n description,\n refresh,\n icon,\n children,\n}) => {\n const Icon = icon;\n return (\n \n \n {Icon ? (\n \n \n  \n \n ) : null}\n {name}\n {refresh ? (\n {\n refresh();\n }}\n >\n \n \n ) : null}\n \n {description ? {description} : null}\n
\n
{children}
\n
\n );\n};\n\ninterface IConfigurerPanelProps {\n pluginInfo: IPlugin;\n initialConfig: string;\n save: (newConfig: string) => Promise;\n}\nclass ConfigurerPanel extends Component {\n public state = {unsavedChanges: null};\n\n public render() {\n return (\n
\n {\n let newConf: string | null = value;\n if (value === this.props.initialConfig) {\n newConf = null;\n }\n this.setState({unsavedChanges: newConf});\n }}\n />\n
\n {\n const newConfig = this.state.unsavedChanges;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.props.save(newConfig!).then(() => {\n this.setState({unsavedChanges: null});\n });\n }}\n >\n Save\n \n
\n );\n }\n}\n\ninterface IDisplayerPanelProps {\n pluginInfo: IPlugin;\n displayText: string;\n}\nconst DisplayerPanel: React.FC = ({displayText}) => (\n \n {displayText}\n \n);\n\nclass PluginInfo extends Component<{pluginInfo: IPlugin}> {\n public render() {\n const {\n props: {\n pluginInfo: {name, author, modulePath, website, license, capabilities, id, token},\n },\n } = this;\n return (\n
\n {name ? (\n \n Name: {name}\n \n ) : null}\n {author ? (\n \n Author: {author}\n \n ) : null}\n \n Module Path: {modulePath}\n \n {website ? (\n \n Website: {website}\n \n ) : null}\n {license ? (\n \n License: {license}\n \n ) : null}\n \n Capabilities: {capabilities.join(', ')}\n \n {capabilities.indexOf('webhooker') !== -1 ? (\n \n Custom Route Prefix:{' '}\n {((url) => (\n \n {url}\n \n ))(`${config.get('url')}plugin/${id}/custom/${token}/`)}\n \n ) : null}\n
\n );\n }\n}\n\nexport default inject('pluginStore')(PluginDetailView);\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport React, {ChangeEvent, Component} from 'react';\n\ninterface IProps {\n name?: string;\n fClose: VoidFunction;\n fOnSubmit: (name: string, pass: string) => Promise;\n}\n\ninterface IState {\n name: string;\n pass: string;\n}\n\nexport default class RegistrationDialog extends Component {\n public state = {\n name: '',\n pass: '',\n };\n\n public render() {\n const {fClose, fOnSubmit} = this.props;\n const {name, pass} = this.state;\n const namePresent = this.state.name.length !== 0;\n const passPresent = this.state.pass.length !== 0;\n const submitAndClose = (): void => {\n fOnSubmit(name, pass).then((success) => {\n if (success) {\n fClose();\n }\n });\n };\n return (\n \n Registration\n \n \n \n \n \n \n \n
\n \n Register\n \n
\n \n
\n \n );\n }\n\n private handleChange(propertyName: string, event: ChangeEvent) {\n const state = this.state;\n state[propertyName] = event.target.value;\n this.setState(state);\n }\n}\n","import Button from '@material-ui/core/Button';\nimport Grid from '@material-ui/core/Grid';\nimport TextField from '@material-ui/core/TextField';\nimport React, {Component, FormEvent} from 'react';\nimport Container from '../common/Container';\nimport DefaultPage from '../common/DefaultPage';\nimport {observable} from 'mobx';\nimport {observer} from 'mobx-react';\nimport {inject, Stores} from '../inject';\nimport * as config from '../config';\nimport RegistrationDialog from './Register';\n\n@observer\nclass Login extends Component> {\n @observable\n private username = '';\n @observable\n private password = '';\n @observable\n private registerDialog = false;\n\n public render() {\n const {username, password, registerDialog} = this;\n return (\n \n \n \n
\n (this.username = e.target.value)}\n />\n (this.password = e.target.value)}\n />\n \n Login\n \n \n
\n
\n {registerDialog && (\n (this.registerDialog = false)}\n fOnSubmit={this.props.currentUser.register}\n />\n )}\n
\n );\n }\n\n private login = (e: React.MouseEvent) => {\n e.preventDefault();\n this.props.currentUser.login(this.username, this.password);\n };\n\n private registerButton = () => {\n if (config.get('register'))\n return (\n (this.registerDialog = true)}\n >\n Register\n \n );\n else return null;\n };\n\n private preventDefault = (e: FormEvent) => e.preventDefault();\n}\n\nexport default inject('currentUser')(Login);\n","import IconButton from '@material-ui/core/IconButton';\nimport {createStyles, Theme, withStyles, WithStyles} from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport Delete from '@material-ui/icons/Delete';\nimport React from 'react';\nimport TimeAgo from 'react-timeago';\nimport Container from '../common/Container';\nimport * as config from '../config';\nimport {Markdown} from '../common/Markdown';\nimport {RenderMode, contentType} from './extras';\nimport {IMessageExtras} from '../types';\n\nconst styles = (theme: Theme) =>\n createStyles({\n header: {\n display: 'flex',\n flexWrap: 'wrap',\n marginBottom: 0,\n },\n headerTitle: {\n flex: 1,\n },\n trash: {\n marginTop: -15,\n marginRight: -15,\n },\n wrapperPadding: {\n padding: 12,\n },\n messageContentWrapper: {\n width: '100%',\n maxWidth: 585,\n },\n image: {\n marginRight: 15,\n [theme.breakpoints.down('sm')]: {\n width: 32,\n height: 32,\n },\n },\n date: {\n [theme.breakpoints.down('sm')]: {\n order: 1,\n flexBasis: '100%',\n opacity: 0.7,\n },\n },\n imageWrapper: {\n display: 'flex',\n },\n content: {\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-all',\n '& p': {\n margin: 0,\n },\n '& a': {\n color: '#ff7f50',\n },\n '& pre': {\n overflow: 'auto',\n },\n '& img': {\n maxWidth: '100%',\n },\n },\n });\n\ninterface IProps {\n title: string;\n image?: string;\n date: string;\n content: string;\n fDelete: VoidFunction;\n extras?: IMessageExtras;\n height: (height: number) => void;\n}\n\nclass Message extends React.PureComponent> {\n private node: HTMLDivElement | null = null;\n\n public componentDidMount = () =>\n this.props.height(this.node ? this.node.getBoundingClientRect().height : 0);\n\n private renderContent = () => {\n const content = this.props.content;\n switch (contentType(this.props.extras)) {\n case RenderMode.Markdown:\n return {content};\n case RenderMode.Plain:\n default:\n return content;\n }\n };\n\n public render(): React.ReactNode {\n const {fDelete, classes, title, date, image} = this.props;\n\n return (\n
(this.node = ref)}>\n \n
\n {image !== null ? (\n \n ) : null}\n
\n
\n
\n \n {title}\n \n \n \n \n \n \n \n
\n \n {this.renderContent()}\n \n
\n
\n
\n );\n }\n}\n\nexport default withStyles(styles, {withTheme: true})(Message);\n","import CircularProgress from '@material-ui/core/CircularProgress';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport React, {Component} from 'react';\nimport {RouteComponentProps} from 'react-router';\nimport DefaultPage from '../common/DefaultPage';\nimport Button from '@material-ui/core/Button';\nimport Message from './Message';\nimport {observer} from 'mobx-react';\nimport {inject, Stores} from '../inject';\nimport {observable} from 'mobx';\nimport ReactInfinite from 'react-infinite';\nimport {IMessage} from '../types';\n\ntype IProps = RouteComponentProps<{id: string}>;\n\ninterface IState {\n appId: number;\n}\n\n@observer\nclass Messages extends Component, IState> {\n @observable\n private heights: Record = {};\n\n private static appId(props: IProps) {\n if (props === undefined) {\n return -1;\n }\n const {match} = props;\n return match.params.id !== undefined ? parseInt(match.params.id, 10) : -1;\n }\n\n public state = {appId: -1};\n\n private isLoadingMore = false;\n\n public componentWillReceiveProps(nextProps: IProps & Stores<'messagesStore' | 'appStore'>) {\n this.updateAllWithProps(nextProps);\n }\n\n public componentWillMount() {\n window.onscroll = () => {\n if (\n window.innerHeight + window.pageYOffset >=\n document.body.offsetHeight - window.innerHeight * 2\n ) {\n this.checkIfLoadMore();\n }\n };\n this.updateAll();\n }\n\n public render() {\n const {appId} = this.state;\n const {messagesStore, appStore} = this.props;\n const messages = messagesStore.get(appId);\n const hasMore = messagesStore.canLoadMore(appId);\n const name = appStore.getName(appId);\n const hasMessages = messages.length !== 0;\n\n return (\n \n messagesStore.refreshByApp(appId)}\n style={{marginRight: 5}}\n >\n Refresh\n \n messagesStore.removeByApp(appId)}\n >\n Delete All\n \n
\n }\n >\n {hasMessages ? (\n
\n this.heights[m.id] || 1)}\n >\n {messages.map(this.renderMessage)}\n \n\n {hasMore ? (\n \n \n \n ) : (\n this.label(\"You've reached the end\")\n )}\n
\n ) : (\n this.label('No messages')\n )}\n \n );\n }\n\n private updateAllWithProps = (props: IProps & Stores<'messagesStore'>) => {\n const appId = Messages.appId(props);\n this.setState({appId});\n if (!props.messagesStore.exists(appId)) {\n props.messagesStore.loadMore(appId);\n }\n };\n\n private updateAll = () => this.updateAllWithProps(this.props);\n\n private deleteMessage = (message: IMessage) => () =>\n this.props.messagesStore.removeSingle(message);\n\n private renderMessage = (message: IMessage) => (\n {\n if (!this.heights[message.id]) {\n this.heights[message.id] = height;\n }\n }}\n fDelete={this.deleteMessage(message)}\n title={message.title}\n date={message.date}\n content={message.message}\n image={message.image}\n extras={message.extras}\n />\n );\n\n private checkIfLoadMore() {\n const {appId} = this.state;\n if (!this.isLoadingMore && this.props.messagesStore.canLoadMore(appId)) {\n this.isLoadingMore = true;\n this.props.messagesStore.loadMore(appId).then(() => (this.isLoadingMore = false));\n }\n }\n\n private label = (text: string) => (\n \n \n {text}\n \n \n );\n}\n\nexport default inject('messagesStore', 'appStore')(Messages);\n","import Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Switch from '@material-ui/core/Switch';\nimport TextField from '@material-ui/core/TextField';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport React, {ChangeEvent, Component} from 'react';\n\ninterface IProps {\n name?: string;\n admin?: boolean;\n fClose: VoidFunction;\n fOnSubmit: (name: string, pass: string, admin: boolean) => void;\n isEdit?: boolean;\n}\n\ninterface IState {\n name: string;\n pass: string;\n admin: boolean;\n}\n\nexport default class AddEditDialog extends Component {\n public state = {\n name: this.props.name ?? '',\n pass: '',\n admin: this.props.admin ?? false,\n };\n\n public render() {\n const {fClose, fOnSubmit, isEdit} = this.props;\n const {name, pass, admin} = this.state;\n const namePresent = this.state.name.length !== 0;\n const passPresent = this.state.pass.length !== 0 || isEdit;\n const submitAndClose = () => {\n fOnSubmit(name, pass, admin);\n fClose();\n };\n return (\n \n \n {isEdit ? 'Edit ' + this.props.name : 'Add a user'}\n \n \n \n \n \n }\n label=\"has administrator rights\"\n />\n \n \n \n \n
\n \n {isEdit ? 'Save' : 'Create'}\n \n
\n \n
\n \n );\n }\n\n private handleChange(propertyName: string, event: ChangeEvent) {\n const state = this.state;\n state[propertyName] = event.target.value;\n this.setState(state);\n }\n\n private handleChecked(propertyName: string, event: ChangeEvent) {\n const state = this.state;\n state[propertyName] = event.target.checked;\n this.setState(state);\n }\n}\n","import Grid from '@material-ui/core/Grid';\nimport IconButton from '@material-ui/core/IconButton';\nimport Paper from '@material-ui/core/Paper';\nimport {withStyles, WithStyles} from '@material-ui/core/styles';\nimport Table from '@material-ui/core/Table';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableCell from '@material-ui/core/TableCell';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableRow from '@material-ui/core/TableRow';\nimport Delete from '@material-ui/icons/Delete';\nimport Edit from '@material-ui/icons/Edit';\nimport React, {Component, SFC} from 'react';\nimport ConfirmDialog from '../common/ConfirmDialog';\nimport DefaultPage from '../common/DefaultPage';\nimport Button from '@material-ui/core/Button';\nimport AddEditDialog from './AddEditUserDialog';\nimport {observer} from 'mobx-react';\nimport {observable} from 'mobx';\nimport {inject, Stores} from '../inject';\nimport {IUser} from '../types';\n\nconst styles = () => ({\n wrapper: {\n margin: '0 auto',\n maxWidth: 700,\n },\n});\n\ninterface IRowProps {\n name: string;\n admin: boolean;\n fDelete: VoidFunction;\n fEdit: VoidFunction;\n}\n\nconst UserRow: SFC = ({name, admin, fDelete, fEdit}) => (\n \n {name}\n {admin ? 'Yes' : 'No'}\n \n \n \n \n \n \n \n \n \n);\n\n@observer\nclass Users extends Component & Stores<'userStore'>> {\n @observable\n private createDialog = false;\n @observable\n private deleteId: number | false = false;\n @observable\n private editId: number | false = false;\n\n public componentDidMount = () => this.props.userStore.refresh();\n\n public render() {\n const {\n deleteId,\n editId,\n createDialog,\n props: {userStore},\n } = this;\n const users = userStore.getItems();\n return (\n (this.createDialog = true)}\n >\n Create User\n \n }\n >\n \n \n \n \n \n Name\n Admin\n \n \n \n \n {users.map((user: IUser) => (\n (this.deleteId = user.id)}\n fEdit={() => (this.editId = user.id)}\n />\n ))}\n \n
\n
\n
\n {createDialog && (\n (this.createDialog = false)}\n fOnSubmit={userStore.create}\n />\n )}\n {editId !== false && (\n (this.editId = false)}\n fOnSubmit={userStore.update.bind(this, editId)}\n name={userStore.getByID(editId).name}\n admin={userStore.getByID(editId).admin}\n isEdit={true}\n />\n )}\n {deleteId !== false && (\n (this.deleteId = false)}\n fOnSubmit={() => userStore.remove(deleteId)}\n />\n )}\n \n );\n }\n}\n\nexport default withStyles(styles)(inject('userStore')(Users));\n","import React from 'react';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\n\ninterface ConnectionErrorBannerProps {\n height: number;\n retry: () => void;\n message: string;\n}\n\nexport const ConnectionErrorBanner = ({height, retry, message}: ConnectionErrorBannerProps) => (\n \n \n {message}{' '}\n \n \n \n);\n","import {createMuiTheme, MuiThemeProvider, Theme, WithStyles, withStyles} from '@material-ui/core';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport * as React from 'react';\nimport {HashRouter, Redirect, Route, Switch} from 'react-router-dom';\nimport Header from './Header';\nimport LoadingSpinner from '../common/LoadingSpinner';\nimport Navigation from './Navigation';\nimport ScrollUpButton from '../common/ScrollUpButton';\nimport SettingsDialog from '../common/SettingsDialog';\nimport SnackBarHandler from '../snack/SnackBarHandler';\nimport * as config from '../config';\nimport Applications from '../application/Applications';\nimport Clients from '../client/Clients';\nimport Plugins from '../plugin/Plugins';\nimport PluginDetailView from '../plugin/PluginDetailView';\nimport Login from '../user/Login';\nimport Messages from '../message/Messages';\nimport Users from '../user/Users';\nimport {observer} from 'mobx-react';\nimport {observable} from 'mobx';\nimport {inject, Stores} from '../inject';\nimport {ConnectionErrorBanner} from '../common/ConnectionErrorBanner';\n\nconst styles = (theme: Theme) => ({\n content: {\n margin: '0 auto',\n marginTop: 64,\n padding: theme.spacing(4),\n width: '100%',\n [theme.breakpoints.down('xs')]: {\n marginTop: 0,\n },\n },\n});\n\nconst localStorageThemeKey = 'gotify-theme';\ntype ThemeKey = 'dark' | 'light';\nconst themeMap: Record = {\n light: createMuiTheme({\n palette: {\n type: 'light',\n },\n }),\n dark: createMuiTheme({\n palette: {\n type: 'dark',\n },\n }),\n};\n\nconst isThemeKey = (value: string | null): value is ThemeKey =>\n value === 'light' || value === 'dark';\n\n@observer\nclass Layout extends React.Component<\n WithStyles<'content'> & Stores<'currentUser' | 'snackManager'>\n> {\n @observable\n private currentTheme: ThemeKey = 'dark';\n @observable\n private showSettings = false;\n @observable\n private navOpen = false;\n\n private setNavOpen(open: boolean) {\n this.navOpen = open;\n }\n\n public componentDidMount() {\n const localStorageTheme = window.localStorage.getItem(localStorageThemeKey);\n if (isThemeKey(localStorageTheme)) {\n this.currentTheme = localStorageTheme;\n } else {\n window.localStorage.setItem(localStorageThemeKey, this.currentTheme);\n }\n }\n\n public render() {\n const {showSettings, currentTheme} = this;\n const {\n classes,\n currentUser: {\n loggedIn,\n authenticating,\n user: {name, admin},\n logout,\n tryReconnect,\n connectionErrorMessage,\n },\n } = this.props;\n const theme = themeMap[currentTheme];\n const loginRoute = () => (loggedIn ? : );\n const {version} = config.get('version');\n return (\n \n \n
\n {!connectionErrorMessage ? null : (\n tryReconnect()}\n message={connectionErrorMessage}\n />\n )}\n
\n \n (this.showSettings = true)}\n logout={logout}\n setNavOpen={this.setNavOpen.bind(this)}\n />\n
\n \n
\n \n {authenticating ? (\n \n \n \n ) : null}\n \n {loggedIn ? null : }\n \n \n \n \n \n \n \n \n
\n
\n {showSettings && (\n (this.showSettings = false)} />\n )}\n \n \n
\n
\n
\n
\n );\n }\n\n private toggleTheme() {\n this.currentTheme = this.currentTheme === 'dark' ? 'light' : 'dark';\n localStorage.setItem(localStorageThemeKey, this.currentTheme);\n }\n}\n\nexport default withStyles(styles, {withTheme: true})(inject('currentUser', 'snackManager')(Layout));\n","import axios, {AxiosError, AxiosResponse} from 'axios';\nimport * as config from './config';\nimport {Base64} from 'js-base64';\nimport {detect} from 'detect-browser';\nimport {SnackReporter} from './snack/SnackManager';\nimport {observable} from 'mobx';\nimport {IClient, IUser} from './types';\n\nconst tokenKey = 'gotify-login-key';\n\nexport class CurrentUser {\n private tokenCache: string | null = null;\n private reconnectTimeoutId: number | null = null;\n private reconnectTime = 7500;\n @observable\n public loggedIn = false;\n @observable\n public authenticating = false;\n @observable\n public user: IUser = {name: 'unknown', admin: false, id: -1};\n @observable\n public connectionErrorMessage: string | null = null;\n\n public constructor(private readonly snack: SnackReporter) {}\n\n public token = (): string => {\n if (this.tokenCache !== null) {\n return this.tokenCache;\n }\n\n const localStorageToken = window.localStorage.getItem(tokenKey);\n if (localStorageToken) {\n this.tokenCache = localStorageToken;\n return localStorageToken;\n }\n\n return '';\n };\n\n private readonly setToken = (token: string) => {\n this.tokenCache = token;\n window.localStorage.setItem(tokenKey, token);\n };\n\n public register = async (name: string, pass: string): Promise =>\n axios\n .create()\n .post(config.get('url') + 'user', {name, pass})\n .then(() => {\n this.snack('User Created. Logging in...');\n this.login(name, pass);\n return true;\n })\n .catch((error: AxiosError) => {\n if (!error || !error.response) {\n this.snack('No network connection or server unavailable.');\n return false;\n }\n const {data} = error.response;\n this.snack(\n `Register failed: ${data?.error ?? 'unknown'}: ${data?.errorDescription ?? ''}`\n );\n return false;\n });\n\n public login = async (username: string, password: string) => {\n this.loggedIn = false;\n this.authenticating = true;\n const browser = detect();\n const name = (browser && browser.name + ' ' + browser.version) || 'unknown browser';\n axios\n .create()\n .request({\n url: config.get('url') + 'client',\n method: 'POST',\n data: {name},\n // eslint-disable-next-line @typescript-eslint/naming-convention\n headers: {Authorization: 'Basic ' + Base64.encode(username + ':' + password)},\n })\n .then((resp: AxiosResponse) => {\n this.snack(`A client named '${name}' was created for your session.`);\n this.setToken(resp.data.token);\n this.tryAuthenticate()\n .then(() => {\n this.authenticating = false;\n this.loggedIn = true;\n })\n .catch(() => {\n this.authenticating = false;\n console.log(\n 'create client succeeded, but authenticated with given token failed'\n );\n });\n })\n .catch(() => {\n this.authenticating = false;\n return this.snack('Login failed');\n });\n };\n\n public tryAuthenticate = async (): Promise> => {\n if (this.token() === '') {\n return Promise.reject();\n }\n\n return (\n axios\n .create()\n // eslint-disable-next-line @typescript-eslint/naming-convention\n .get(config.get('url') + 'current/user', {headers: {'X-Gotify-Key': this.token()}})\n .then((passThrough) => {\n this.user = passThrough.data;\n this.loggedIn = true;\n this.connectionErrorMessage = null;\n this.reconnectTime = 7500;\n return passThrough;\n })\n .catch((error: AxiosError) => {\n if (!error || !error.response) {\n this.connectionError('No network connection or server unavailable.');\n return Promise.reject(error);\n }\n\n if (error.response.status >= 500) {\n this.connectionError(\n `${error.response.statusText} (code: ${error.response.status}).`\n );\n return Promise.reject(error);\n }\n\n this.connectionErrorMessage = null;\n\n if (error.response.status >= 400 && error.response.status < 500) {\n this.logout();\n }\n return Promise.reject(error);\n })\n );\n };\n\n public logout = async () => {\n await axios\n .get(config.get('url') + 'client')\n .then((resp: AxiosResponse) => {\n resp.data\n .filter((client) => client.token === this.tokenCache)\n .forEach((client) => axios.delete(config.get('url') + 'client/' + client.id));\n })\n .catch(() => Promise.resolve());\n window.localStorage.removeItem(tokenKey);\n this.tokenCache = null;\n this.loggedIn = false;\n };\n\n public changePassword = (pass: string) => {\n axios\n .post(config.get('url') + 'current/user/password', {pass})\n .then(() => this.snack('Password changed'));\n };\n\n public tryReconnect = (quiet = false) => {\n this.tryAuthenticate().catch(() => {\n if (!quiet) {\n this.snack('Reconnect failed');\n }\n });\n };\n\n private readonly connectionError = (message: string) => {\n this.connectionErrorMessage = message;\n if (this.reconnectTimeoutId !== null) {\n window.clearTimeout(this.reconnectTimeoutId);\n }\n this.reconnectTimeoutId = window.setTimeout(\n () => this.tryReconnect(true),\n this.reconnectTime\n );\n this.reconnectTime = Math.min(this.reconnectTime * 2, 120000);\n };\n}\n","import {action, observable} from 'mobx';\n\ninterface HasID {\n id: number;\n}\n\nexport interface IClearable {\n clear(): void;\n}\n\n/**\n * Base implementation for handling items with ids.\n */\nexport abstract class BaseStore implements IClearable {\n @observable\n protected items: T[] = [];\n\n protected abstract requestItems(): Promise;\n\n protected abstract requestDelete(id: number): Promise;\n\n @action\n public remove = async (id: number): Promise => {\n await this.requestDelete(id);\n await this.refresh();\n };\n\n @action\n public refresh = async (): Promise => {\n this.items = await this.requestItems().then((items) => items || []);\n };\n\n public getByID = (id: number): T => {\n const item = this.getByIDOrUndefined(id);\n if (item === undefined) {\n throw new Error('cannot find item with id ' + id);\n }\n return item;\n };\n\n public getByIDOrUndefined = (id: number): T | undefined =>\n this.items.find((hasId: HasID) => hasId.id === id);\n\n public getItems = (): T[] => this.items;\n\n @action\n public clear = (): void => {\n this.items = [];\n };\n}\n","import {BaseStore} from '../common/BaseStore';\nimport axios from 'axios';\nimport * as config from '../config';\nimport {action} from 'mobx';\nimport {SnackReporter} from '../snack/SnackManager';\nimport {IApplication} from '../types';\n\nexport class AppStore extends BaseStore {\n public onDelete: () => void = () => {};\n\n public constructor(private readonly snack: SnackReporter) {\n super();\n }\n\n protected requestItems = (): Promise =>\n axios\n .get(`${config.get('url')}application`)\n .then((response) => response.data);\n\n protected requestDelete = (id: number): Promise =>\n axios.delete(`${config.get('url')}application/${id}`).then(() => {\n this.onDelete();\n return this.snack('Application deleted');\n });\n\n @action\n public uploadImage = async (id: number, file: Blob): Promise => {\n const formData = new FormData();\n formData.append('file', file);\n await axios.post(`${config.get('url')}application/${id}/image`, formData, {\n headers: {'content-type': 'multipart/form-data'},\n });\n await this.refresh();\n this.snack('Application image updated');\n };\n\n @action\n public update = async (id: number, name: string, description: string): Promise => {\n await axios.put(`${config.get('url')}application/${id}`, {name, description});\n await this.refresh();\n this.snack('Application updated');\n };\n\n @action\n public create = async (name: string, description: string): Promise => {\n await axios.post(`${config.get('url')}application`, {name, description});\n await this.refresh();\n this.snack('Application created');\n };\n\n public getName = (id: number): string => {\n const app = this.getByIDOrUndefined(id);\n return id === -1 ? 'All Messages' : app !== undefined ? app.name : 'unknown';\n };\n}\n","import {SnackReporter} from '../snack/SnackManager';\nimport {CurrentUser} from '../CurrentUser';\nimport * as config from '../config';\nimport {AxiosError} from 'axios';\nimport {IMessage} from '../types';\n\nexport class WebSocketStore {\n private wsActive = false;\n private ws: WebSocket | null = null;\n\n public constructor(\n private readonly snack: SnackReporter,\n private readonly currentUser: CurrentUser\n ) {}\n\n public listen = (callback: (msg: IMessage) => void) => {\n if (!this.currentUser.token() || this.wsActive) {\n return;\n }\n this.wsActive = true;\n\n const wsUrl = config.get('url').replace('http', 'ws').replace('https', 'wss');\n const ws = new WebSocket(wsUrl + 'stream?token=' + this.currentUser.token());\n\n ws.onerror = (e) => {\n this.wsActive = false;\n console.log('WebSocket connection errored', e);\n };\n\n ws.onmessage = (data) => callback(JSON.parse(data.data));\n\n ws.onclose = () => {\n this.wsActive = false;\n this.currentUser\n .tryAuthenticate()\n .then(() => {\n this.snack('WebSocket connection closed, trying again in 30 seconds.');\n setTimeout(() => this.listen(callback), 30000);\n })\n .catch((error: AxiosError) => {\n if (error?.response?.status === 401) {\n this.snack('Could not authenticate with client token, logging out.');\n }\n });\n };\n\n this.ws = ws;\n };\n\n public close = () => this.ws?.close(1000, 'WebSocketStore#close');\n}\n","import {action, observable} from 'mobx';\n\nexport interface SnackReporter {\n (message: string): void;\n}\n\nexport class SnackManager {\n @observable\n private messages: string[] = [];\n @observable\n public message: string | null = null;\n @observable\n public counter = 0;\n\n @action\n public next = (): void => {\n if (!this.hasNext()) {\n throw new Error('There is nothing here :(');\n }\n this.message = this.messages.shift() as string;\n };\n\n public hasNext = () => this.messages.length > 0;\n\n @action\n public snack: SnackReporter = (message: string): void => {\n this.messages.push(message);\n this.counter++;\n };\n}\n","import {BaseStore} from '../common/BaseStore';\nimport axios from 'axios';\nimport * as config from '../config';\nimport {action} from 'mobx';\nimport {SnackReporter} from '../snack/SnackManager';\nimport {IUser} from '../types';\n\nexport class UserStore extends BaseStore {\n constructor(private readonly snack: SnackReporter) {\n super();\n }\n\n protected requestItems = (): Promise =>\n axios.get(`${config.get('url')}user`).then((response) => response.data);\n\n protected requestDelete(id: number): Promise {\n return axios\n .delete(`${config.get('url')}user/${id}`)\n .then(() => this.snack('User deleted'));\n }\n\n @action\n public create = async (name: string, pass: string, admin: boolean) => {\n await axios.post(`${config.get('url')}user`, {name, pass, admin});\n await this.refresh();\n this.snack('User created');\n };\n\n @action\n public update = async (id: number, name: string, pass: string | null, admin: boolean) => {\n await axios.post(config.get('url') + 'user/' + id, {name, pass, admin});\n await this.refresh();\n this.snack('User updated');\n };\n}\n","import {BaseStore} from '../common/BaseStore';\nimport {action, IObservableArray, observable, reaction} from 'mobx';\nimport axios, {AxiosResponse} from 'axios';\nimport * as config from '../config';\nimport {createTransformer} from 'mobx-utils';\nimport {SnackReporter} from '../snack/SnackManager';\nimport {IApplication, IMessage, IPagedMessages} from '../types';\n\nconst AllMessages = -1;\n\ninterface MessagesState {\n messages: IObservableArray;\n hasMore: boolean;\n nextSince: number;\n loaded: boolean;\n}\n\nexport class MessagesStore {\n @observable\n private state: Record = {};\n\n private loading = false;\n\n public constructor(\n private readonly appStore: BaseStore,\n private readonly snack: SnackReporter\n ) {\n reaction(() => appStore.getItems(), this.createEmptyStatesForApps);\n }\n\n private stateOf = (appId: number, create = true) => {\n if (!this.state[appId] && create) {\n this.state[appId] = this.emptyState();\n }\n return this.state[appId] || this.emptyState();\n };\n\n public canLoadMore = (appId: number) => this.stateOf(appId, /*create*/ false).hasMore;\n\n @action\n public loadMore = async (appId: number) => {\n const state = this.stateOf(appId);\n if (!state.hasMore || this.loading) {\n return Promise.resolve();\n }\n this.loading = true;\n\n const pagedResult = await this.fetchMessages(appId, state.nextSince).then(\n (resp) => resp.data\n );\n\n state.messages.replace([...state.messages, ...pagedResult.messages]);\n state.nextSince = pagedResult.paging.since ?? 0;\n state.hasMore = 'next' in pagedResult.paging;\n state.loaded = true;\n this.loading = false;\n return Promise.resolve();\n };\n\n @action\n public publishSingleMessage = (message: IMessage) => {\n if (this.exists(AllMessages)) {\n this.stateOf(AllMessages).messages.unshift(message);\n }\n if (this.exists(message.appid)) {\n this.stateOf(message.appid).messages.unshift(message);\n }\n };\n\n @action\n public removeByApp = async (appId: number) => {\n if (appId === AllMessages) {\n await axios.delete(config.get('url') + 'message');\n this.snack('Deleted all messages');\n this.clearAll();\n } else {\n await axios.delete(config.get('url') + 'application/' + appId + '/message');\n this.snack(`Deleted all messages from ${this.appStore.getByID(appId).name}`);\n this.clear(AllMessages);\n this.clear(appId);\n }\n await this.loadMore(appId);\n };\n\n @action\n public removeSingle = async (message: IMessage) => {\n await axios.delete(config.get('url') + 'message/' + message.id);\n if (this.exists(AllMessages)) {\n this.removeFromList(this.state[AllMessages].messages, message);\n }\n if (this.exists(message.appid)) {\n this.removeFromList(this.state[message.appid].messages, message);\n }\n this.snack('Message deleted');\n };\n\n @action\n public clearAll = () => {\n this.state = {};\n this.createEmptyStatesForApps(this.appStore.getItems());\n };\n\n @action\n public refreshByApp = async (appId: number) => {\n this.clearAll();\n this.loadMore(appId);\n };\n\n public exists = (id: number) => this.stateOf(id).loaded;\n\n private removeFromList(messages: IMessage[], messageToDelete: IMessage): false | number {\n if (messages) {\n const index = messages.findIndex((message) => message.id === messageToDelete.id);\n if (index !== -1) {\n messages.splice(index, 1);\n return index;\n }\n }\n return false;\n }\n\n private clear = (appId: number) => (this.state[appId] = this.emptyState());\n\n private fetchMessages = (\n appId: number,\n since: number\n ): Promise> => {\n if (appId === AllMessages) {\n return axios.get(config.get('url') + 'message?since=' + since);\n } else {\n return axios.get(\n config.get('url') + 'application/' + appId + '/message?since=' + since\n );\n }\n };\n\n private getUnCached = (appId: number): Array => {\n const appToImage = this.appStore\n .getItems()\n .reduce((all, app) => ({...all, [app.id]: app.image}), {});\n\n return this.stateOf(appId, false).messages.map((message: IMessage) => ({\n ...message,\n image: appToImage[message.appid] || null,\n }));\n };\n\n public get = createTransformer(this.getUnCached);\n\n private clearCache = () => (this.get = createTransformer(this.getUnCached));\n\n private createEmptyStatesForApps = (apps: IApplication[]) => {\n apps.map((app) => app.id).forEach((id) => this.stateOf(id, /*create*/ true));\n this.clearCache();\n };\n\n private emptyState = (): MessagesState => ({\n messages: observable.array(),\n hasMore: true,\n nextSince: 0,\n loaded: false,\n });\n}\n","import {BaseStore} from '../common/BaseStore';\nimport axios from 'axios';\nimport * as config from '../config';\nimport {action} from 'mobx';\nimport {SnackReporter} from '../snack/SnackManager';\nimport {IClient} from '../types';\n\nexport class ClientStore extends BaseStore {\n public constructor(private readonly snack: SnackReporter) {\n super();\n }\n\n protected requestItems = (): Promise =>\n axios.get(`${config.get('url')}client`).then((response) => response.data);\n\n protected requestDelete(id: number): Promise {\n return axios\n .delete(`${config.get('url')}client/${id}`)\n .then(() => this.snack('Client deleted'));\n }\n\n @action\n public update = async (id: number, name: string): Promise => {\n await axios.put(`${config.get('url')}client/${id}`, {name});\n await this.refresh();\n this.snack('Client updated');\n };\n\n @action\n public createNoNotifcation = async (name: string): Promise => {\n const client = await axios.post(`${config.get('url')}client`, {name});\n await this.refresh();\n return client.data;\n };\n\n @action\n public create = async (name: string): Promise => {\n await this.createNoNotifcation(name);\n this.snack('Client added');\n };\n}\n","import axios from 'axios';\nimport {action} from 'mobx';\nimport {BaseStore} from '../common/BaseStore';\nimport * as config from '../config';\nimport {SnackReporter} from '../snack/SnackManager';\nimport {IPlugin} from '../types';\n\nexport class PluginStore extends BaseStore {\n public onDelete: () => void = () => {};\n\n public constructor(private readonly snack: SnackReporter) {\n super();\n }\n\n public requestConfig = (id: number): Promise =>\n axios.get(`${config.get('url')}plugin/${id}/config`).then((response) => response.data);\n\n public requestDisplay = (id: number): Promise =>\n axios.get(`${config.get('url')}plugin/${id}/display`).then((response) => response.data);\n\n protected requestItems = (): Promise =>\n axios.get(`${config.get('url')}plugin`).then((response) => response.data);\n\n protected requestDelete = (): Promise => {\n this.snack('Cannot delete plugin');\n throw new Error('Cannot delete plugin');\n };\n\n public getName = (id: number): string => {\n const plugin = this.getByIDOrUndefined(id);\n return id === -1 ? 'All Plugins' : plugin !== undefined ? plugin.name : 'unknown';\n };\n\n @action\n public changeConfig = async (id: number, newConfig: string): Promise => {\n await axios.post(`${config.get('url')}plugin/${id}/config`, newConfig, {\n headers: {'content-type': 'application/x-yaml'},\n });\n this.snack(`Plugin config updated`);\n await this.refresh();\n };\n\n @action\n public changeEnabledState = async (id: number, enabled: boolean): Promise => {\n await axios.post(`${config.get('url')}plugin/${id}/${enabled ? 'enable' : 'disable'}`);\n this.snack(`Plugin ${enabled ? 'enabled' : 'disabled'}`);\n await this.refresh();\n };\n}\n","import {StoreMapping} from './inject';\nimport {reaction} from 'mobx';\nimport * as Notifications from './snack/browserNotification';\n\nexport const registerReactions = (stores: StoreMapping) => {\n const clearAll = () => {\n stores.messagesStore.clearAll();\n stores.appStore.clear();\n stores.clientStore.clear();\n stores.userStore.clear();\n stores.wsStore.close();\n };\n const loadAll = () => {\n stores.wsStore.listen((message) => {\n stores.messagesStore.publishSingleMessage(message);\n Notifications.notifyNewMessage(message);\n if (message.priority >= 4) {\n const src = 'static/notification.ogg';\n const audio = new Audio(src);\n audio.play();\n }\n });\n stores.appStore.refresh();\n };\n\n reaction(\n () => stores.currentUser.loggedIn,\n (loggedIn) => {\n if (loggedIn) {\n loadAll();\n } else {\n clearAll();\n }\n }\n );\n\n reaction(\n () => stores.currentUser.connectionErrorMessage,\n (connectionErrorMessage) => {\n if (!connectionErrorMessage) {\n clearAll();\n loadAll();\n }\n }\n );\n};\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport 'typeface-roboto';\nimport {initAxios} from './apiAuth';\nimport * as config from './config';\nimport Layout from './layout/Layout';\nimport {unregister} from './registerServiceWorker';\nimport {CurrentUser} from './CurrentUser';\nimport {AppStore} from './application/AppStore';\nimport {WebSocketStore} from './message/WebSocketStore';\nimport {SnackManager} from './snack/SnackManager';\nimport {InjectProvider, StoreMapping} from './inject';\nimport {UserStore} from './user/UserStore';\nimport {MessagesStore} from './message/MessagesStore';\nimport {ClientStore} from './client/ClientStore';\nimport {PluginStore} from './plugin/PluginStore';\nimport {registerReactions} from './reactions';\n\nconst devUrl = 'http://localhost:3000/';\n\nconst {port, hostname, protocol, pathname} = window.location;\nconst slashes = protocol.concat('//');\nconst path = pathname.endsWith('/') ? pathname : pathname.substring(0, pathname.lastIndexOf('/'));\nconst url = slashes.concat(port ? hostname.concat(':', port) : hostname) + path;\nconst urlWithSlash = url.endsWith('/') ? url : url.concat('/');\n\nconst prodUrl = urlWithSlash;\n\nconst initStores = (): StoreMapping => {\n const snackManager = new SnackManager();\n const appStore = new AppStore(snackManager.snack);\n const userStore = new UserStore(snackManager.snack);\n const messagesStore = new MessagesStore(appStore, snackManager.snack);\n const currentUser = new CurrentUser(snackManager.snack);\n const clientStore = new ClientStore(snackManager.snack);\n const wsStore = new WebSocketStore(snackManager.snack, currentUser);\n const pluginStore = new PluginStore(snackManager.snack);\n appStore.onDelete = () => messagesStore.clearAll();\n\n return {\n appStore,\n snackManager,\n userStore,\n messagesStore,\n currentUser,\n clientStore,\n wsStore,\n pluginStore,\n };\n};\n\n(function clientJS() {\n if (process.env.NODE_ENV === 'production') {\n config.set('url', prodUrl);\n } else {\n config.set('url', devUrl);\n config.set('register', true);\n }\n const stores = initStores();\n initAxios(stores.currentUser, stores.snackManager.snack);\n\n registerReactions(stores);\n\n stores.currentUser.tryAuthenticate().catch(() => {});\n\n window.onbeforeunload = () => {\n stores.wsStore.close();\n };\n\n ReactDOM.render(\n \n \n ,\n document.getElementById('root')\n );\n unregister();\n})();\n","import axios from 'axios';\nimport {CurrentUser} from './CurrentUser';\nimport {SnackReporter} from './snack/SnackManager';\n\nexport const initAxios = (currentUser: CurrentUser, snack: SnackReporter) => {\n axios.interceptors.request.use((config) => {\n config.headers['X-Gotify-Key'] = currentUser.token();\n return config;\n });\n\n axios.interceptors.response.use(undefined, (error) => {\n if (!error.response) {\n snack('Gotify server is not reachable, try refreshing the page.');\n return Promise.reject(error);\n }\n\n const status = error.response.status;\n\n if (status === 401) {\n currentUser.tryAuthenticate().then(() => snack('Could not complete request.'));\n }\n\n if (status === 400 || status === 403 || status === 500) {\n snack(error.response.data.error + ': ' + error.response.data.errorDescription);\n }\n\n return Promise.reject(error);\n });\n};\n","export function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister();\n });\n }\n}\n"],"sourceRoot":""}