mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
Updates
* Fixed information of selected files being cleared when canceling either add to album or bulk delete prompt. * Add to album prompt will now show how many files are going to be moved. * Fixed bulk delete failing to reload file list properly when being used while listing an album. * Added new ESLint rule "quotes" with option "single". I'm pretty sure Standard used to have this as default. I actually liked that back then.
This commit is contained in:
parent
4217cf4b0f
commit
8f41cd6f8c
@ -54,6 +54,10 @@
|
||||
"curly": [
|
||||
"error",
|
||||
"all"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -17,7 +17,7 @@
|
||||
<script type="text/javascript" src="libs/sweetalert/sweetalert.min.js?v=8FbubjpYRC"></script>
|
||||
<script type="text/javascript" src="libs/axios/axios.min.js?v=8FbubjpYRC"></script>
|
||||
<script type="text/javascript" src="libs/clipboard.js/clipboard.min.js?v=8FbubjpYRC"></script>
|
||||
<script type="text/javascript" src="js/dashboard.js?v=RLPtEH87fK"></script>
|
||||
<script type="text/javascript" src="js/dashboard.js?v=n5WyWY93dp"></script>
|
||||
|
||||
<!-- Open Graph tags -->
|
||||
<meta property="og:type" content="website" />
|
||||
|
@ -377,7 +377,7 @@ panel.deleteFile = (id, album, page) => {
|
||||
})
|
||||
}
|
||||
|
||||
panel.deleteSelectedFiles = async (ids, album) => {
|
||||
panel.deleteSelectedFiles = async album => {
|
||||
const count = panel.selectedFiles.length
|
||||
if (!count) {
|
||||
return swal('An error occurred!', 'You have not selected any files.', 'error')
|
||||
@ -437,7 +437,8 @@ panel.addSelectedFilesToAlbum = async album => {
|
||||
}
|
||||
|
||||
const failedIds = await panel.addToAlbum(panel.selectedFiles, album)
|
||||
if (failedIds && failedIds.length) {
|
||||
if (!(failedIds instanceof Array)) { return } // TODO: Make it so that I don't have to do this
|
||||
if (failedIds.length) {
|
||||
panel.selectedFiles = panel.selectedFiles.filter(id => failedIds.includes(id))
|
||||
} else {
|
||||
panel.selectedFiles = []
|
||||
@ -446,9 +447,10 @@ panel.addSelectedFilesToAlbum = async album => {
|
||||
}
|
||||
|
||||
panel.addToAlbum = async (ids, album) => {
|
||||
const count = ids.length
|
||||
const proceed = await swal({
|
||||
title: 'Are you sure?',
|
||||
text: 'You will be able to choose an album after confirming this.',
|
||||
text: `You are about to move ${count} file${count === 1 ? '' : 's'} to an album.`,
|
||||
buttons: {
|
||||
cancel: true,
|
||||
confirm: {
|
||||
|
Loading…
Reference in New Issue
Block a user