Clear jobs
This commit is contained in:
@ -69,7 +69,7 @@
|
||||
background-color: #d32f2f;
|
||||
}
|
||||
#pause-button, #resume-button {
|
||||
background-color: #2196F3;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 10px 15px;
|
||||
@ -78,11 +78,24 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
#pause-button:hover, #resume-button:hover {
|
||||
background-color: #1976D2;
|
||||
background-color: #45a049;
|
||||
}
|
||||
#resume-button {
|
||||
display: none;
|
||||
}
|
||||
#back-button {
|
||||
background-color: #2196F3;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 10px 15px;
|
||||
margin-top: 10px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
}
|
||||
#back-button:hover {
|
||||
background-color: #1976D2;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
padding: 10px;
|
||||
@ -111,9 +124,12 @@
|
||||
</div>
|
||||
<div id="currentFile"></div>
|
||||
</div>
|
||||
<button id="abort-button" onclick="abortDownload()">Abort Download</button>
|
||||
<button id="pause-button" onclick="pauseDownload()">Pause Download</button>
|
||||
<button id="resume-button" onclick="resumeDownload()">Resume Download</button>
|
||||
<div>
|
||||
<button id="abort-button" onclick="abortDownload()">Abort Download</button>
|
||||
<button id="pause-button" onclick="pauseDownload()">Pause Download</button>
|
||||
<button id="resume-button" onclick="resumeDownload()">Resume Download</button>
|
||||
<button id="back-button" onclick="window.location.href='/'">Back to Index</button>
|
||||
</div>
|
||||
<script>
|
||||
function updateProgress() {
|
||||
fetch('/progress?filename={{.Filename}}', {
|
||||
@ -138,7 +154,7 @@
|
||||
fetch('/abort?filename={{.Filename}}', { method: 'POST' })
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
alert('Abort signal sent. The download will stop soon.');
|
||||
console.log('Abort signal sent. The download will stop soon.');
|
||||
} else {
|
||||
alert('Failed to abort the download.');
|
||||
}
|
||||
@ -149,7 +165,7 @@
|
||||
fetch('/pause?filename={{.Filename}}', { method: 'POST' })
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
alert('Pause signal sent. The download will pause soon.');
|
||||
console.log('Pause signal sent. The download will pause soon.');
|
||||
document.getElementById('pause-button').style.display = 'none';
|
||||
document.getElementById('resume-button').style.display = 'inline-block';
|
||||
} else {
|
||||
@ -162,7 +178,7 @@
|
||||
fetch('/resume?filename={{.Filename}}', { method: 'POST' })
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
alert('Resume signal sent. The download will resume soon.');
|
||||
console.log('Resume signal sent. The download will resume soon.');
|
||||
document.getElementById('resume-button').style.display = 'none';
|
||||
document.getElementById('pause-button').style.display = 'inline-block';
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user