mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
fix: minor changes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Fragment } from 'react';
|
||||
import DocsGPT3 from './assets/cute_docsgpt3.svg';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
export default function Hero({
|
||||
@@ -24,10 +25,10 @@ export default function Hero({
|
||||
</div>
|
||||
<div className="grid w-full grid-cols-1 items-center gap-4 self-center text-xs sm:w-auto sm:gap-6 md:text-sm lg:grid-cols-2">
|
||||
{demos?.map(
|
||||
(demo: { header: string; query: string }) =>
|
||||
(demo: { header: string; query: string }, key: number) =>
|
||||
demo.header &&
|
||||
demo.query && (
|
||||
<>
|
||||
<Fragment key={key}>
|
||||
<button
|
||||
onClick={() => handleQuestion(demo.query)}
|
||||
className="w-full rounded-full border-2 border-silver px-6 py-4 text-left hover:border-gray-4000 dark:hover:border-gray-3000 xl:min-w-[24vw]"
|
||||
@@ -37,7 +38,7 @@ export default function Hero({
|
||||
</p>
|
||||
<span className="text-gray-400">{demo.query}</span>
|
||||
</button>
|
||||
</>
|
||||
</Fragment>
|
||||
),
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
"inputPlaceholder": "Type your message here...",
|
||||
"tagline": "DocsGPT uses GenAI, please review critial information using sources.",
|
||||
"sourceDocs": "Source Docs",
|
||||
"none":"None",
|
||||
"demo":[
|
||||
"none": "None",
|
||||
"demo": [
|
||||
{
|
||||
"header": "Learn about DocsGPT",
|
||||
"query": "What is DocsGPT?"
|
||||
@@ -55,45 +55,46 @@
|
||||
"createNew": "Create New"
|
||||
}
|
||||
},
|
||||
"modals":{
|
||||
"uploadDoc":{
|
||||
"label":"Upload New Documentation",
|
||||
"file":"From File",
|
||||
"remote":"Remote",
|
||||
"name":"Name",
|
||||
"choose":"Choose Files",
|
||||
"info":"Please upload .pdf, .txt, .rst, .docx, .md, .zip limited to 25mb",
|
||||
"uploadedFiles":"Uploaded Files",
|
||||
"cancel":"Cancel",
|
||||
"train":"Train",
|
||||
"link":"Link",
|
||||
"urlLink":"URL Link",
|
||||
"reddit":{
|
||||
"id":"Client ID",
|
||||
"secret":"Client Secret",
|
||||
"agent":"User agent",
|
||||
"searchQueries":"Search queries",
|
||||
"numberOfPosts":"Number of posts"
|
||||
"modals": {
|
||||
"uploadDoc": {
|
||||
"label": "Upload New Documentation",
|
||||
"file": "From File",
|
||||
"remote": "Remote",
|
||||
"name": "Name",
|
||||
"choose": "Choose Files",
|
||||
"info": "Please upload .pdf, .txt, .rst, .docx, .md, .zip limited to 25mb",
|
||||
"uploadedFiles": "Uploaded Files",
|
||||
"cancel": "Cancel",
|
||||
"train": "Train",
|
||||
"link": "Link",
|
||||
"urlLink": "URL Link",
|
||||
"reddit": {
|
||||
"id": "Client ID",
|
||||
"secret": "Client Secret",
|
||||
"agent": "User agent",
|
||||
"searchQueries": "Search queries",
|
||||
"numberOfPosts": "Number of posts"
|
||||
}
|
||||
},
|
||||
"createAPIKey":{
|
||||
"label":"Create New API Key",
|
||||
"apiKeyName":"API Key Name",
|
||||
"chunks":"Chunks processed per query",
|
||||
"prompt":"Select active prompt",
|
||||
"sourceDoc":"Source document",
|
||||
"create":"Create"
|
||||
"createAPIKey": {
|
||||
"label": "Create New API Key",
|
||||
"apiKeyName": "API Key Name",
|
||||
"chunks": "Chunks processed per query",
|
||||
"prompt": "Select active prompt",
|
||||
"sourceDoc": "Source document",
|
||||
"create": "Create"
|
||||
},
|
||||
"saveKey":{
|
||||
"note":"Please save your Key",
|
||||
"disclaimer":"This is the only time your key will be shown.",
|
||||
"copy":"Copy",
|
||||
"copied":"Copied",
|
||||
"confirm":"I saved the Key"
|
||||
"saveKey": {
|
||||
"note": "Please save your Key",
|
||||
"disclaimer": "This is the only time your key will be shown.",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied",
|
||||
"confirm": "I saved the Key"
|
||||
},
|
||||
"deleteConv":{
|
||||
"confirm":"Are you sure you want to delete all the conversations?",
|
||||
"delete":"Delete"
|
||||
"deleteConv": {
|
||||
"confirm": "Are you sure you want to delete all the conversations?",
|
||||
"delete": "Delete",
|
||||
"cancel":"Cancel"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"tagline": "DocsGPT utiliza GenAI, por favor revisa información crítica utilizando fuentes.",
|
||||
"sourceDocs": "Documentos Fuente",
|
||||
"none": "Nada",
|
||||
"cancel":"Cancelar",
|
||||
"demo": [
|
||||
{
|
||||
"header": "Aprende sobre DocsGPT",
|
||||
@@ -90,6 +91,10 @@
|
||||
"copy": "Copiar",
|
||||
"copied": "Copiado",
|
||||
"confirm": "He guardado la Clave"
|
||||
}
|
||||
},
|
||||
"deleteConv": {
|
||||
"confirm": "¿Está seguro de que desea eliminar todas las conversaciones?",
|
||||
"delete": "Eliminar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
interface ModalProps {
|
||||
handleSubmit: () => void;
|
||||
isCancellable: boolean;
|
||||
@@ -12,6 +12,7 @@ interface ModalProps {
|
||||
}
|
||||
|
||||
const Modal = (props: ModalProps) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div
|
||||
className={`${
|
||||
@@ -32,7 +33,7 @@ const Modal = (props: ModalProps) => {
|
||||
onClick={() => props.handleCancel && props.handleCancel()}
|
||||
className="cursor-pointer rounded-3xl px-5 py-2 text-sm font-medium hover:bg-gray-100 dark:bg-transparent dark:text-light-gray dark:hover:bg-[#767183]/50"
|
||||
>
|
||||
Cancel
|
||||
{t('cancel')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -43,7 +43,9 @@ const General: React.FC = () => {
|
||||
const dispatch = useDispatch();
|
||||
const locale = localStorage.getItem('docsgpt-locale');
|
||||
const [selectedLanguage, setSelectedLanguage] = React.useState(
|
||||
locale ? languageOptions.find((option) => option.value === locale) : 'en',
|
||||
locale
|
||||
? languageOptions.find((option) => option.value === locale)
|
||||
: languageOptions[0],
|
||||
);
|
||||
const selectedPrompt = useSelector(selectPrompt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user