feat: update styling
This commit is contained in:
parent
011e2c2644
commit
ef349ecec9
3 changed files with 19 additions and 23 deletions
|
|
@ -42,13 +42,6 @@ export default function AcceptRejectAllButtons() {
|
|||
|
||||
return (
|
||||
<div className="flex justify-center gap-2 border-b border-gray-200/25 p-1 px-3">
|
||||
<button
|
||||
className="flex cursor-pointer items-center border-none bg-transparent px-2 py-1 text-xs text-gray-300 opacity-80 hover:opacity-100 hover:brightness-125"
|
||||
onClick={handleAcceptAll}
|
||||
>
|
||||
<CheckIcon className="mr-1 h-4 w-4" />
|
||||
Accept all changes
|
||||
</button>
|
||||
<button
|
||||
className="flex cursor-pointer items-center border-none bg-transparent px-2 py-1 text-xs text-gray-300 opacity-80 hover:opacity-100 hover:brightness-125"
|
||||
onClick={handleRejectAll}
|
||||
|
|
@ -56,6 +49,13 @@ export default function AcceptRejectAllButtons() {
|
|||
<XMarkIcon className="mr-1 h-4 w-4" />
|
||||
Reject all changes
|
||||
</button>
|
||||
<button
|
||||
className="flex cursor-pointer items-center border-none bg-transparent px-2 py-1 text-xs text-gray-300 opacity-80 hover:opacity-100 hover:brightness-125"
|
||||
onClick={handleAcceptAll}
|
||||
>
|
||||
<CheckIcon className="mr-1 h-4 w-4" />
|
||||
Accept all changes
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,26 +77,12 @@ function ContinueInputBox(props: ContinueInputBoxProps) {
|
|||
const [isGatheringContext, setIsGatheringContext] = useState(false);
|
||||
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
||||
|
||||
const applyStates = useSelector(
|
||||
(state: RootState) => state.uiState.applyStates,
|
||||
);
|
||||
|
||||
const isInMultifileEdit = useSelector(
|
||||
(state: RootState) => state.state.isInMultifileEdit,
|
||||
);
|
||||
|
||||
const isApplying =
|
||||
applyStates.length > 0 &&
|
||||
applyStates.some((state) => state.status === "streaming");
|
||||
|
||||
const shouldShowAcceptRejectButtons =
|
||||
props.isMainInput && isInMultifileEdit && !active && !isApplying;
|
||||
|
||||
console.log(
|
||||
`isMainInput: ${props.isMainInput} isInMultifileEdit: ${isInMultifileEdit} isApplying:${isApplying} active: ${active}`,
|
||||
);
|
||||
|
||||
console.log(applyStates);
|
||||
props.isMainInput && isInMultifileEdit && !active;
|
||||
|
||||
useWebviewListener(
|
||||
"newSessionWithPrompt",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { v4 as uuidv4 } from "uuid";
|
|||
import { defaultBorderRadius, lightGray, vscEditorBackground } from "../..";
|
||||
import { getFontSize } from "../../../util";
|
||||
import FileInfo from "./FileInfo";
|
||||
import styled from "styled-components";
|
||||
import styled, { keyframes } from "styled-components";
|
||||
import Spinner from "./Spinner";
|
||||
import ApplyActions from "./ApplyActions";
|
||||
import { ChevronDownIcon } from "@heroicons/react/24/outline";
|
||||
|
|
@ -18,12 +18,22 @@ import CopyButton from "./CopyButton";
|
|||
import { useApplyCodeBlock } from "../utils/useApplyCodeBlock";
|
||||
import GeneratingCodeLoader from "./GeneratingCodeLoader";
|
||||
|
||||
const fadeInAnimation = keyframes`
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
`;
|
||||
|
||||
const TopDiv = styled.div`
|
||||
outline: 1px solid rgba(153, 153, 152);
|
||||
outline-offset: -0.5px;
|
||||
border-radius: ${defaultBorderRadius};
|
||||
margin-bottom: 8px !important;
|
||||
background-color: ${vscEditorBackground};
|
||||
animation: ${fadeInAnimation} 300ms ease-out forwards;
|
||||
`;
|
||||
|
||||
const ToolbarDiv = styled.div<{ isExpanded: boolean }>`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue