Skip to content

Commit

Permalink
feat: update add new brain button ui
Browse files Browse the repository at this point in the history
  • Loading branch information
mamadoudicko committed Aug 29, 2023
1 parent 0ba53c9 commit cbcc8c7
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 27 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Popover } from "@draft-js-plugins/mention";
import { PopoverProps } from "@draft-js-plugins/mention/lib/MentionSuggestions/Popover";

import { AddNewBrainButton } from "./AddNewBrainButton";
import { AddBrainModal } from "@/lib/components/AddBrainModal";

export const BrainSuggestionsContainer = ({
children,
Expand All @@ -15,7 +15,7 @@ export const BrainSuggestionsContainer = ({
className="bg-white dark:bg-black border border-black/10 dark:border-white/25 rounded-md shadow-md overflow-y-auto"
>
{children}
<AddNewBrainButton />
<AddBrainModal />
</div>
</Popover>
);
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export * from "./AddNewBrainButton";
export * from "./AddNewPromptButton";
export * from "./BrainSuggestion";
export * from "./BrainSuggestionsContainer";
export * from "./PromptSuggestion";
export * from "./SuggestionRow";
6 changes: 5 additions & 1 deletion frontend/lib/components/AddBrainModal/AddBrainModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export const AddBrainModal = (): JSX.Element => {
return (
<Modal
Trigger={
<Button variant={"secondary"}>
<Button
onClick={() => void 0}
variant={"tertiary"}
className="border-0"
>
{t("newBrain", { ns: "brain" })}
<MdAdd className="text-xl" />
</Button>
Expand Down
1 change: 0 additions & 1 deletion frontend/public/locales/en/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
"empty_brain_title_suffix": "and chat with them",
"actions_bar_placeholder": "Ask a question to @brains or /files and choose your #prompt",
"missing_brain": "Please select a brain to chat with",
"new_brain": "Create new brain",
"new_prompt": "Create new prompt"
}
1 change: 0 additions & 1 deletion frontend/public/locales/es/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@
"thinking": "Pensando...",
"title": "Conversa con {{brain}}",
"missing_brain": "No hay cerebro seleccionado",
"new_brain": "Crear nuevo cerebro",
"new_prompt": "Crear nueva instrucción"
}
1 change: 0 additions & 1 deletion frontend/public/locales/fr/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@
"thinking": "Réflexion...",
"title": "Discuter avec {{brain}}",
"missing_brain": "Veuillez selectionner un cerveau pour discuter",
"new_brain": "Créer un nouveau cerveau",
"new_prompt": "Créer un nouveau prompt"
}
1 change: 0 additions & 1 deletion frontend/public/locales/pt-br/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@
"thinking": "Pensando...",
"title": "Converse com {{brain}}",
"missing_brain": "Cérebro não encontrado",
"new_brain": "Criar novo cérebro",
"new_prompt": "Criar novo prompt"
}
1 change: 0 additions & 1 deletion frontend/public/locales/ru/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@
"thinking": "Думаю...",
"title": "Чат с {{brain}}",
"missing_brain": "Мозг не найден",
"new_brain": "Создать новый мозг",
"new_prompt": "Создать новый запрос"
}
1 change: 0 additions & 1 deletion frontend/public/locales/zh-cn/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@
"empty_brain_title_suffix": "和他们聊天",
"actions_bar_placeholder": "向 @brains 或 /files 提问,并选择您的 #prompt",
"missing_brain": "请选择一个大脑进行聊天",
"new_brain": "新大脑",
"new_prompt": "新提示"
}

0 comments on commit cbcc8c7

Please sign in to comment.