mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
Dependency Updates
This commit is contained in:
parent
63146aa9b7
commit
8b7191ac26
5 changed files with 38 additions and 5 deletions
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
__pycache__
|
||||
__pycache__/
|
||||
.__pycache__
|
||||
|
|
@ -5,4 +5,11 @@ python-jose
|
|||
python-multipart
|
||||
SQLAlchemy
|
||||
uvicorn
|
||||
passlib
|
||||
passlib
|
||||
langchain
|
||||
langchain-core
|
||||
langchain-community
|
||||
langchain-experimental
|
||||
langchain_openai
|
||||
psycopg2
|
||||
neo4j
|
||||
9
web/.env.example
Normal file
9
web/.env.example
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# YOUR SURFDENSE BACKEND API SECRET KEY
|
||||
NEXT_PUBLIC_API_SECRET_KEY="ANY STRING VALUE MAKE SURE IT MACHES THE VALUE IN BACKEND"
|
||||
|
||||
#YOUR SURFSENSE BACKEND URL
|
||||
NEXT_PUBLIC_BACKEND_URL="http://localhost:8000"
|
||||
|
||||
# Recaptcha v2 to prevent Registration spam
|
||||
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=""
|
||||
RECAPTCHA_SECRET_KEY=""
|
||||
|
|
@ -102,7 +102,7 @@ function ProtectedPage() {
|
|||
}),
|
||||
};
|
||||
|
||||
fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL!}`, requestOptions)
|
||||
fetch(`${process.env.NEXT_PUBLIC_BACKEND_URL!}/`, requestOptions)
|
||||
.then(res=>res.json())
|
||||
.then(data=> {
|
||||
let cur = currentChat;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ export const RegisterForm = () => {
|
|||
|
||||
const validateForm = () => {
|
||||
if (!username || !password || !confpassword) {
|
||||
if(password !== confpassword){
|
||||
setError('Password and Confirm Password doesnt match');
|
||||
return false;
|
||||
}
|
||||
setError('Username and password are required');
|
||||
return false;
|
||||
}
|
||||
|
|
@ -65,6 +69,7 @@ export const RegisterForm = () => {
|
|||
}
|
||||
|
||||
} else {
|
||||
setLoading(false);
|
||||
setError('Recaptcha Failed');
|
||||
}
|
||||
}
|
||||
|
|
@ -82,9 +87,9 @@ export const RegisterForm = () => {
|
|||
</h1>
|
||||
<form className="space-y-4 md:space-y-6" onSubmit={handleSubmit}>
|
||||
<div>
|
||||
<label className="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your email</label>
|
||||
<label className="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Username</label>
|
||||
<input value={username}
|
||||
onChange={(e) => setUsername(e.target.value)} type="username" name="username" id="username" className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="name@company.com" />
|
||||
onChange={(e) => setUsername(e.target.value)} type="username" name="username" id="username" className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="username" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Password</label>
|
||||
|
|
@ -95,7 +100,7 @@ export const RegisterForm = () => {
|
|||
<label className="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Confirm password</label>
|
||||
<input value={confpassword}
|
||||
onChange={(e) => setConfPassword(e.target.value)}
|
||||
type="confirm-password" name="confpassword" id="confpassword" placeholder="••••••••" className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" />
|
||||
type="password" name="confpassword" id="confpassword" placeholder="••••••••" className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" />
|
||||
</div>
|
||||
<ReCAPTCHA sitekey={process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY!} className="mx-auto" onChange={setCaptcha} />
|
||||
<button type="submit" className="mt-4 w-full text-white bg-primary-600 hover:bg-primary-700 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"> {loading ? 'Creating...' : 'Create Account'}</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue