Enhance button styles, add loading animation for generate button, and update cancel button appearance

This commit is contained in:
remsky 2025-02-05 23:00:19 -07:00
parent 212c8426e1
commit 3ee43cea23
3 changed files with 77 additions and 4 deletions

View file

@ -111,7 +111,7 @@
<option value="pcm">PCM</option> <option value="pcm">PCM</option>
</select> </select>
</div> </div>
<button id="cancel-btn" class="cancel-btn" style="display: none;"> <button id="cancel-btn" class="player-btn cancel" style="display: none;">
Cancel Cancel
</button> </button>
</div> </div>

View file

@ -328,6 +328,66 @@
color: var(--text); color: var(--text);
} }
/* Loading Animation */
.loader {
display: none;
width: 24px;
height: 24px;
position: absolute;
}
.loader::before,
.loader::after {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
border: 2px solid transparent;
}
.loader::before {
border-top-color: var(--text);
animation: spin 1s linear infinite;
}
.loader::after {
border-bottom-color: var(--fg-color);
animation: spin 1.5s linear infinite reverse;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
#generate-btn {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
#generate-btn.loading .btn-text {
visibility: hidden;
}
#generate-btn.loading .loader {
display: block;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}
#generate-btn.loading .loader::before {
animation: spin 1s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
}
#generate-btn.loading .loader::after {
animation: spin 1.5s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite reverse;
}
/* Responsive Styles */ /* Responsive Styles */
@media (max-width: 768px) { @media (max-width: 768px) {
.voice-options { .voice-options {

View file

@ -187,6 +187,18 @@
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
} }
/* Cancel Button Styles */
.player-btn.cancel {
background: #976161;
color: #070707;
border: 1px solid #ffb3b3;
}
.player-btn.cancel:hover {
background: #ffbaba;
box-shadow: 0 4px 12px rgba(255, 87, 87, 0.2);
}
.wave-container { .wave-container {
width: 100%; width: 100%;
height: 60px; height: 60px;
@ -210,7 +222,7 @@
} }
.download-button { .download-button {
top: 0.5rem; bottom: 0.5rem;
right: 0.5rem; right: 0.5rem;
width: 26px; width: 26px;
height: 26px; height: 26px;
@ -357,7 +369,7 @@
.download-button { .download-button {
position: absolute; position: absolute;
top: 0.75rem; bottom: 0.75rem;
right: 0.75rem; right: 0.75rem;
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -368,6 +380,7 @@
transition: transform 0.2s ease; transition: transform 0.2s ease;
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
z-index: 10;
} }
.download-button.ready { .download-button.ready {
@ -381,7 +394,7 @@
background: conic-gradient( background: conic-gradient(
from 0deg, from 0deg,
var(--fg-color), var(--fg-color),
var(--success), #6366f1,
var(--fg-color) var(--fg-color)
); );
border-radius: 4px; border-radius: 4px;