{"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","aria-labelledby","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","aria-label","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","data-enabled","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,+XCqDZC,GADLC,Y,8JAEG,WAAiB,IAAD,EAYRC,KAAKC,MAVLC,EAFQ,EAERA,QACAV,EAHQ,EAGRA,QACAW,EAJQ,EAIRA,KACAC,EALQ,EAKRA,SACAC,EANQ,EAMRA,MACAC,EAPQ,EAORA,YACAC,EARQ,EAQRA,OACAC,EATQ,EASRA,MACAC,EAVQ,EAURA,WACAC,EAXQ,EAWRA,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,SAGI,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,SAKI,eAACH,EAAA,EAAD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,IAAIuR,GAAYlQ,EAAamQ,OAC3C9K,EAAc,IAAIyQ,GAAY9V,EAAamQ,OAC3C+F,EAAU,IAAI/C,GAAenT,EAAamQ,MAAOxR,GACjD+G,EAAc,IAAIsQ,GAAYhW,EAAamQ,OAGjD,OAFAxU,EAASmX,SAAW,kBAAM3G,EAAcyJ,YAEjC,CACHja,WACAqE,eACAqO,YACAlC,gBACAxN,cACA0G,cACA6Q,UACAxQ,eAWW8R,GCtDO7Y,EDuDZrE,EAAOqE,YCvD+BwR,EDuDlB7V,EAAO0F,aAAamQ,MCtDlDM,IAAMgH,aAAaxG,QAAQyG,KAAI,SAAC7iB,GAE5B,OADAA,EAAOsc,QAAQ,gBAAkBxS,EAAYyF,QACtCvP,KAGX4b,IAAMgH,aAAapQ,SAASqQ,SAAI7J,GAAW,SAAC+C,GACxC,IAAKA,EAAMvJ,SAEP,OADA8I,EAAM,4DACCpJ,QAAQ0K,OAAOb,GAG1B,IAAMe,EAASf,EAAMvJ,SAASsK,OAU9B,OARe,MAAXA,GACAhT,EAAY6S,kBAAkB3I,MAAK,kBAAMsH,EAAM,kCAGpC,MAAXwB,GAA6B,MAAXA,GAA6B,MAAXA,GACpCxB,EAAMS,EAAMvJ,SAASwJ,KAAKD,MAAQ,KAAOA,EAAMvJ,SAASwJ,KAAKC,kBAG1D/J,QAAQ0K,OAAOb,MDmC1BqF,GAAkB3b,GAElBA,EAAOqE,YAAY6S,kBAAkBb,OAAM,eAE3Cxb,OAAOwiB,eAAiB,WACpBrd,EAAO4b,QAAQ7a,SAGnBuc,SACI,eAAC,GAAD,CAAgBtd,OAAQA,EAAxB,SACI,eAAC,GAAD,MAEJwS,SAAS+K,eAAe,SExExB,kBAAmBC,WACnBA,UAAUC,cAAcC,MAAMnP,MAAK,SAACoP,GAChCA,EAAaC,gBFgDzB,K","file":"static/js/main.25f7cb29.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 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 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 Create Application\n \n }\n maxWidth={1000}>\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 Create Client\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 ) : 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 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 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 Refresh\n \n messagesStore.removeByApp(appId)}>\n Delete All\n \n
\n }>\n {hasMessages ? (\n
\n this.heights[m.id] || 1)}>\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 Create User\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":""}