diff --git a/.gitignore b/.gitignore index 74524a9..253262c 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,8 @@ bower_components psd thumb -sketch \ No newline at end of file +sketch + +### modules ### +yarn.lock +package-lock.json \ No newline at end of file diff --git a/cryptide_project/src/Components/ProfilePDP.tsx b/cryptide_project/src/Components/ProfilePDP.tsx new file mode 100644 index 0000000..23105e1 --- /dev/null +++ b/cryptide_project/src/Components/ProfilePDP.tsx @@ -0,0 +1,41 @@ +import React, { useState } from 'react'; +import '../Pages/Profile.css' +import dl from '../res/icon/download.png' +import defaultImg from '../res/img/Person.png' + +const ProfilePDP = () => { + const [selectedFile, setSelectedFile] = useState(null); + + // @ts-ignore + const handleFileChange = (event) => { + let file = event.target.files[0]; + // Validez la taille, le format, etc. + // if (file == null){ + // file = defaultImg; + // } + setSelectedFile(file); + }; + + return ( +
+ {selectedFile && ( +
+ {/* @ts-ignore */} + {/*

Selected File: {selectedFile.name}

*/} + Preview +
+ )} +
+
+ upload + {/*
Cliquer ici pour ajouter une image
*/} +

Taille recommandée : 100px

+ +
+
+ {/* */} +
+ ); +}; + +export default ProfilePDP; diff --git a/cryptide_project/src/Pages/Profile.css b/cryptide_project/src/Pages/Profile.css new file mode 100644 index 0000000..65f032d --- /dev/null +++ b/cryptide_project/src/Pages/Profile.css @@ -0,0 +1,63 @@ +.mainContainer{ + display: flex; + justify-content: center; + align-items: center; + margin: 50px; +} + +.mainPDPContainer{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border: 2px solid whitesmoke; + border-radius: 15px; + + background-color: white; + + margin: 10px; +} + +.imgContainer{ + border: 5px solid black; + border-radius: 50px; + margin: 15px; +} + + + +/*File upload*/ +.parent { + /* width: 250px; */ + /* margin: auto; */ + margin: 2rem; + background: #ffffff; + border-radius: 25px; + /* box-shadow: 7px 20px 20px rgb(210, 227, 244); */ +} +.file-upload { + text-align: center; + border: 3px dashed rgb(210, 227, 244); + /* padding: 1.5rem; */ + position: relative; + cursor: pointer; + max-width: 100px; + max-height: 50px; +} +.file-upload p { + font-size: 0.5rem; + /* margin-top: 10px; */ + color: #bbcada; +} +.file-upload input { + display: block; + height: 100%; + width: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + opacity: 0; + cursor: pointer; +} \ No newline at end of file diff --git a/cryptide_project/src/Pages/Profile.tsx b/cryptide_project/src/Pages/Profile.tsx index 521209b..023a373 100644 --- a/cryptide_project/src/Pages/Profile.tsx +++ b/cryptide_project/src/Pages/Profile.tsx @@ -1,25 +1,12 @@ import React, { useState } from 'react'; +import ProfilePDP from '../Components/ProfilePDP'; -const ProfilePictureUploader = () => { - const [selectedFile, setSelectedFile] = useState(null); - - // @ts-ignore - const handleFileChange = (event) => { - const file = event.target.files[0]; - // Validez la taille, le format, etc. - setSelectedFile(file); - }; +import './Profile.css' +const ProfilePictureUploader = () => { return ( -
- - {selectedFile && ( -
- {/* @ts-ignore */} -

Selected File: {selectedFile.name}

- Preview -
- )} +
+
); }; diff --git a/cryptide_project/src/server/db/socialgraph.db b/cryptide_project/src/server/db/socialgraph.db index fda2b9c..d53b462 100644 Binary files a/cryptide_project/src/server/db/socialgraph.db and b/cryptide_project/src/server/db/socialgraph.db differ