mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Updates to the authored files page
This commit is contained in:
parent
89874fd28b
commit
b4b4ff070e
@ -2,12 +2,12 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Author Controls - {{$.User}}</title>
|
||||
<title>Author Controls - {{$.User}} - {{$.TotalUsage}}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Author Controls - {{$.User}}</h2>
|
||||
<h2>Author Controls - {{$.User}} - {{$.TotalUsage}}</h2>
|
||||
<br/>
|
||||
<h3>Wabbajack Files - {{$.TotalUsage}}</h3>
|
||||
<h3>Wabbajack Files</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>Commands</b></td>
|
||||
@ -18,7 +18,7 @@
|
||||
</tr>
|
||||
{{each $.WabbajackFiles }}
|
||||
<tr>
|
||||
<td><button>Delete</button></td>
|
||||
<td><button onclick="deleteFile('{{$.MangledName}}');">Delete</button></td>
|
||||
<td>{{$.Name}}</td>
|
||||
<td>{{$.Size}}</td>
|
||||
<td>{{$.UploadedDate}}</td>
|
||||
@ -40,7 +40,7 @@
|
||||
</tr>
|
||||
{{each $.OtherFiles }}
|
||||
<tr>
|
||||
<td><button>Delete</button></td>
|
||||
<td><button onclick="deleteFile('{{$.MangledName}}');">Delete</button></td>
|
||||
<td>{{$.Name}}</td>
|
||||
<td>{{$.Size}}</td>
|
||||
<td>{{$.UploadedDate}}</td>
|
||||
@ -50,6 +50,21 @@
|
||||
</table>
|
||||
<script lang="javascript">
|
||||
|
||||
if (!Array.prototype.last){
|
||||
Array.prototype.last = function(){
|
||||
return this[this.length - 1];
|
||||
};
|
||||
};
|
||||
|
||||
function deleteFile(mangled)
|
||||
{
|
||||
if(window.confirm("Are you sure you want to delete: " + mangled)) {
|
||||
fetch("/authored_files/"+mangled.split("_").last(), {method: "DELETE"})
|
||||
.then(r => location.reload());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user