forked from Fediversity/Fediversity
add start of showing loading indicator on click deploy
This commit is contained in:
parent
71abfb141c
commit
ad00dcbc0f
2 changed files with 10 additions and 4 deletions
panel/src/panel
|
@ -10,9 +10,12 @@ body
|
|||
border: 5px solid #000
|
||||
border-bottom-color: #F34508
|
||||
border-radius: 50%
|
||||
display: inline-block
|
||||
box-sizing: border-box
|
||||
animation: rotation 1s linear infinite
|
||||
display: none
|
||||
|
||||
.loading
|
||||
display inline-block
|
||||
|
||||
@keyframes rotation
|
||||
0% { transform: rotate(0deg) }
|
||||
|
|
|
@ -9,15 +9,18 @@
|
|||
hx-trigger="click"
|
||||
hx-indicator="#spinner-container"
|
||||
hx-vals='{"deploy": ""}'
|
||||
hx-swap="none">
|
||||
hx-swap="none"
|
||||
.loading .loader
|
||||
hx-on:click="document.getElementById('spinner').classList.add('loading')"
|
||||
>
|
||||
Deploy
|
||||
<span class="htmx-indicator loader"></span>
|
||||
</button>
|
||||
|
||||
<button class="button" type="submit" name="save">Save</button>
|
||||
|
||||
<div id="spinner-container" class="htmx-indicator">
|
||||
<span class="loader"></span>
|
||||
<div id="spinner-container">
|
||||
<span id="spinner" class="loader"></span>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Reference in a new issue