дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 01:31:41 +02:00
fix(agents): render the composer stop button without a secondary border (#7682)
While an agent runs with an empty draft, the composer's submit button turns into Stop but kept the secondary variant, wrapping the outlined stop icon in a bordered box and shrinking it to 14px. The Stop state is now frameless at rest with toolbar hover/pressed backgrounds and the 16px stop icon, like the composer's other toolbar buttons and the IDE's Run/Debug stop buttons.
Цей коміт міститься в:
1 джерело
87b659b3ac
коміт
00aef16862
3 files changed
+46
-2
No files matched your search
@@ -9,3 +9,16 @@
|
||||
color: var(--fg-faint);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.submit.stop {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.submit.stop:not(:disabled):hover {
|
||||
background: var(--bg-toolbar-hover);
|
||||
}
|
||||
|
||||
.submit.stop:not(:disabled):active {
|
||||
background: var(--bg-toolbar-pressed);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import clsx from "clsx";
|
||||
import { useTx } from "@/platform/i18n";
|
||||
import { Button, Icon, Spinner, tooltipAttrs, type ButtonProps } from "@/ui";
|
||||
import styles from "./SubmitButton.module.css";
|
||||
@@ -13,16 +14,17 @@ export function SubmitButton({
|
||||
}) {
|
||||
const tx = useTx();
|
||||
const name = tx(label);
|
||||
const stop = label === "Stop";
|
||||
return (
|
||||
<Button
|
||||
{...props}
|
||||
variant={variant}
|
||||
size="small"
|
||||
className={styles.submit}
|
||||
className={clsx(styles.submit, stop && styles.stop)}
|
||||
aria-label={name}
|
||||
{...tooltipAttrs(name)}
|
||||
>
|
||||
{pending ? <Spinner size={12} /> : <Icon name={label === "Stop" ? "stop" : "arrow-up"} size={14} />}
|
||||
{pending ? <Spinner size={12} /> : <Icon name={stop ? "stop" : "arrow-up"} size={stop ? 16 : 14} />}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Заблокувати користувача