fix: layout alignment (#1779)

This commit is contained in:
Priyash 2024-07-19 22:21:18 +05:30 • committed by GitHub
parent f5d687f23e
commit 6e8fc1247c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 26 additions and 45 deletions

View file

@ -36,6 +36,17 @@ const FOOTER_HEIGHT = "1.8em";
const LayoutTopDiv = styled(CustomScrollbarDiv)`
height: 100%;
border-radius: ${defaultBorderRadius};
position: relative;
&::after {
position: absolute;
content: "";
width: 100%;
height: 1px;
background-color: rgba(136, 136, 136, 0.3);
top: 0;
left: 0;
}
`;
const BottomMessageDiv = styled.div<{ displayOnBottom: boolean }>`
@ -66,7 +77,8 @@ const Footer = styled.footer`
height: ${FOOTER_HEIGHT};
background-color: transparent;
backdrop-filter: blur(12px);
border-top: 1px solid rgba(136, 136, 136, 0.3);
border-bottom: 1px solid rgba(136, 136, 136, 0.3);
overflow: hidden;
`;

View file

@ -1,34 +0,0 @@
import styled, { css, keyframes } from "styled-components";
const DEFAULT_DIAMETER = 6;
const blink = keyframes`
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
opacity: 0.25;
}
`;
const blinkAnimation = css`
animation: ${blink} 3s infinite;
`;
const BlinkingDot = styled.div<{
color: string;
diameter?: number;
shouldBlink?: boolean;
}>`
background-color: ${(props) => props.color};
box-shadow: 0px 0px 2px 1px ${(props) => props.color};
width: ${(props) => props.diameter ?? DEFAULT_DIAMETER}px;
height: ${(props) => props.diameter ?? DEFAULT_DIAMETER}px;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255, 0.75);
margin: 0 2px;
${(props) => (props.shouldBlink ?? false) && blinkAnimation};
`;
export default BlinkingDot;

View file

@ -27,7 +27,7 @@ const StatusDot = styled.div<{
height: ${(props) => props.diameter ?? DEFAULT_DIAMETER}px;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255, 0.75);
margin: 0 2px;
margin: 0 4px 0 8px;
${(props) => (props.shouldBlink ?? false) && blinkAnimation};
`;

View file

@ -151,7 +151,7 @@ function InputToolbar(props: InputToolbarProps) {
⏎ Enter
</EnterButton>
</span>
<span className="flex flex-wrap-reverse items-center whitespace-nowrap">
<span className="flex flex-wrap-reverse gap-1 items-center whitespace-nowrap">
<ModelSelect />
<span
style={{
@ -171,7 +171,7 @@ function InputToolbar(props: InputToolbarProps) {
defaultModel.title,
) && (
<span
className="ml-1.5 mt-0.5"
className="ml-1 mt-0.5"
onMouseLeave={() => setFileSelectHovered(false)}
onMouseEnter={() => setFileSelectHovered(true)}
>

View file

@ -28,10 +28,10 @@ import ConfirmationDialog from "../dialogs/ConfirmationDialog";
const StyledListboxButton = styled(Listbox.Button)`
display: flex;
align-items: center;
gap: 4px;
gap: 2px;
border: none;
cursor: pointer;
font-size: ${() => `${getFontSize() - 4}px`};
font-size: ${() => `${getFontSize() - 3}px`};
background: transparent;
color: ${() => lightGray};
&:focus {
@ -212,11 +212,14 @@ function ModelSelect() {
}}
>
<div className="relative">
<StyledListboxButton className="h-[18px] overflow-hidden">
<StyledListboxButton
className="h-[18px] overflow-hidden"
style={{ padding: 0 }}
>
<div>{modelSelectTitle(defaultModel) || "Select model"}</div>
<div className="pointer-events-none flex items-center">
<ChevronDownIcon
className="h-2.5 w-2.5 text-gray-400"
className="h-2.5 w-2.5"
aria-hidden="true"
/>
</div>

View file

@ -108,9 +108,9 @@ const StepsDiv = styled.div`
const NewSessionButton = styled.div`
width: fit-content;
margin-right: auto;
margin-left: 8px;
margin-top: 4px;
margin-left: 6px;
margin-top: 2px;
margin-bottom: 8px;
font-size: ${getFontSize() - 2}px;
border-radius: ${defaultBorderRadius};