i hate rebase
This commit is contained in:
parent
b1ef6a6b8f
commit
60f843b6d2
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,8 +1,4 @@
|
||||
*__pycache__*
|
||||
/node_modules
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
/devfolder
|
||||
.vscode
|
||||
>>>>>>> 0d9e690db10b6dfbef3d9aa4316e52d1e8cb8f6a
|
||||
.vscode
|
@ -18,18 +18,6 @@ def handle_first_launched():
|
||||
folder_path = path.join(folder_path, "Unnamed_Password_Manager")
|
||||
if not path.exists(folder_path):
|
||||
mkdir(folder_path)
|
||||
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
def favicon() -> Response:
|
||||
favicon_path: str = path.join(app.root_path, '../frontend/static', 'favicon.ico')
|
||||
return send_file(favicon_path, mimetype='image/vnd.microsoft.icon')
|
||||
|
||||
|
||||
@app.route("/index.html")
|
||||
def handle_index() -> Response:
|
||||
index_path: str = path.join(app.root_path, "../frontend/html", "index.html")
|
||||
return send_file(index_path, mimetype="text/html")
|
||||
|
||||
|
||||
@app.get("/")
|
||||
@ -466,3 +454,10 @@ class QueryHandler:
|
||||
)
|
||||
return Response(status=200)
|
||||
|
||||
import os
|
||||
from os import path
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
def favicon():
|
||||
favicon_path = os.path.join(app.root_path, 'static', 'favicon.ico')
|
||||
return send_file(favicon_path, mimetype='image/vnd.microsoft.icon')
|
@ -3,6 +3,13 @@
|
||||
<head>
|
||||
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://fonts.googleapis.com;
|
||||
font-src 'self' https://fonts.gstatic.com;
|
||||
connect-src 'self' http://127.0.0.1:5000;
|
||||
style-src 'self' https://fonts.googleapis.com 'unsafe-inline';
|
||||
script-src 'self' 'unsafe-inline';
|
||||
script-src-elem 'self' 'unsafe-inline';
|
||||
img-src 'self' http://www.google.com/s2/favicons https://t1.gstatic.com https://t0.gstatic.com https://t2.gstatic.com">
|
||||
<title>DashBoard</title>
|
||||
<link rel="stylesheet" href="../styles/dashboard.css"/>
|
||||
</head>
|
||||
@ -165,4 +172,3 @@
|
||||
<footer><p>© 2023 Password Manager</p></footer>
|
||||
|
||||
</html>
|
||||
|
||||
|
@ -3,6 +3,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://fonts.googleapis.com;
|
||||
font-src 'self' https://fonts.gstatic.com;
|
||||
connect-src 'self' http://127.0.0.1:5000;
|
||||
style-src 'self' https://fonts.googleapis.com 'unsafe-inline';">
|
||||
<meta
|
||||
http-equiv="X-Content-Security-Policy"
|
||||
content="default-src 'self'; script-src 'self'"
|
||||
/>
|
||||
<link rel="stylesheet" href="../styles/index.css"/>
|
||||
<title>Login</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
@ -24,9 +32,6 @@
|
||||
</div>
|
||||
|
||||
<div class="help">
|
||||
<div>
|
||||
<a href="" id="forgot_password">Forgot Password</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="register.html" id="register">Register</a>
|
||||
</div>
|
||||
|
@ -3,6 +3,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://fonts.googleapis.com;
|
||||
font-src 'self' https://fonts.gstatic.com;
|
||||
connect-src 'self' http://127.0.0.1:5000;
|
||||
style-src 'self' https://fonts.googleapis.com 'unsafe-inline';
|
||||
script-src 'self' 'unsafe-inline';
|
||||
script-src-elem 'self' 'unsafe-inline'">
|
||||
<link rel="stylesheet" href="../styles/register.css"/>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
|
@ -14,9 +14,11 @@
|
||||
|
||||
//-----------------------------------------------------------------------------------------(Getting Data)
|
||||
|
||||
const PORT = 5000;
|
||||
|
||||
async function getData() {
|
||||
try {
|
||||
let response = await fetch('/get_data', {
|
||||
let response = await fetch(`http://127.0.0.1:${PORT}/get_data`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
@ -223,7 +225,7 @@ const errorlabel = document.querySelector('.fieldcontainer label')
|
||||
|
||||
async function sendData(formData){
|
||||
try {
|
||||
const response = await fetch('/add_entry', {
|
||||
const response = await fetch(`http://127.0.0.1:${PORT}/add_entry`, {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
@ -401,7 +403,7 @@ async function deleteEntry() {
|
||||
const formData = new FormData()
|
||||
formData.append("entry_name", localStorage.getItem("editVal"))
|
||||
try {
|
||||
const response = await fetch('/delete_entry', {
|
||||
const response = await fetch(`http://127.0.0.1:${PORT}/delete_entry`, {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
@ -479,7 +481,7 @@ async function sendPass(password) {
|
||||
const formData = new FormData()
|
||||
formData.append("password", password)
|
||||
try {
|
||||
const response = await fetch('/change_password', {
|
||||
const response = await fetch(`http://127.0.0.1:${PORT}/change_password`, {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
@ -599,7 +601,7 @@ async function addNewField(sitename, field, value) {
|
||||
formData.append("field_value", value)
|
||||
|
||||
try {
|
||||
const response = await fetch('/add_field', {
|
||||
const response = await fetch(`http://127.0.0.1:${PORT}/add_field`, {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
@ -628,7 +630,7 @@ async function editFieldValue(sitename, field, value) {
|
||||
formData.append("field_value", value)
|
||||
|
||||
try {
|
||||
const response = await fetch('/edit_field_value', {
|
||||
const response = await fetch(`http://127.0.0.1:${PORT}/edit_field_value`, {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
@ -655,7 +657,7 @@ async function changeEntryName(entryname, sitename) {
|
||||
formData.append("new_entry_name", sitename)
|
||||
|
||||
try {
|
||||
const response = await fetch('/edit_entry_name', {
|
||||
const response = await fetch(`http://127.0.0.1:${PORT}/edit_entry_name`, {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
@ -795,7 +797,7 @@ function closePopup() {
|
||||
|
||||
async function logOut() {
|
||||
try{
|
||||
await fetch("/logout", {
|
||||
await fetch(`http://127.0.0.1:${PORT}/logout`, {
|
||||
method:'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
@ -118,5 +118,3 @@ window.onload = async function() {
|
||||
// console.error('Login Failed:', data.error)
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
const errlabel = document.getElementById('errlabel')
|
||||
|
||||
function validateRegister() {
|
||||
@ -74,4 +75,4 @@ async function Login(username,password){
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
}
|
||||
}
|
||||
}
|
36
package-lock.json
generated
36
package-lock.json
generated
@ -1,5 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
{
|
||||
"name": "unnamed-password-manager",
|
||||
"version": "1.0.0",
|
||||
@ -9,39 +7,7 @@
|
||||
"": {
|
||||
"name": "unnamed-password-manager",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5"
|
||||
}
|
||||
},
|
||||
"node_modules/cors": {
|
||||
"version": "2.8.5",
|
||||
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
||||
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
||||
"dependencies": {
|
||||
"object-assign": "^4",
|
||||
"vary": "^1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vary": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
||||
>>>>>>> b1b896f (Add api request changes)
|
||||
|
10
package.json
10
package.json
@ -1,18 +1,12 @@
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
{
|
||||
"name": "unnamed-password-manager",
|
||||
"version": "1.0.0",
|
||||
"description": "Hi",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "nodemon devfolder/app.js"
|
||||
"start": ""
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5"
|
||||
}
|
||||
"license": "ISC"
|
||||
}
|
||||
>>>>>>> b1b896f (Add api request changes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user