Add Delete to Album View

QOL change.
This commit is contained in:
Nadya 2018-05-12 19:17:21 -07:00 committed by GitHub
parent 7f488f0ac9
commit 92efc7bf17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,7 @@ panel.getUploads = function(album = undefined, page = undefined){
var div = document.createElement('div'); var div = document.createElement('div');
div.className = "column is-2"; div.className = "column is-2";
if(item.thumb !== undefined) if(item.thumb !== undefined)
div.innerHTML = `<a href="${item.file}" target="_blank"><img src="${item.thumb}"/></a>`; div.innerHTML = `<a href="${item.file}" target="_blank"><img src="${item.thumb}"/></a> <a class="button is-small is-danger is-outlined" title="Delete album" onclick="panel.deleteFile(${item.id})"><span class="icon is-small"><i class="fa fa-trash-o"></i></span></a>`;
else else
div.innerHTML = `<a href="${item.file}" target="_blank"><h1 class="title">.${item.file.split('.').pop()}</h1></a>`; div.innerHTML = `<a href="${item.file}" target="_blank"><h1 class="title">.${item.file.split('.').pop()}</h1></a>`;
table.appendChild(div); table.appendChild(div);