\n Time taken: ${response.data.hrtime[0]}s ${Math.ceil(response.data.hrtime[1] / 1000000)}ms.\n
\n {"version":3,"sources":["dashboard.js"],"names":["const","lsKeys","token","viewType","uploads","uploadsAll","selected","albums","albumsAll","users","originalNames","page","section","dom","localStorage","username","permissions","menusContainer","menus","currentView","views","type","album","pageNum","filters","all","prevPageNums","checkboxes","lastSelected","selectAlbumContainer","cache","clipboardJS","lazyLoad","albumsSidebarCollapse","albumsSidebarCollapsible","imageExts","videoExts","audioExts","isSomethingLoading","fadingIn","albumTitleMaxLength","albumDescMaxLength","cloudflareErrors","document","querySelector","classList","add","remove","error","console","content","createElement","innerHTML","toString","swal","title","icon","response","onError","statusText","status","description","data","verifyToken","window","location","apiVersion","match","src","text","buttons","confirm","closeModal","then","reload","axios","post","defaults","headers","common","version","checkClientVersion","prepareDashboard","catch","onAxiosError","code","removeItem","addEventListener","domClick","event","target","contains","preventDefault","itemMenus","selector","onclick","getUploads","deleteUploadsByNames","getAlbums","changeToken","changePassword","logout","params","group","getStatistics","getUsers","loop","i","item","warnSomethingLoading","call","Object","assign","trigger","currentTarget","forceScroll","push","length","moderator","unhide","getAlbumsSidebar","prepareShareX","updateTrigger","timer","newState","parentNode","tagName","className","includes","let","element","parent","parseInt","dataset","id","action","hasAttribute","stopPropagation","getItemID","setUploadsView","toggleOriginalNames","addToAlbum","deleteUpload","addSelectedUploadsToAlbum","bulkDeleteUploads","displayPreview","uploadFiltersHelp","filterUploads","submitAlbum","editAlbum","disableAlbum","deleteAlbum","viewAlbumUploads","createUser","editUser","disableUser","deleteUser","viewUserUploads","getNewToken","clearSelection","select","selectAll","focusJumpToPage","switchPage","disableFading","clearTimeout","setTimeout","disableSmooth","scrollIntoView","behavior","block","inline","view","get","func","getByView","goto","jumpToPage","jumpid","checkValidity","parsed","value","isNaN","focus","url","test","minoffset","Date","getTimezoneOffset","success","uploadsPerPage","pages","Math","ceil","count","files","autoPage","basedomain","max","pagination","paginate","extraControls","escape","controls","bottomExtraControls","replace","bottomPagination","unselected","filterAllByAlbums","hasExpiryDateColumn","some","file","expirydate","showOriginalNames","origin","thumb","extname","toLowerCase","previewable","name","original","prettyAlbum","albumid","prettyBytes","getPrettyBytes","size","prettyDate","getPrettyDate","timestamp","prettyUser","userid","prettyExpiryDate","table","upload","appendix","div","undefined","appendChild","querySelectorAll","tr","ip","checked","fadeInDom","scrollToDom","update","onload","body","onerror","setAttribute","splice","indexOf","JSON","stringify","lastElement","thisIndex","index","lastIndex","abs","shiftKey","selectInBetween","suffix","substring","proceed","Boolean","style","trim","filtersid","user","postBulkDeleteUploads","field","values","cb","failed","filter","textArea","seen","names","split","map","trimmed","prototype","hasOwnProperty","join","objective","dangerMode","cancel","Array","isArray","addUploadsToAlbum","ids","callback","choose","added","simple","list","getElementsByTagName","removeAttribute","albumsPerPage","homeDomain","createNewAlbum","albumUrlText","identifier","albumUrl","hasZip","zipSize","prettyZipDate","zipGeneratedAt","isZipExpired","editedAt","enabled","download","public","descriptionHtml","urlPath","requestLink","purge","albumsSidebar","oldAlbums","diffCount","innerText","collapsed","textExpand","textCollapse","collapse","li","a","sendNewPassword","pass","password","admin","usersPerPage","displayGroup","groups","keys","registration","prettyTokenUpdate","usage","groupOptions","g","isHigher","isDisabledHelper","resetPassword","autoClose","displayName","totalItems","itemsPerPage","currentPage","numPages","template","start","end","elementsToShow","step","stats","rows","valKeys","j","totalForPercentage","available","used","total","toFixed","getPrettyUptime","toLocaleString","hrtime","defineProperty","varArgs","arguments$1","arguments","TypeError","to","nextSource","nextKey","writable","configurable","documentElement","selectedKeys","ls","parse","preparePage","ClipboardJS","on","LazyLoad","bulmaCollapsible"],"mappings":"AAEAA,IAAMC,OAAS,CACbC,MAAO,QACPC,SAAU,CACRC,QAAS,kBACTC,WAAY,sBAEdC,SAAU,CACRF,QAAS,kBACTC,WAAY,qBACZE,OAAQ,iBACRC,UAAW,oBACXC,MAAO,iBAETC,cAAe,CACbN,QAAS,gBACTC,WAAY,qBAIVM,KAAO,CAEXC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WAC3B,OAAOvU,KAAK,GAAI,yCAA0C,UAAW,CACnEgB,SAAS,EACTqD,MAAO,MA5zBX,IAg0BAhH,KAAKoB,YAAY8V,GAAG,QAASlX,KAAK+C,SAElC/C,KAAKqB,SAAW,IAAI8V,SAEpBnX,KAAKsB,sBAAwBU,SAASC,cAAc,0BAGpDjC,KAAKuB,yBAA2B,IAAI6V,iBAAiBpV,SAASC,cAAc,mBAC5EjC,KAAKuB,yBAAyB2V,GAAG,iBAAe,SAAEpS,GAChD9E,KAAKsB,sBAAsB8R,UAAYpT,KAAKsB,sBAAsBoG,QAAQ6L,YA7zB5E,IA+zBAvT,KAAKuB,yBAAyB2V,GAAG,mBAAiB,SAAEpS,GAClD9E,KAAKsB,sBAAsB8R,UAAYpT,KAAKsB,sBAAsBoG,QAAQ4L,UA7zB5E,GACF","file":"dashboard.js","sourcesContent":["/* global swal, axios, ClipboardJS, LazyLoad, bulmaCollapsible */\n\nconst lsKeys = {\n token: 'token',\n viewType: {\n uploads: 'viewTypeUploads',\n uploadsAll: 'viewTypeUploadsAll'\n },\n selected: {\n uploads: 'selectedUploads',\n uploadsAll: 'selectedUploadsAll',\n albums: 'selectedAlbums',\n albumsAll: 'selectedAlbumsAll',\n users: 'selectedUsers'\n },\n originalNames: {\n uploads: 'originalNames',\n uploadsAll: 'originalNamesAll'\n }\n}\n\nconst page = {\n // #dashboard\n section: null,\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 // params of uploads view\n uploads: {\n type: localStorage[lsKeys.viewType.uploads],\n originalNames: localStorage[lsKeys.originalNames.uploads] === '1',\n album: null, // album's id\n pageNum: null\n },\n // params of uploads view (all)\n uploadsAll: {\n type: localStorage[lsKeys.viewType.uploadsAll],\n originalNames: localStorage[lsKeys.originalNames.uploadsAll] === '1',\n filters: null,\n pageNum: null,\n all: true\n },\n // params of albums view\n albums: {\n filters: null,\n pageNum: null\n },\n // params of albums view (all)\n albumsAll: {\n filters: null,\n pageNum: null,\n all: true\n },\n // params of users view\n users: {\n filters: null,\n pageNum: null\n }\n },\n prevPageNums: {\n uploads: null,\n uploadsAll: null,\n albums: null,\n albumsAll: null,\n users: null\n },\n\n // ids of selected items (shared across pages and will be synced with localStorage)\n selected: {\n uploads: [],\n uploadsAll: [],\n albums: [],\n albumsAll: [],\n users: []\n },\n checkboxes: [],\n lastSelected: [],\n\n // select album dom for dialogs/modals\n selectAlbumContainer: null,\n\n // cache for dialogs/modals\n cache: {},\n\n clipboardJS: null,\n lazyLoad: null,\n albumsSidebarCollapse: null,\n albumsSidebarCollapsible: null,\n\n imageExts: ['.gif', '.jpeg', '.jpg', '.png', '.svg', '.tif', '.tiff', '.webp'],\n videoExts: ['.3g2', '.3gp', '.asf', '.avchd', '.avi', '.divx', '.evo', '.flv', '.h264', '.h265', '.hevc', '.m2p', '.m2ts', '.m4v', '.mk3d', '.mkv', '.mov', '.mp4', '.mpeg', '.mpg', '.mxf', '.ogg', '.ogv', '.ps', '.qt', '.rmvb', '.ts', '.vob', '.webm', '.wmv'],\n audioExts: ['.flac', '.mp3', '.wav', '.wma'],\n\n isSomethingLoading: false,\n fadingIn: null,\n\n albumTitleMaxLength: 70,\n albumDescMaxLength: 4000,\n\n // Better Cloudflare errors\n 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\npage.unhide = () => {\n document.querySelector('#loader').classList.add('is-hidden')\n page.section.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 = `\n
${error.toString()}
Please check your console for more information.
\n `\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 if (!error.response) {\n return page.onError(error)\n }\n\n const statusText = page.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.\\nPlease check the console for more information.'\n\n return swal(`${error.response.status} ${statusText}`, description, 'error')\n}\n\npage.preparePage = () => {\n if (page.token) page.verifyToken(page.token)\n else window.location = 'auth'\n}\n\npage.checkClientVersion = apiVersion => {\n const self = document.querySelector('#mainScript')\n const match = self.src.match(/\\?_=(\\d+)$/)\n if (match && match[1] && match[1] !== apiVersion) {\n return swal({\n title: 'Update detected!',\n text: 'Client assets have been updated. Reload to display the latest version?',\n icon: 'info',\n buttons: {\n confirm: {\n text: 'Reload',\n closeModal: false\n }\n }\n }).then(() => {\n window.location.reload()\n })\n }\n}\n\npage.verifyToken = token => {\n axios.post('api/tokens/verify', { token }).then(response => {\n axios.defaults.headers.common.token = token\n localStorage[lsKeys.token] = token\n\n if (response.data.version) {\n page.checkClientVersion(response.data.version)\n }\n\n page.token = token\n page.username = response.data.username\n page.permissions = response.data.permissions\n page.prepareDashboard()\n }).catch(error => {\n return page.onAxiosError(error).then(() => {\n if (error.response.data && error.response.data.code === 10001) {\n localStorage.removeItem(lsKeys.token)\n window.location = 'auth'\n }\n })\n })\n}\n\npage.prepareDashboard = () => {\n page.section = document.querySelector('#dashboard')\n page.dom = page.section.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 }\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: '#itemManageYourAlbums', 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: '#itemManageAlbums', onclick: page.getAlbums, 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]) continue\n\n // Add onclick event listener\n const item = document.querySelector(itemMenus[i].selector)\n item.addEventListener('click', event => {\n if (page.isSomethingLoading) return page.warnSomethingLoading()\n\n // eslint-disable-next-line compat/compat\n itemMenus[i].onclick.call(null, Object.assign(itemMenus[i].params || {}, {\n trigger: event.currentTarget,\n forceScroll: true\n }))\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') 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.warnSomethingLoading = () => {\n swal('Please wait!', 'Something else is still loading\\u2026', 'warning', {\n buttons: false,\n timer: 3000\n })\n}\n\npage.updateTrigger = (trigger, newState) => {\n if (!trigger) return\n\n // Disable menus container and pagination when loading\n if (newState === 'loading') {\n page.isSomethingLoading = true\n page.section.classList.add('is-loading')\n } else {\n page.section.classList.remove('is-loading')\n page.isSomethingLoading = false\n }\n\n if (newState === 'loading') {\n trigger.classList.add('is-loading')\n } else if (newState === 'active') {\n if (trigger.parentNode.tagName === 'LI' && !trigger.className.includes('pagination-link')) {\n for (let i = 0; i < page.menus.length; i++) {\n page.menus[i].classList.remove('is-active')\n }\n trigger.classList.add('is-active')\n }\n trigger.classList.remove('is-loading')\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 }\n if (['SPAN'].includes(element.tagName) && ['A', 'BUTTON'].includes(element.parentNode.tagName)) {\n element = element.parentNode\n }\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 // Uploads\n case 'view-list':\n return page.setUploadsView('list', element)\n case 'view-thumbs':\n return page.setUploadsView('thumbs', element)\n case 'toggle-original-names':\n return page.toggleOriginalNames(element)\n case 'add-to-album':\n return page.addToAlbum(id)\n case 'delete-upload':\n return page.deleteUpload(id)\n case 'add-selected-uploads-to-album':\n return page.addSelectedUploadsToAlbum()\n case 'bulk-delete-uploads':\n return page.bulkDeleteUploads()\n case 'display-preview':\n return page.displayPreview(id)\n // Manage uploads\n case 'upload-filters-help':\n return page.uploadFiltersHelp(element)\n case 'filter-uploads':\n return page.filterUploads(element)\n // Manage your albums\n case 'submit-album':\n return page.submitAlbum(element)\n case 'edit-album':\n return page.editAlbum(id)\n case 'disable-album':\n return page.disableAlbum(id)\n case 'delete-album':\n return page.deleteAlbum(id)\n case 'view-album-uploads':\n return page.viewAlbumUploads(id, element)\n // Manage users\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 'view-user-uploads':\n return page.viewUserUploads(id, element)\n // Others\n case 'get-new-token':\n return page.getNewToken(element)\n // Uploads & Users\n case 'clear-selection':\n return page.clearSelection()\n case 'select':\n return page.select(element, event)\n case 'select-all':\n return page.selectAll(element)\n case 'page-ellipsis':\n return page.focusJumpToPage(element)\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.fadeInDom = 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\npage.scrollToDom = disableSmooth => {\n page.dom.scrollIntoView({\n behavior: disableSmooth ? 'auto' : 'smooth',\n block: 'start',\n inline: 'nearest'\n })\n}\n\npage.getByView = (view, get) => {\n switch (view) {\n case 'uploads':\n case 'uploadsAll':\n return {\n type: 'uploads',\n func: page.getUploads\n }[get]\n case 'albums':\n case 'albumsAll':\n return {\n type: 'albums',\n func: page.getAlbums\n }[get]\n case 'users':\n return {\n type: 'users',\n func: page.getUsers\n }[get]\n default:\n return null\n }\n}\n\npage.switchPage = (action, element) => {\n if (page.isSomethingLoading) return page.warnSomethingLoading()\n\n // eslint-disable-next-line compat/compat\n const params = Object.assign(page.views[page.currentView], {\n trigger: element\n })\n\n const func = page.getByView(page.currentView, 'func')\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 }\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(`#${element.dataset.jumpid || '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 = element => {\n const jumpToPage = document.querySelector(`#${element.dataset.jumpid || 'jumpToPage'}`)\n if (!jumpToPage) return\n jumpToPage.focus()\n jumpToPage.select()\n}\n\npage.getUploads = (params = {}) => {\n if (params && params.all && !page.permissions.moderator) {\n return swal('An error occurred!', 'You cannot do this!', 'error')\n }\n\n if (page.isSomethingLoading) return page.warnSomethingLoading()\n\n page.updateTrigger(params.trigger, 'loading')\n\n if (typeof params.pageNum !== 'number' || params.pageNum < 0) {\n params.pageNum = 0\n }\n\n const url = typeof params.album !== 'undefined'\n ? `api/album/${params.album}/${params.pageNum}`\n : `api/uploads/${params.pageNum}`\n\n const headers = {}\n if (params.all) headers.all = '1'\n if (params.filters) {\n headers.filters = params.filters\n // Send client timezone offset if properly using date: and/or :expiry filters\n // Server will assume client is on UTC if unset\n if (/(^|\\s)(date|expiry):[\\d\"]/.test(params.filters)) {\n headers.minoffset = new Date().getTimezoneOffset()\n }\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\n const uploadsPerPage = response.data.uploadsPerPage || 25\n const pages = Math.ceil(response.data.count / uploadsPerPage)\n const files = response.data.files\n if (params.pageNum && (files.length === 0)) {\n page.updateTrigger(params.trigger)\n if (params.autoPage) {\n params.pageNum = pages - 1\n return page.getUploads(params)\n } else {\n return swal('An error occurred!', `There are no more uploads to populate page ${params.pageNum + 1}.`, 'error')\n }\n }\n\n page.currentView = params.all ? 'uploadsAll' : 'uploads'\n page.cache = {}\n\n const albums = response.data.albums\n const users = response.data.users\n const basedomain = response.data.basedomain\n\n if (params.pageNum < 0) {\n params.pageNum = Math.max(0, pages + params.pageNum)\n }\n const pagination = page.paginate(response.data.count, uploadsPerPage, params.pageNum)\n\n const filter = `\n${upload.name}
\n ${showOriginalNames ? `${upload.original}
` : ''}\n${appendix}${upload.prettyBytes}
\n ${hasExpiryDateColumn && upload.prettyExpiryDate\n ? `EXP: ${upload.prettyExpiryDate}
`\n : ''}\n\n | File name | \n ${showOriginalNames ? 'Original name | ' : ''}\n ${params.all ? 'User | ' : ''}\n ${!params.all || filterAllByAlbums ? 'Album | ' : ''}\nSize | \n ${params.all ? 'IP | ' : ''}\nUpload date | \n ${hasExpiryDateColumn ? 'Expiry date | ' : ''}\n(${response.data.count} total) | \n
---|
\n
\n \n
`\n : ''}\n\"
).\n Special cases such as uploads by non-registered users or have no IPs respectively, use user:-
or ip:-
.\n\n To exclude certain users/ips while still listing every other uploads, add negation sign (-
) before the keys.\n Negation sign can also be used to exclude the special cases mentioned above (i.e. -user:-
or -ip:-
).\n\n If you know the ID of a user's album, you can list its uploads with albumid key.\n Negation sign works for this key as well.`\n : `There is only 1 filter key, namely albumid.\n This key can be specified more than once.\n Special case such as uploads with no albums, use albumid:-
.\n\n To exclude certain albums while still listing every other uploads, add negation sign (-
) before the keys.\n Negation sign can also be used to exclude the special case mentioned above (i.e. -albumid:-
).`}\n\n There are 2 range keys: date (upload date) and expiry (expiry date).\n Their format is: \"YYYY/MM/DD HH:MM:SS-YYYY/MM/DD HH:MM:SS\"
(\"from\" date and \"to\" date respectively).\n You may specify only one of the dates.\n If \"to\" date is missing, 'now' will be used. If \"from\" date is missing, 'beginning of time' will be used.\n If any of the subsequent date or time units are not specified, their first value will be used (e.g. January for month, 1 for day, and so on).\n If only time is specified, today's date will be used.\n If you do not need to specify both date and time, you may omit the double quotes.\n In conclusion, the following examples are all valid: date:\"2020/01/01 01:23-2018/01/01 06\"
, expiry:-2020/05
, date:12:34:56
.\n These keys can only be specified once each.\n\n Timezone? Feel free to query the dates with your own timezone.\n API requests to the filter endpoint will attach your browser's timezone offset, so the server will automatically calculate timezone differences.\n\n Matches can also be sorted with sort keys.\n Their formats are: sort:columnName[:d[escending]]
, where :d[escending]
is an optional tag to set the direction to descending.\n This key must be used with internal column names used in the database (id
, ${all ? 'userid' : 'albumid'}
, and so on),\n but there are 2 shortcuts available: date for timestamp
column and expiry for expirydate
column.\n This key can also be specified more than once, where their order will decide the sorting steps.\n\n Finally, there are type-is keys to refine by types.\n You can use is:image
, is:video
, and is:audio
to list images, videos, audios respectively.\n This will only use image, video and audio extensions that are whitelisted internally in the safe.\n For images and videos specifically, they will be the ones whose thumbnails can be generated by the safe.\n Negation sign works for this key as well.\n Mixing inclusion and exclusion is not allowed (i.e. is:image -is:video
, since the second key is redundant).\n\n Any leftover keywords which do not use keys (non-keyed keywords) will be matched against the matches' file names.\n Excluding certain keywords is also supported by adding negation sign before the keywords.\n\n Internal steps:\n ${all\n ? `- Query uploads passing ALL exclusion filter keys OR matching ANY filter keys, if any.\n - Refine matches`\n : '- Filter uploads'} using date key, if any.\n - Refine matches using expiry key, if any.\n - Refine matches using type-is keys, if any.\n - Refine matches using ANY non-keyed keywords, if any.\n - Filter matches using ALL exclusion non-keyed keywords, if any.\n - Sort matches using sorting keys, if any.\n\n Examples:\n ${all\n ? `- Uploads from users named \"demo\" AND/OR \"John Doe\" AND/OR non-registered users:\n user:demo user:\"John Doe\" user:-
\n - ALL uploads, but NOT the ones from user named \"demo\" AND \"John Doe\":\n -user:demo -user:\"John Doe\"
\n - Uploads from IP \"127.0.0.1\" AND which file names match \"*.rar\" OR \"*.zip\":\n ip:127.0.0.1 *.rar *.zip
\n `\n : ''}- Uploads without albums:\n albumid:-
\n - ALL uploads, but NOT the ones from album with ID 69:\n -albumid:69
\n - Uploads uploaded since \"1 June 2019 00:00:00\":\n date:2019/06
\n - Uploads uploaded between \"7 April 2020 12:00:00\" and \"7 April 2020 23:59:59\":\n date:\"2020/04/07 12-2020/04/07 23:59:59\"
\n - Uploads uploaded before \"5 February 2020 00:00:00\":\n date:-2020/02/05
\n - Uploads which file names match \"*.gz\" but NOT \"*.tar.gz\":\n *.gz -*.tar.gz
\n - Sort matches by \"size\" column in ascending and descending order respectively:\n ${all ? 'user:\"John Doe\"' : '*.txt'} sort:size
\n *.mp4 ${all ? 'user:- ' : ''}sort:size:d
\n ${!page.permissions.moderator\n ? 'Notice: Regular users may face some limitations in the amount of keys that can be used at a time.'\n : ''}\n Friendly reminder: This window can be scrolled up!\n `.trim().replace(/^\\s*/g, '').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.field,\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\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\n if (typeof params.cb === 'function') params.cb(failed)\n }).catch(page.onAxiosError)\n })\n}\n\npage.addSelectedUploadsToAlbum = () => {\n if (page.currentView !== 'uploads') return\n\n const count = page.selected[page.currentView].length\n if (!count) 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]\n .filter(id => failed.includes(id))\n } else {\n page.selected[page.currentView] = []\n }\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.
\n\n | ID | \nName | \n ${params.all ? 'User | ' : ''}\nUploads | \nSize | \nCreated at | \nZIP size | \nZIP generated at | \nPublic link | \n(${response.data.count} total) | \n
---|
Max length is ${page.albumTitleMaxLength} characters.
\nMarkdown supported. Max length is ${page.albumDescMaxLength} characters.
\nSave changes then re-open this Edit prompt to refresh this preview.
\nCurrent public link: ${albumUrlText}
\n\n | Username | \nUploads | \nUsage | \nGroup | \nRegistration date | \nLast token update | \n(${response.data.count} total) | \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 // Load last page of users list\n // eslint-disable-next-line compat/compat\n page.getUsers(Object.assign(page.views.users, {\n pageNum: -1\n }))\n }).catch(page.onAxiosError)\n })\n}\n\npage.editUser = id => {\n const user = page.cache[id]\n if (!user) return\n\n let isHigher = false\n const groupOptions = Object.keys(page.permissions).map((g, i, a) => {\n const selected = g === user.displayGroup\n if (selected) {\n isHigher = typeof a[i + 1] !== 'undefined' && page.permissions[a[i + 1]]\n }\n const disabled = !(a[i + 1] && page.permissions[a[i + 1]])\n return ``\n }).join('\\n')\n\n const isDisabledHelper = isHigher ? '' : ' disabled'\n const div = document.createElement('div')\n div.innerHTML = `\nUser ID: ${id}
\n${user.username} was renamed into: ${response.data.update.username}.
`\n autoClose = false\n displayName = response.data.update.username\n }\n\n if (response.data.update.password) {\n div.innerHTML += `\n${displayName}'s new password is:
\n${response.data.update.password}
${displayName} has been ${response.data.update.enabled ? 'enabled' : 'disabled'}!
`\n }\n\n if (!div.innerHTML) {\n div.innerHTML = `${displayName} was edited!
`\n }\n\n swal({\n title: 'Success!',\n icon: 'success',\n content: div,\n buttons: !autoClose,\n timer: autoClose ? 1500 : null\n })\n page.getUsers(page.views.users)\n }).catch(page.onAxiosError)\n })\n}\n\npage.disableUser = id => {\n const user = page.cache[id]\n if (!user || !user.enabled) return\n\n const content = document.createElement('div')\n content.innerHTML = `\nYou will be disabling a user named ${page.cache[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 }\n\n swal('Success!', `${page.cache[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[id]\n if (!user) return\n\n const content = document.createElement('div')\n content.innerHTML = `\nYou will be deleting a user named ${page.cache[id].username}.
\n
Their uploads will still 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, ONLY the user!',\n closeModal: false\n },\n purge: {\n text: 'Yes, AND their 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\n swal('Success!', `${page.cache[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(page.views.users, {\n autoPage: true\n }))\n }).catch(page.onAxiosError)\n })\n}\n\n// Roughly based on https://github.com/mayuska/pagination/blob/03cac0fb8af3a759bc1220bd3c011b67dbc5e909/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]} | \n\n |
---|