Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/UI fixes and settings prep #758

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions frontend/src/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import Github from './assets/github.svg';
import Hamburger from './assets/hamburger.svg';
import Info from './assets/info.svg';
import SettingGear from './assets/settingGear.svg';
import Key from './assets/key.svg';
import Add from './assets/add.svg';
import UploadIcon from './assets/upload.svg';
import { ActiveState } from './models/misc';
Expand Down Expand Up @@ -229,7 +228,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
className={({ isActive }) =>
`${
isActive ? 'bg-gray-3000' : ''
} group my-auto mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray hover:bg-gray-3000`
} group mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border border-silver p-3 hover:border-rainy-gray hover:bg-gray-3000`
}
>
<img
Expand All @@ -241,9 +240,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
New Chat
</p>
</NavLink>
<p className="ml-6 mt-3 text-sm font-semibold">Chats</p>
{conversations && (
<div className="conversations-container max-h-[25rem] overflow-y-auto">
<p className="ml-6 mt-3 text-sm font-semibold">Chats</p>
<div className="conversations-container mb-auto max-h-[25rem] overflow-y-auto">
{conversations?.map((conversation) => (
<ConversationTile
key={conversation.id}
Expand Down Expand Up @@ -323,18 +322,6 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
</div>
<p className="ml-6 mt-3 text-sm font-semibold">Source Docs</p>
</div>
<div className="flex flex-col gap-2 border-b-2 py-2">
<div
className="my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100"
onClick={() => {
setApiKeyModalState('ACTIVE');
}}
>
<img src={Key} alt="key" className="ml-2 w-6" />
<p className="my-auto text-sm text-eerie-black">Reset Key</p>
</div>
</div>

<div className="flex flex-col gap-2 border-b-2 py-2">
<NavLink
to="/settings"
Expand All @@ -347,6 +334,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
<img src={SettingGear} alt="info" className="ml-2 w-5 opacity-60" />
<p className="my-auto text-eerie-black">Settings</p>
</NavLink>
</div>

<div className="flex flex-col gap-2 border-b-2 py-2">
<NavLink
to="/about"
className={({ isActive }) =>
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/Setting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const Setting = () => {
const General = () => {
const [theme, setTheme] = useState('Light');
const [isThemeListOpen, setIsThemeListOpen] = useState(false);
const themes = ['Light', 'Dark'];
const themes = ['Light', 'Dark (WIP)'];
const [language, setLanguage] = useState('English');
const languages = ['English', 'French'];
const languages = ['English'];
const [isLanguageListOpen, setIsLanguageListOpen] = useState(false);
return (
<>
Expand Down Expand Up @@ -165,12 +165,12 @@ const General = () => {
);
};
const Prompts = () => {
return <div>This is prompts</div>;
return <div>This is prompts WIP</div>;
};
const Documents = () => {
return <div>This is Documents</div>;
return <div>This is Documents WIP</div>;
};
const Widgets = () => {
return <div>This is widgets</div>;
return <div>This is widgets WIP</div>;
};
export default Setting;
2 changes: 1 addition & 1 deletion frontend/src/conversation/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default function Conversation() {
</div>
)}
</div>
<p className="w-[100vw] self-center bg-white p-5 text-center text-xs text-gray-595959 md:w-full">
<p className="text-gray-595959 w-[100vw] self-center bg-white p-5 text-center text-xs md:w-full">
This is a chatbot that uses the GPT-3, Faiss and LangChain to answer
questions.
</p>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ template {

/* third container laylout for Firefox */
@-moz-document url-prefix() {
.firefox{
.firefox {
padding: 32px;
}
}
Expand All @@ -377,4 +377,4 @@ template {
.firefox {
padding: 16px;
}
}
}
Loading