{"version":3,"sources":["dashboard.js"],"names":["const","lsKeys","token","viewType","uploads","uploadsAll","selected","users","page","dom","localStorage","username","permissions","menusContainer","menus","currentView","views","type","album","pageNum","filters","all","checkboxes","lastSelected","upload","user","selectAlbumContainer","cache","albums","clipboardJS","lazyLoad","imageExts","videoExts","isTriggerLoading","fadingIn","albumTitleMaxLength","albumDescMaxLength","unhide","document","querySelector","classList","add","remove","onError","error","console","content","createElement","innerHTML","toString","swal","title","icon","onAxiosError","statusText","520","521","522","523","524","525","526","527","530","response","status","description","data","preparePage","verifyToken","window","location","reloadOnError","axios","post","then","success","text","removeItem","defaults","headers","common","prepareDashboard","catch","addEventListener","domClick","event","target","contains","preventDefault","itemMenus","selector","onclick","getUploads","deleteUploadsByNames","getAlbums","changeToken","changePassword","logout","params","group","getStatistics","getUsers","loop","i","item","call","Object","assign","trigger","currentTarget","push","length","moderator","getAlbumsSidebar","prepareShareX","updateTrigger","newState","parentNode","tagName","let","getItemID","element","parent","parseInt","dataset","id","includes","action","hasAttribute","stopPropagation","setUploadsView","clearSelection","addSelectedUploadsToAlbum","select","selectAll","addToAlbum","deleteUpload","bulkDeleteUploads","displayPreview","submitAlbum","editAlbum","deleteAlbum","getNewToken","createUser","editUser","disableUser","deleteUser","userFiltersHelp","filterUploads","viewUserUploads","focusJumpToPage","switchPage","fadeAndScroll","disableFading","clearTimeout","setTimeout","scrollIntoView","behavior","block","inline","func","goto","jumpToPage","checkValidity","parsed","value","isNaN","focus","undefined","url","get","pages","Math","ceil","count","files","autoPage","basedomain","pagination","paginate","filter","extraControls","controls","unselected","hasExpiryDateColumn","some","file","expirydate","thumb","exec","extname","toLowerCase","name","original","prettyBytes","getPrettyBytes","size","prettyDate","getPrettyDate","Date","timestamp","prettyExpiryDate","appendix","userid","albumid","table","div","className","appendChild","querySelectorAll","tr","ip","checked","update","view","isimage","isvideo","src","onload","body","onerror","video","autoplay","insertAdjacentElement","buttons","splice","indexOf","JSON","stringify","selectInBetween","lastElement","thisIndex","index","lastIndex","abs","shiftKey","suffix","substring","proceed","style","trim","replace","postBulkDeleteUploads","field","values","cb","failed","textArea","seen","names","split","map","trimmed","test","prototype","hasOwnProperty","join","objective","dangerMode","cancel","confirm","closeModal","fields","Array","isArray","timer","addUploadsToAlbum","ids","callback","choose","added","list","getElementsByTagName","removeAttribute","homeDomain","albumUrl","download","public","requestLink","identifier","purge","albumsContainer","oldAlbums","li","a","sendNewPassword","pass","password","admin","displayGroup","groups","keys","enabled","usage","groupOptions","g","resetPassword","totalItems","itemsPerPage","currentPage","numPages","template","start","end","elementsToShow","step","stats","rows","types","_types","valKeys","j","number","toLocaleString","byte","byteUsage","used","total","round","toUpperCase","defineProperty","varArgs","arguments$1","arguments","TypeError","to","nextSource","nextKey","writable","configurable","documentElement","selectedKeys","ls","parse","ClipboardJS","on","LazyLoad"],"mappings":"AAEAA,IAAMC,OAAS,CACbC,MAAO,QACPC,SAAU,CACRC,QAAS,kBACTC,WAAY,sBAEdC,SAAU,CACRF,QAAS,kBACTC,WAAY,qBACZE,MAAO,kBAILC,KAAO,CAEXC,IAAK,KAGLP,MAAOQ,aAAaT,OAAOC,OAG3BS,SAAU,KACVC,YAAa,KAGbC,eAAgB,KAChBC,MAAO,GAEPC,YAAa,KACbC,MAAO,CAELZ,QAAS,CACPa,KAAMP,aAAaT,OAAOE,SAASC,SACnCc,MAAO,KACPC,QAAS,MAGXd,WAAY,CACVY,KAAMP,aAAaT,OAAOE,SAASE,YACnCe,QAAS,KACTD,QAAS,KACTE,KAAK,GAGPd,MAAO,CACLa,QAAS,KACTD,QAAS,OAKbb,SAAU,CACRF,QAAS,GACTC,WAAY,GACZE,MAAO,IAETe,WAAY,CACVlB,QAAS,GACTC,WAAY,GACZE,MAAO,IAETgB,aAAc,CACZC,OAAQ,KACRnB,WAAY,KACZoB,KAAM,MAIRC,qBAAsB,KAGtBC,MAAO,CACLvB,QAAS,GACTwB,OAAQ,GACRrB,MAAO,IAGTsB,YAAa,KACbC,SAAU,KAEVC,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AgBnS,UAAUC,IAAI,YAGzC,IADAzC,IAAM4U,EAAe,CAAC,UAAW,aAAc,SACtCpO,EAAI,EAAGA,EAAIoO,EAAa5N,OAAQR,IAAK,CAC5CxG,IAAM6U,EAAKnU,aAAaT,OAAOK,SAASsU,EAAapO,KACjDqO,IAAIrU,KAAKF,SAASsU,EAAapO,IAAM4H,KAAK0G,MAAMD,IAGtDrU,KAAK4D,cAEL5D,KAAKqB,YAAc,IAAIkT,YAAY,iBAEnCvU,KAAKqB,YAAYmT,GAAG,WAAS,WAC3B,OAAO9R,KAAK,GAAI,yCAA0C,UAAW,CACnE+K,SAAS,EACTyC,MAAO,UAIXlQ,KAAKqB,YAAYmT,GAAG,QAASxU,KAAKmC,SAElCnC,KAAKsB,SAAW,IAAImT","file":"dashboard.js","sourcesContent":["/* global swal, axios, ClipboardJS, LazyLoad */\n\nconst lsKeys = {\n token: 'token',\n viewType: {\n uploads: 'viewTypeUploads',\n uploadsAll: 'viewTypeUploadsAll'\n },\n selected: {\n uploads: 'selectedUploads',\n uploadsAll: 'selectedUploadsAll',\n users: 'selectedUsers'\n }\n}\n\nconst page = {\n // #page\n dom: null,\n\n // user token\n token: localStorage[lsKeys.token],\n\n // from api/tokens/verify\n username: null,\n permissions: null,\n\n // sidebar menus\n menusContainer: null,\n menus: [],\n\n currentView: null,\n views: {\n // config of uploads view\n uploads: {\n type: localStorage[lsKeys.viewType.uploads],\n album: null, // album's id\n pageNum: null // page num\n },\n // config of uploads view (all)\n uploadsAll: {\n type: localStorage[lsKeys.viewType.uploadsAll],\n filters: null, // uploads' filters\n pageNum: null, // page num\n all: true\n },\n // config of users view\n users: {\n filters: null, // users' filters\n pageNum: null\n }\n },\n\n // id of selected items (shared across pages and will be synced with localStorage)\n selected: {\n uploads: [],\n uploadsAll: [],\n users: []\n },\n checkboxes: {\n uploads: [],\n uploadsAll: [],\n users: []\n },\n lastSelected: {\n upload: null,\n uploadsAll: null,\n user: null\n },\n\n // select album dom for dialogs/modals\n selectAlbumContainer: null,\n\n // cache for dialogs/modals\n cache: {\n uploads: {},\n albums: {},\n users: {}\n },\n\n clipboardJS: null,\n lazyLoad: null,\n\n imageExts: ['.webp', '.jpg', '.jpeg', '.gif', '.png', '.tiff', '.tif', '.svg'],\n // some of these extensions can not be played directly in browsers\n videoExts: ['.webm', '.mp4', '.wmv', '.avi', '.mov', '.mkv'],\n\n isTriggerLoading: null,\n fadingIn: null,\n\n albumTitleMaxLength: 70,\n albumDescMaxLength: 4000\n}\n\npage.unhide = () => {\n document.querySelector('#loader').classList.add('is-hidden')\n document.querySelector('#dashboard').classList.remove('is-hidden')\n}\n\n// Handler for regular JS errors\npage.onError = error => {\n console.error(error)\n\n const content = document.createElement('div')\n content.innerHTML = `${error.toString()}
`\n return swal({\n title: 'An error occurred!',\n icon: 'error',\n content\n })\n}\n\n// Handler for Axios errors\npage.onAxiosError = error => {\n console.error(error)\n\n // Better Cloudflare errors\n const cloudflareErrors = {\n 520: 'Unknown Error',\n 521: 'Web Server Is Down',\n 522: 'Connection Timed Out',\n 523: 'Origin Is Unreachable',\n 524: 'A Timeout Occurred',\n 525: 'SSL Handshake Failed',\n 526: 'Invalid SSL Certificate',\n 527: 'Railgun Error',\n 530: 'Origin DNS Error'\n }\n\n const statusText = cloudflareErrors[error.response.status] || error.response.statusText\n const description = error.response.data && error.response.data.description\n ? error.response.data.description\n : 'There was an error with the request, please check the console for more information.'\n\n return swal(`${error.response.status} ${statusText}`, description, 'error')\n}\n\npage.preparePage = () => {\n if (page.token)\n page.verifyToken(page.token, true)\n else\n window.location = 'auth'\n}\n\npage.verifyToken = (token, reloadOnError) => {\n axios.post('api/tokens/verify', { token }).then(response => {\n if (response.data.success === false)\n return swal({\n title: 'An error occurred!',\n text: response.data.description,\n icon: 'error'\n }).then(() => {\n if (!reloadOnError) return\n localStorage.removeItem(lsKeys.token)\n window.location = 'auth'\n })\n\n axios.defaults.headers.common.token = token\n localStorage[lsKeys.token] = token\n\n page.token = token\n page.username = response.data.username\n page.permissions = response.data.permissions\n page.prepareDashboard()\n }).catch(page.onAxiosError)\n}\n\npage.prepareDashboard = () => {\n page.dom = document.querySelector('#page')\n\n // Capture all click events\n page.dom.addEventListener('click', page.domClick, true)\n\n // Capture all submit events\n page.dom.addEventListener('submit', event => {\n // Prevent default if necessary\n if (event.target && event.target.classList.contains('prevent-default'))\n return event.preventDefault()\n }, true)\n\n page.menusContainer = document.querySelector('#menu')\n\n // All item menus in the sidebar\n const itemMenus = [\n { selector: '#itemUploads', onclick: page.getUploads },\n { selector: '#itemDeleteUploadsByNames', onclick: page.deleteUploadsByNames },\n { selector: '#itemManageAlbums', onclick: page.getAlbums },\n { selector: '#itemManageToken', onclick: page.changeToken },\n { selector: '#itemChangePassword', onclick: page.changePassword },\n { selector: '#itemLogout', onclick: page.logout },\n { selector: '#itemManageUploads', onclick: page.getUploads, params: { all: true }, group: 'moderator' },\n { selector: '#itemStatistics', onclick: page.getStatistics, group: 'admin' },\n { selector: '#itemManageUsers', onclick: page.getUsers, group: 'admin' }\n ]\n\n for (let i = 0; i < itemMenus.length; i++) {\n // Skip item menu if not enough permission\n if (itemMenus[i].group && !page.permissions[itemMenus[i].group])\n continue\n\n // Add onclick event listener\n const item = document.querySelector(itemMenus[i].selector)\n item.addEventListener('click', event => {\n // This class name isn't actually being applied fast enough\n if (page.menusContainer.classList.contains('is-loading'))\n return\n\n // eslint-disable-next-line compat/compat\n itemMenus[i].onclick.call(null, Object.assign({\n trigger: event.currentTarget\n }, itemMenus[i].params || {}))\n })\n\n item.classList.remove('is-hidden')\n page.menus.push(item)\n }\n\n // If at least a moderator, show administration section\n if (page.permissions.moderator) {\n document.querySelector('#itemLabelAdmin').classList.remove('is-hidden')\n document.querySelector('#itemListAdmin').classList.remove('is-hidden')\n }\n\n // Update text of logout button\n document.querySelector('#itemLogout').innerHTML = `Logout ( ${page.username} )`\n\n // Finally display dashboard\n page.unhide()\n\n // Load albums sidebar\n page.getAlbumsSidebar()\n\n if (typeof page.prepareShareX === 'function')\n page.prepareShareX()\n}\n\npage.logout = params => {\n page.updateTrigger(params.trigger, 'active')\n localStorage.removeItem(lsKeys.token)\n window.location = 'auth'\n}\n\npage.updateTrigger = (trigger, newState) => {\n if (!trigger) return\n\n // Disable menus container when loading\n if (newState === 'loading')\n page.menusContainer.classList.add('is-loading')\n else\n page.menusContainer.classList.remove('is-loading')\n\n if (newState === 'loading') {\n trigger.classList.add('is-loading')\n } else if (newState === 'active') {\n if (trigger.parentNode.tagName !== 'LI')\n return\n for (let i = 0; i < page.menus.length; i++)\n page.menus[i].classList.remove('is-active')\n trigger.classList.remove('is-loading')\n trigger.classList.add('is-active')\n } else {\n trigger.classList.remove('is-loading')\n trigger.classList.remove('is-active')\n }\n}\n\npage.getItemID = element => {\n // This expects the item's parent to have the item's ID\n let parent = element.parentNode\n // If the element is part of a set of controls, use the container's parent instead\n if (element.parentNode.classList.contains('controls')) parent = parent.parentNode\n return parseInt(parent.dataset.id)\n}\n\npage.domClick = event => {\n // We are processing clicks this way to avoid using \"onclick\" attribute\n // Apparently we will need to use \"unsafe-inline\" for \"script-src\" directive\n // of Content Security Policy (CSP), if we want to use \"onclick\" attribute\n // Though I think that only applies to some browsers (?)\n // Of course it wouldn't have mattered if we didn't use CSP to begin with\n // Anyway, I personally would rather not use \"onclick\" attribute\n let element = event.target\n if (!element) return\n\n // Delegate click events to their A or BUTTON parents\n if (['I'].includes(element.tagName) && ['SPAN'].includes(element.parentNode.tagName))\n element = element.parentNode\n if (['SPAN'].includes(element.tagName) && ['A', 'BUTTON'].includes(element.parentNode.tagName))\n element = element.parentNode\n\n // Skip elements that have no action data\n if (!element.dataset || !element.dataset.action) return\n\n // Skip disabled elements\n if (element.hasAttribute('disabled')) return\n\n event.stopPropagation() // maybe necessary\n const id = page.getItemID(element)\n const action = element.dataset.action\n\n switch (action) {\n case 'view-list':\n return page.setUploadsView('list', element)\n case 'view-thumbs':\n return page.setUploadsView('thumbs', element)\n case 'clear-selection':\n return page.clearSelection()\n case 'add-selected-uploads-to-album':\n return page.addSelectedUploadsToAlbum()\n case 'select':\n return page.select(element, event)\n case 'select-all':\n return page.selectAll(element)\n case 'add-to-album':\n return page.addToAlbum(id)\n case 'delete-upload':\n return page.deleteUpload(id)\n case 'bulk-delete-uploads':\n return page.bulkDeleteUploads()\n case 'display-preview':\n return page.displayPreview(id)\n case 'submit-album':\n return page.submitAlbum(element)\n case 'edit-album':\n return page.editAlbum(id)\n case 'delete-album':\n return page.deleteAlbum(id)\n case 'get-new-token':\n return page.getNewToken(element)\n case 'create-user':\n return page.createUser()\n case 'edit-user':\n return page.editUser(id)\n case 'disable-user':\n return page.disableUser(id)\n case 'delete-user':\n return page.deleteUser(id)\n case 'user-filters-help':\n return page.userFiltersHelp(element)\n case 'filter-uploads':\n return page.filterUploads(element)\n case 'view-user-uploads':\n return page.viewUserUploads(id, element)\n case 'page-ellipsis':\n return page.focusJumpToPage()\n case 'page-prev':\n case 'page-next':\n case 'page-goto':\n case 'jump-to-page':\n return page.switchPage(action, element)\n }\n}\n\npage.fadeAndScroll = disableFading => {\n if (page.fadingIn) {\n clearTimeout(page.fadingIn)\n page.dom.classList.remove('fade-in')\n }\n\n if (!disableFading) {\n page.dom.classList.add('fade-in')\n page.fadingIn = setTimeout(() => {\n page.dom.classList.remove('fade-in')\n }, 500)\n }\n\n page.dom.scrollIntoView({\n behavior: disableFading ? 'auto' : 'smooth',\n block: 'start',\n inline: 'nearest'\n })\n}\n\npage.switchPage = (action, element) => {\n // eslint-disable-next-line compat/compat\n const params = Object.assign({\n trigger: element\n }, page.views[page.currentView])\n\n const func = page.currentView === 'users' ? page.getUsers : page.getUploads\n\n switch (action) {\n case 'page-prev':\n params.pageNum = page.views[page.currentView].pageNum - 1\n if (params.pageNum < 0)\n return swal('An error occurred!', 'This is already the first page.', 'error')\n return func(params)\n case 'page-next':\n params.pageNum = page.views[page.currentView].pageNum + 1\n return func(params)\n case 'page-goto':\n params.pageNum = parseInt(element.dataset.goto)\n return func(params)\n case 'jump-to-page': {\n const jumpToPage = document.querySelector('#jumpToPage')\n if (!jumpToPage.checkValidity()) return\n const parsed = parseInt(jumpToPage.value)\n params.pageNum = isNaN(parsed) ? 0 : (parsed - 1)\n if (params.pageNum < 0) params.pageNum = 0\n return func(params)\n }\n }\n}\n\npage.focusJumpToPage = () => {\n const element = document.querySelector('#jumpToPage')\n if (!element) return\n element.focus()\n element.select()\n}\n\npage.getUploads = (params = {}) => {\n if (params === undefined)\n params = {}\n\n if ((params.all || params.filters) && !page.permissions.moderator)\n return swal('An error occurred!', 'You can not do this!', 'error')\n\n page.updateTrigger(params.trigger, 'loading')\n\n if (typeof params.pageNum !== 'number' || params.pageNum < 0)\n params.pageNum = 0\n\n const url = params.album !== undefined\n ? `api/album/${params.album}/${params.pageNum}`\n : `api/uploads/${params.pageNum}`\n\n const headers = {\n all: params.all ? '1' : '',\n filters: params.filters || ''\n }\n\n axios.get(url, { headers }).then(response => {\n if (response.data.success === false)\n if (response.data.description === 'No token provided') {\n return page.verifyToken(page.token)\n } else {\n page.updateTrigger(params.trigger)\n return swal('An error occurred!', response.data.description, 'error')\n }\n\n const pages = Math.ceil(response.data.count / 25)\n const files = response.data.files\n if (params.pageNum && (files.length === 0))\n if (params.autoPage) {\n params.pageNum = pages - 1\n return page.getUploads(params)\n } else {\n page.updateTrigger(params.trigger)\n return swal('An error occurred!', `There are no more uploads to populate page ${params.pageNum + 1}.`, 'error')\n }\n\n page.currentView = params.all ? 'uploadsAll' : 'uploads'\n page.cache.uploads = {}\n\n const albums = response.data.albums\n const users = response.data.users\n const basedomain = response.data.basedomain\n const pagination = page.paginate(response.data.count, 25, params.pageNum)\n\n let filter = '
${upload.name}
\n${upload.appendix ? `${upload.appendix} – ` : ''}${upload.prettyBytes}
\n ${hasExpiryDateColumn && upload.prettyExpiryDate ? `\nEXP: ${upload.prettyExpiryDate}
` : ''}\n\n | File | \n ${params.album === undefined ? `${params.all ? 'User' : 'Album'} | ` : ''}\nSize | \n ${params.all ? 'IP | ' : ''}\nDate | \n ${hasExpiryDateColumn ? 'Expiry date | ' : ''}\n\n |
---|
user:demo
\n Uploads from users with username \"John Doe\" AND/OR \"demo\":\n user:John\\\\ Doe user:demo
\n Uploads from IP \"127.0.0.1\" AND which upload names match \"*.rar\" OR \"*.zip\":\n ip:127.0.0.1 name:*.rar name:*.zip
\n Uploads from user with username \"test\" AND/OR from non-registered users:\n user:test -user
\n Sort results by \"size\" column in ascending and descending order respectively:\n orderby:expirydate
\n user:demo orderby:size
\n -user name:*.mp4 orderby:size:desc
\n `.trim().replace(/^ {6}/gm, '').replace(/\\n/g, 'You won't be able to recover ${boldObjective}!
`\n\n if (params.all) {\n const obj1 = count === 1 ? 'an upload' : 'some uploads'\n const obj2 = count === 1 ? 'another user' : 'other users'\n text += `\\nWarning: You may be nuking ${obj1} by ${obj2}!
`\n }\n\n const content = document.createElement('div')\n content.innerHTML = text\n\n swal({\n title: 'Are you sure?',\n content,\n icon: 'warning',\n dangerMode: true,\n buttons: {\n cancel: true,\n confirm: {\n text: `Yes, nuke ${params.values.length === 1 ? 'it' : 'them'}!`,\n closeModal: false\n }\n }\n }).then(proceed => {\n if (!proceed) return\n\n axios.post('api/upload/bulkdelete', {\n field: params.fields,\n values: params.values\n }).then(response => {\n if (!response) return\n\n if (response.data.success === false)\n if (response.data.description === 'No token provided') {\n return page.verifyToken(page.token)\n } else {\n return swal('An error occurred!', response.data.description, 'error')\n }\n\n const failed = Array.isArray(response.data.failed) ? response.data.failed : []\n if (failed.length === params.values.length)\n swal('An error occurred!', `Unable to delete any of the ${objective}.`, 'error')\n else if (failed.length && failed.length < params.values.length)\n swal('Warning!', `From ${objective}, unable to delete ${failed.length} of them.`, 'warning')\n else\n swal('Deleted!', `${objective} ${count === 1 ? 'has' : 'have'} been deleted.`, 'success', {\n buttons: false,\n timer: 1500\n })\n\n if (typeof params.cb === 'function')\n params.cb(failed)\n }).catch(page.onAxiosError)\n })\n}\n\npage.addSelectedUploadsToAlbum = () => {\n if (page.currentView !== 'uploads')\n return\n\n const count = page.selected[page.currentView].length\n if (!count)\n return swal('An error occurred!', 'You have not selected any uploads.', 'error')\n\n page.addUploadsToAlbum(page.selected[page.currentView], failed => {\n if (!failed) return\n if (failed.length)\n page.selected[page.currentView] = page.selected[page.currentView].filter(id => {\n return failed.includes(id)\n })\n else\n page.selected[page.currentView] = []\n\n localStorage[lsKeys.selected[page.currentView]] = JSON.stringify(page.selected[page.currentView])\n page.getUploads(page.views[page.currentView])\n })\n}\n\npage.addToAlbum = id => {\n page.addUploadsToAlbum([id], failed => {\n if (!failed) return\n page.getUploads(page.views[page.currentView])\n })\n}\n\npage.addUploadsToAlbum = (ids, callback) => {\n const count = ids.length\n\n const content = document.createElement('div')\n content.innerHTML = `\nYou are about to add ${count} upload${count === 1 ? '' : 's'} to an album.
\nIf an upload is already in an album, it will be moved.
\nID | \nName | \nFiles | \nCreated at | \nPublic link | \n\n |
---|
Max length is ${page.albumTitleMaxLength} characters.
\nMax length is ${page.albumDescMaxLength} characters.
\n\n | ID | \nUsername | \nUploads | \nUsage | \nGroup | \n\n |
---|
Username: ${response.data.username}
\nPassword: ${response.data.password}
User group: ${response.data.group}
\n `\n swal({\n title: 'Created a new user!',\n icon: 'success',\n content: div\n })\n\n page.getUsers(page.views.users)\n }).catch(page.onAxiosError)\n })\n}\n\npage.editUser = id => {\n const user = page.cache.users[id]\n if (!user) return\n\n const groupOptions = Object.keys(page.permissions).map((g, i, a) => {\n const selected = g === user.displayGroup\n const disabled = !(a[i + 1] && page.permissions[a[i + 1]])\n return ``\n }).join('\\n')\n\n const div = document.createElement('div')\n div.innerHTML = `\n${user.username}'s new password is:
\n${response.data.password}
You will be disabling a user named ${page.cache.users[id].username}.
\nTheir files will remain.
\n `\n\n swal({\n title: 'Are you sure?',\n icon: 'warning',\n content,\n dangerMode: true,\n buttons: {\n cancel: true,\n confirm: {\n text: 'Yes, disable them!',\n closeModal: false\n }\n }\n }).then(proceed => {\n if (!proceed) return\n\n axios.post('api/users/disable', { id }).then(response => {\n if (!response) return\n\n if (response.data.success === false)\n if (response.data.description === 'No token provided')\n return page.verifyToken(page.token)\n else\n return swal('An error occurred!', response.data.description, 'error')\n\n swal('Success!', `${page.cache.users[id].username} has been disabled.`, 'success', {\n buttons: false,\n timer: 1500\n })\n page.getUsers(page.views.users)\n }).catch(page.onAxiosError)\n })\n}\n\npage.deleteUser = id => {\n const user = page.cache.users[id]\n if (!user) return\n\n const content = document.createElement('div')\n content.innerHTML = `\nYou will be deleting a user named ${page.cache.users[id].username}.
\n
Their files will remain, unless you choose otherwise.
\n `\n\n swal({\n title: 'Are you sure?',\n icon: 'warning',\n content,\n dangerMode: true,\n buttons: {\n cancel: true,\n confirm: {\n text: 'Yes, delete it!',\n closeModal: false\n },\n purge: {\n text: 'Yes, and the uploads too!',\n value: 'purge',\n className: 'swal-button--danger',\n closeModal: false\n }\n }\n }).then(proceed => {\n if (!proceed) return\n\n axios.post('api/users/delete', {\n id,\n purge: proceed === 'purge'\n }).then(response => {\n if (!response) return\n\n if (response.data.success === false) {\n const failed = Array.isArray(response.data.failed)\n ? response.data.failed\n : []\n\n if (response.data.description === 'No token provided')\n return page.verifyToken(page.token)\n else if (failed.length)\n return swal('An error occurred!', `Unable to delete ${failed.length} of the user's upload${failed.length === 1 ? '' : 's'}.`, 'error')\n else\n return swal('An error occurred!', response.data.description, 'error')\n }\n\n swal('Success!', `${page.cache.users[id].username} has been deleted.`, 'success', {\n buttons: false,\n timer: 1500\n })\n\n // Reload users list\n // eslint-disable-next-line compat/compat\n page.getUsers(Object.assign({\n autoPage: true\n }, page.views.users))\n }).catch(page.onAxiosError)\n })\n}\n\n// Roughly based on https://github.com/mayuska/pagination/blob/master/index.js\npage.paginate = (totalItems, itemsPerPage, currentPage) => {\n currentPage = currentPage + 1\n const step = 3\n const numPages = Math.ceil(totalItems / itemsPerPage)\n\n let template = ''\n const elementsToShow = step * 2\n const add = {\n pageNum (start, end) {\n for (let i = start; i <= end; ++i)\n template += `${keys[i].toUpperCase()} | \n\n |
---|