-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issues: QuivrHQ/quivr#1497 QuivrHQ/quivr#1495 QuivrHQ/quivr#1506 1. feat(chatInput): increase upload button size 2. feat(brains-library): add Spinner on loading 3. feat: improve logout ux ![Screenshot 2023-10-30 at 11 48 58](https://github.com/StanGirard/quivr/assets/63923024/fb8e0848-b349-4fbd-a7a5-ff43a73ae364) https://github.com/StanGirard/quivr/assets/63923024/cbd7cd42-e58a-49fb-9867-97f19dde9270 https://github.com/StanGirard/quivr/assets/63923024/a69b6b28-1c19-43e7-a02b-1df215a34a2e
- Loading branch information
1 parent
4282285
commit d7c7f4b
Showing
16 changed files
with
90 additions
and
127 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { useTranslation } from "react-i18next"; | ||
|
||
import Button from "@/lib/components/ui/Button"; | ||
import { Modal } from "@/lib/components/ui/Modal"; | ||
|
||
import { useLogoutModal } from "./hooks/useLogoutModal"; | ||
|
||
export const LogoutModal = (): JSX.Element => { | ||
const { t } = useTranslation(["translation", "logout"]); | ||
const { | ||
handleLogout, | ||
isLoggingOut, | ||
isLogoutModalOpened, | ||
setIsLogoutModalOpened, | ||
} = useLogoutModal(); | ||
|
||
return ( | ||
<Modal | ||
Trigger={ | ||
<Button className="px-3 py-2" variant="secondary"> | ||
{t("logoutButton")} | ||
</Button> | ||
} | ||
isOpen={isLogoutModalOpened} | ||
setOpen={setIsLogoutModalOpened} | ||
CloseTrigger={<div />} | ||
> | ||
<div className="text-center flex flex-col items-center gap-5"> | ||
<h2 className="text-lg font-medium mb-5"> | ||
{t("areYouSure", { ns: "logout" })} | ||
</h2> | ||
<div className="flex gap-5 items-center justify-center"> | ||
<Button | ||
onClick={() => setIsLogoutModalOpened(false)} | ||
variant={"primary"} | ||
> | ||
{t("cancel", { ns: "logout" })} | ||
</Button> | ||
<Button | ||
isLoading={isLoggingOut} | ||
variant={"danger"} | ||
onClick={() => void handleLogout()} | ||
data-testid="logout-button" | ||
> | ||
{t("logoutButton")} | ||
</Button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import { FaSpinner } from "react-icons/fa"; | ||
|
||
const Spinner = (): JSX.Element => { | ||
return <FaSpinner className="animate-spin m-5" />; | ||
import { cn } from "@/lib/utils"; | ||
|
||
type SpinnerProps = { | ||
className?: string; | ||
}; | ||
const Spinner = ({ className }: SpinnerProps): JSX.Element => { | ||
return <FaSpinner className={cn("animate-spin m-5", className)} />; | ||
}; | ||
|
||
export default Spinner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"title": "Logout", | ||
"subtitle": "See you next time", | ||
"areYouSure": "Are you sure you want to sign out?", | ||
"cancel": "Go back", | ||
"areYouSure": "Are you sure you want to sign out ?", | ||
"cancel": "Cancel", | ||
"error": "Error on logout {{errorMessage}}", | ||
"loggedOut": "Logged out successfully" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters