Add running indicator

This commit is contained in:
Patrick Jentsch 2020-02-12 16:24:56 +01:00
parent 1cbea56ba9
commit 67dab88674

View File

@ -8,7 +8,20 @@
<div class="col s12 m4"> <div class="col s12 m4">
<h3 id="title">{{ job.title }}</h3> <h3 id="title">{{ job.title }}</h3>
<p id="description">{{ job.description }}</p> <p id="description">{{ job.description }}</p>
<a class="btn status waves-effect waves-light" id="status"></a> <div class="active preloader-wrapper small" id="progress-indicator">
<div class="spinner-layer spinner-blue-only">
<div class="circle-clipper left">
<div class="circle"></div>
</div>
<div class="gap-patch">
<div class="circle"></div>
</div>
<div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
<span class="chip status white-text" id="status"></span>
</div> </div>
@ -224,8 +237,11 @@
} }
setStatus(status) { setStatus(status) {
let statusElement; let progressIndicator, statusElement;
if (status === "complete") {
progressIndicator = document.getElementById("progress-indicator");
progressIndicator.classList.add("hide");
}
statusElement = document.getElementById("status"); statusElement = document.getElementById("status");
statusElement.dataset.status = status; statusElement.dataset.status = status;
} }