mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
A plugin command that takes seconds (an LLM call that fills the commit message) gave no sign at the button that the click was taken, and a second click started a second run. Actions may now set `indicatesRunning`: the action runner counts their in-flight runs and an IconButton bound to such an action shows a spinner, sets aria-busy and ignores clicks until the run settles. Plugin commands set it, so every toolbar slot that draws them (editor.title, mainToolbar, commit.message) is covered without a plugin API change and without features importing each other. The button stays focusable (aria-disabled, not disabled). Spinner moves to its own module so Button can use it without a cycle with Feedback, which re-exports it. Refs #2254 Co-authored-by: NguyenBang <nguyenbang@Mac.lan>
23 lines
341 B
CSS
23 lines
341 B
CSS
.spinner {
|
|
flex: none;
|
|
color: var(--fg-muted);
|
|
animation: spin 0.9s linear infinite;
|
|
}
|
|
.spokes {
|
|
animation: spin 1s steps(8, end) infinite;
|
|
}
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.spinner {
|
|
animation-duration: 2.4s;
|
|
}
|
|
.spokes {
|
|
animation: none;
|
|
}
|
|
}
|