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

feat: add 2 save buttons on Brain management tab #1039

Merged
merged 2 commits into from
Aug 25, 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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
paidModels,
} from "@/lib/context/BrainConfigProvider/types";
import { defineMaxTokens } from "@/lib/helpers/defineMaxTokens";
import { SaveButton } from "@/shared/SaveButton";

import { PublicPrompts } from "./components/PublicPrompts/PublicPrompts";
import { useSettingsTab } from "./hooks/useSettingsTab";
Expand Down Expand Up @@ -54,7 +55,7 @@ export const SettingsTab = ({ brainId }: SettingsTabProps): JSX.Element => {
<div className="flex flex-row flex-1 justify-between w-full">
<div>
<Field
label={ t("brainName", { ns: "brain" })}
label={t("brainName", { ns: "brain" })}
placeholder={t("brainNamePlaceholder", { ns: "brain" })}
autoComplete="off"
className="flex-1"
Expand Down Expand Up @@ -140,6 +141,9 @@ export const SettingsTab = ({ brainId }: SettingsTabProps): JSX.Element => {
{...register("maxTokens")}
/>
</fieldset>
<div className="flex w-full justify-end py-4">
<SaveButton handleSubmit={handleSubmit} />
</div>
<Divider text={t("customPromptSection", { ns: "config" })} />
<PublicPrompts onSelect={pickPublicPrompt} />
<Field
Expand All @@ -156,6 +160,9 @@ export const SettingsTab = ({ brainId }: SettingsTabProps): JSX.Element => {
className="flex-1"
{...register("prompt.content")}
/>
<div className="flex w-full justify-end py-4">
<SaveButton handleSubmit={handleSubmit} />
</div>
{promptId !== "" && (
<Button disabled={isUpdating} onClick={() => void removeBrainPrompt()}>
{t("removePrompt", { ns: "config" })}
Expand Down
93 changes: 47 additions & 46 deletions frontend/public/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
{
"lang": "en-US",
"title": "Quivr - Get a Second Brain with Generative AI",
"title.short": "Get a Second Brain with",
"description": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.",
"getStarted": "Get Started",
"features": "Features",
"two_brains_title": "Two brains is better than one",
"two_brains_desc": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.",
"any_kind_of_data_title": "Store any kind of data",
"any_kind_of_data_desc": "Quivr can handle almost any type of data you throw at it. Text, images, code snippets, we've got you covered.",
"fast_and_accurate_title": "Get a Fast and Consistent Brain",
"fast_and_accurate_desc": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.",
"fast_and_efficient_title": "Fast and Efficient",
"fast_and_efficient_desc": "Designed with speed and efficiency at its core. Quivr ensures rapid access to your data.",
"secure_title": "Secure",
"secure_desc": "Your data, your control. Always.",
"open_source_title": "Open source",
"open_source_desc": "Freedom is beautiful, so is Quivr. Open source and free to use.",
"toastDismiss": "dismiss",
"email": "Email",
"password": "Password",
"or": "or",
"loginButton": "Login",
"signUpButton": "Sign up",
"logoutButton": "Logout",
"updateButton": "Update",
"uploadButton": "Upload",
"uploadingButton": "Uploading...",
"crawlButton": "Crawl",
"chatButton": "Chat",
"deleteButton": "Delete",
"deleteForeverButton": "Delete forever",
"doneButton": "Done",
"resetButton": "Reset",
"newChatButton": "New Chat",
"createButton": "Create",
"shareButton": "Share",
"Upload": "Upload",
"Chat": "Chat",
"Explore": "Explore",
"loading": "Loading...",
"comingSoon": "Coming soon",
"Viewer": "Viewer",
"Editor": "Editor",
"Owner": "Owner"
}
"lang": "en-US",
"title": "Quivr - Get a Second Brain with Generative AI",
"title.short": "Get a Second Brain with",
"description": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.",
"getStarted": "Get Started",
"features": "Features",
"two_brains_title": "Two brains is better than one",
"two_brains_desc": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.",
"any_kind_of_data_title": "Store any kind of data",
"any_kind_of_data_desc": "Quivr can handle almost any type of data you throw at it. Text, images, code snippets, we've got you covered.",
"fast_and_accurate_title": "Get a Fast and Consistent Brain",
"fast_and_accurate_desc": "Quivr is your second brain in the cloud, designed to easily store and retrieve unstructured information.",
"fast_and_efficient_title": "Fast and Efficient",
"fast_and_efficient_desc": "Designed with speed and efficiency at its core. Quivr ensures rapid access to your data.",
"secure_title": "Secure",
"secure_desc": "Your data, your control. Always.",
"open_source_title": "Open source",
"open_source_desc": "Freedom is beautiful, so is Quivr. Open source and free to use.",
"toastDismiss": "dismiss",
"email": "Email",
"password": "Password",
"or": "or",
"loginButton": "Login",
"signUpButton": "Sign up",
"logoutButton": "Logout",
"updateButton": "Update",
"uploadButton": "Upload",
"uploadingButton": "Uploading...",
"crawlButton": "Crawl",
"chatButton": "Chat",
"deleteButton": "Delete",
"deleteForeverButton": "Delete forever",
"doneButton": "Done",
"resetButton": "Reset",
"newChatButton": "New Chat",
"createButton": "Create",
"shareButton": "Share",
"Upload": "Upload",
"Chat": "Chat",
"Explore": "Explore",
"loading": "Loading...",
"comingSoon": "Coming soon",
"Viewer": "Viewer",
"Editor": "Editor",
"Owner": "Owner",
"saveButton": "Save"
}
93 changes: 47 additions & 46 deletions frontend/public/locales/es/translation.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
{
"any_kind_of_data_desc": "Quivr puede gestionar casi cualquier tipo de dato que le brindes. Texto, imagen, fragmentos de código, te tenemos cubierto.",
"any_kind_of_data_title": "Almacena cualquier tipo de dato",
"Chat": "Conversar",
"chatButton": "Conversar",
"comingSoon": "Próximamente",
"crawlButton": "Rastrear",
"createButton": "Crear",
"deleteButton": "Borrar",
"deleteForeverButton": "Borrar para siempre",
"description": "Quivr es tu segundo cerebro en la nube, diseñado para facilitar el almacenamiento y obtención de información inestructurada.",
"doneButton": "Listo",
"Editor": "Editor",
"email": "Correo electrónico",
"Explore": "Explorar",
"fast_and_accurate_desc": "Quivr es tu segundo cerebro en la nube, diseñado para almacenar y obtener información inestructurada.",
"fast_and_accurate_title": "Obtén un Cerebro rápido y consistente",
"fast_and_efficient_desc": "Diseñado con velocidad y eficiciencia como base. Quivr asegura rápido acceso a tus datos.",
"fast_and_efficient_title": "Rápido y eficiente",
"features": "Características",
"getStarted": "Empezar a usar",
"lang": "es-ES",
"loading": "Cargando...",
"loginButton": "Iniciar sesión",
"logoutButton": "Cerrar sesión",
"newChatButton": "Nueva conversación",
"open_source_desc": "La libertad es hermosa, al igual que Quivr. Código abierto y de uso gratuito.",
"open_source_title": "Open source",
"or": "o",
"Owner": "Propietario",
"password": "Contraseña",
"resetButton": "Restaurar",
"secure_desc": "Tú controlas tus datos. Siempre.",
"secure_title": "Seguro",
"shareButton": "Compartir",
"signUpButton": "Registrarse",
"title": "Quivr - Tu segundo cerebro con IA generativa",
"title.short": "Obtén un Segundo Cerebro con",
"toastDismiss": "cerrar",
"two_brains_desc": "Quivr es tu segundo cerebro en la nube, diseñado para almacenar y obtener información inestructurada.",
"two_brains_title": "Dos cerebros son mejores que uno",
"updateButton": "Actualizar",
"Upload": "Subir",
"uploadButton": "Subir",
"uploadingButton": "Subiendo...",
"Viewer": "Espectador"
}
"any_kind_of_data_desc": "Quivr puede gestionar casi cualquier tipo de dato que le brindes. Texto, imagen, fragmentos de código, te tenemos cubierto.",
"any_kind_of_data_title": "Almacena cualquier tipo de dato",
"Chat": "Conversar",
"chatButton": "Conversar",
"comingSoon": "Próximamente",
"crawlButton": "Rastrear",
"createButton": "Crear",
"deleteButton": "Borrar",
"deleteForeverButton": "Borrar para siempre",
"description": "Quivr es tu segundo cerebro en la nube, diseñado para facilitar el almacenamiento y obtención de información inestructurada.",
"doneButton": "Listo",
"Editor": "Editor",
"email": "Correo electrónico",
"Explore": "Explorar",
"fast_and_accurate_desc": "Quivr es tu segundo cerebro en la nube, diseñado para almacenar y obtener información inestructurada.",
"fast_and_accurate_title": "Obtén un Cerebro rápido y consistente",
"fast_and_efficient_desc": "Diseñado con velocidad y eficiciencia como base. Quivr asegura rápido acceso a tus datos.",
"fast_and_efficient_title": "Rápido y eficiente",
"features": "Características",
"getStarted": "Empezar a usar",
"lang": "es-ES",
"loading": "Cargando...",
"loginButton": "Iniciar sesión",
"logoutButton": "Cerrar sesión",
"newChatButton": "Nueva conversación",
"open_source_desc": "La libertad es hermosa, al igual que Quivr. Código abierto y de uso gratuito.",
"open_source_title": "Open source",
"or": "o",
"Owner": "Propietario",
"password": "Contraseña",
"resetButton": "Restaurar",
"secure_desc": "Tú controlas tus datos. Siempre.",
"secure_title": "Seguro",
"shareButton": "Compartir",
"signUpButton": "Registrarse",
"title": "Quivr - Tu segundo cerebro con IA generativa",
"title.short": "Obtén un Segundo Cerebro con",
"toastDismiss": "cerrar",
"two_brains_desc": "Quivr es tu segundo cerebro en la nube, diseñado para almacenar y obtener información inestructurada.",
"two_brains_title": "Dos cerebros son mejores que uno",
"updateButton": "Actualizar",
"Upload": "Subir",
"uploadButton": "Subir",
"uploadingButton": "Subiendo...",
"Viewer": "Espectador",
"saveButton": "Guardar"
}
93 changes: 47 additions & 46 deletions frontend/public/locales/fr/translation.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
{
"lang": "fr-FR",
"title": "Quivr - Obtenez un deuxième cerveau avec l'IA générative",
"title.short": "Obtenez un deuxième cerveau avec",
"description": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.",
"getStarted": "Commencer",
"features": "Fonctionnalités",
"two_brains_title": "Deux cerveaux valent mieux qu'un",
"two_brains_desc": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.",
"any_kind_of_data_title": "Stockez n'importe quel type de données",
"any_kind_of_data_desc": "Quivr peut gérer presque n'importe quel type de données que vous lui donnez. Texte, images, extraits de code, nous avons ce qu'il vous faut.",
"fast_and_accurate_title": "Obtenez un cerveau rapide et cohérent",
"fast_and_accurate_desc": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.",
"fast_and_efficient_title": "Rapide et efficace",
"fast_and_efficient_desc": "Conçu avec la rapidité et l'efficacité à son cœur. Quivr assure un accès rapide à vos données.",
"secure_title": "Sécurisé",
"secure_desc": "Vos données, votre contrôle. Toujours.",
"open_source_title": "Open source",
"open_source_desc": "La liberté est belle, tout comme Quivr. Open source et gratuit à utiliser.",
"toastDismiss": "ignorer",
"email": "Email",
"password": "Mot de passe",
"or": "ou",
"loginButton": "Connexion",
"signUpButton": "S'inscrire",
"logoutButton": "Déconnexion",
"updateButton": "Mettre à jour",
"uploadButton": "Télécharger",
"uploadingButton": "Téléchargement...",
"crawlButton": "Explorer",
"chatButton": "Chat",
"deleteButton": "Supprimer",
"deleteForeverButton": "Supprimer définitivement",
"doneButton": "Fait",
"resetButton": "Réinitialiser",
"newChatButton": "Nouveau chat",
"createButton": "Créer",
"shareButton": "Partager",
"Upload": "Télécharger",
"Chat": "Chat",
"Explore": "Explorer",
"loading": "Chargement...",
"comingSoon": "Bientôt disponible",
"Viewer": "Visualiseur",
"Editor": "Éditeur",
"Owner": "Propriétaire"
}
"lang": "fr-FR",
"title": "Quivr - Obtenez un deuxième cerveau avec l'IA générative",
"title.short": "Obtenez un deuxième cerveau avec",
"description": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.",
"getStarted": "Commencer",
"features": "Fonctionnalités",
"two_brains_title": "Deux cerveaux valent mieux qu'un",
"two_brains_desc": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.",
"any_kind_of_data_title": "Stockez n'importe quel type de données",
"any_kind_of_data_desc": "Quivr peut gérer presque n'importe quel type de données que vous lui donnez. Texte, images, extraits de code, nous avons ce qu'il vous faut.",
"fast_and_accurate_title": "Obtenez un cerveau rapide et cohérent",
"fast_and_accurate_desc": "Quivr est votre deuxième cerveau dans le nuage, conçu pour stocker et récupérer facilement des informations non structurées.",
"fast_and_efficient_title": "Rapide et efficace",
"fast_and_efficient_desc": "Conçu avec la rapidité et l'efficacité à son cœur. Quivr assure un accès rapide à vos données.",
"secure_title": "Sécurisé",
"secure_desc": "Vos données, votre contrôle. Toujours.",
"open_source_title": "Open source",
"open_source_desc": "La liberté est belle, tout comme Quivr. Open source et gratuit à utiliser.",
"toastDismiss": "ignorer",
"email": "Email",
"password": "Mot de passe",
"or": "ou",
"loginButton": "Connexion",
"signUpButton": "S'inscrire",
"logoutButton": "Déconnexion",
"updateButton": "Mettre à jour",
"uploadButton": "Télécharger",
"uploadingButton": "Téléchargement...",
"crawlButton": "Explorer",
"chatButton": "Chat",
"deleteButton": "Supprimer",
"deleteForeverButton": "Supprimer définitivement",
"doneButton": "Fait",
"resetButton": "Réinitialiser",
"newChatButton": "Nouveau chat",
"createButton": "Créer",
"shareButton": "Partager",
"Upload": "Télécharger",
"Chat": "Chat",
"Explore": "Explorer",
"loading": "Chargement...",
"comingSoon": "Bientôt disponible",
"Viewer": "Visualiseur",
"Editor": "Éditeur",
"Owner": "Propriétaire",
"saveButton": "Sauvegarder"
}
Loading
Loading