This repository was archived by the owner on Jul 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
TripLife. Squad 2 #26
Open
GabyAlvarez
wants to merge
56
commits into
Laboratoria:master
Choose a base branch
from
GabyAlvarez:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
4229ced
Startup test
ElizaFlores11 de7987b
First change in all flies to test what happend when all of us want to…
DorsD c9111f4
Login page view - html, css and JS, but still all are separed from ea…
DorsD e81b889
Google implementation
ElizaFlores11 3f799bf
Implementation Facebook
ElizaFlores11 f4f8dd8
Login view, router, close sesion
DorsD f903619
Join everubody's code but there are some issues
DorsD f37fbe5
pull request for master
DorsD 84417b2
Merge pull request #3 from DorsD/snFabiola
GabyAlvarez 99b3d9e
changes in signin.js - don't duplicate user, save user with same uid
DorsD fcfda8d
Provider Update
ElizaFlores11 be96013
Merge branch 'snFabiola' into RedSocial
DorsD af34b29
Merge pull request #1 from ElizaFlores11/RedSocial
DorsD 6105b75
adding validation to form fields
fdfb88f
validation
097d972
Merge pull request #4 from DorsD/snFabiola
GabyAlvarez 8885416
merge branches
0b121fb
user and post constructors
DorsD a61a1aa
reading user name from firestore and use it in profil view
DorsD 1592c5e
post image preview with filereader, post text, image and privacy vali…
DorsD c0d543a
saving a post in firestore and storage
DorsD 334ff91
add functions to edit user profile
e0da872
adding styles to content
8b15c2a
Merge pull request #5 from GabyAlvarez/dev_contentuser_gaby
GabyAlvarez 9ee3854
create, edit and remove post before merge with Eli's branch
DorsD 8a1b358
first merge with Eli adn Gabi's branch | some bugs in content file an…
DorsD 7f9aab3
Merge branch 'master' into snFabiola
GabyAlvarez 32e61fa
Merge pull request #6 from DorsD/snFabiola
GabyAlvarez 0673b9c
add example of test
32611e6
change styles to edit profile
87ea693
change in modal style to solve some content style issues
DorsD 84d02a7
change in modal style to solve some content style issues
DorsD 4464708
styles added for profile edit view
db83107
adding predefined profile picture
3eeeb32
style issues solved
DorsD d4d2403
Merge pull request #7 from DorsD/snFabiola
GabyAlvarez 69f261a
change photo profile
c5a2d01
Conflicts have been resolved and merger continues
f9e1ed1
testing defects removed
97d613e
git commit -m
a1c412e
Update Readme.md
GabyAlvarez 42e7c3d
Update Readme.md
GabyAlvarez 5da73d9
Update Readme.md
GabyAlvarez 181b6b2
Update Readme.md
GabyAlvarez 29a44e8
Update Readme.md
GabyAlvarez f0ea7f5
adding images for readme
94473a4
Merge branch 'master' into dev_contentuser_gaby
9d7591f
Merge branch 'master' of https://github.com/GabyAlvarez/CDMX009-Socia…
6616778
Update Readme.md
GabyAlvarez b9d082a
Update Readme.md
GabyAlvarez 8862d95
Update Readme.md
GabyAlvarez eb44973
Update Readme.md
GabyAlvarez 3720ffa
Update Readme.md
GabyAlvarez 096a3af
comments were removed
66a1f92
Merge branch 'master' of https://github.com/GabyAlvarez/CDMX009-Socia…
118bf3f
Update Readme.md
GabyAlvarez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| module.exports = { | ||
| env: { | ||
| browser: true, | ||
| es6: true, | ||
| 'jest/globals': true, | ||
| }, | ||
| extends: [ | ||
| 'airbnb-base', | ||
| ], | ||
| globals: { | ||
| Atomics: 'readonly', | ||
| SharedArrayBuffer: 'readonly', | ||
| firebase: 'readonly', | ||
| }, | ||
| plugins: ['jest'], | ||
| parserOptions: { | ||
| ecmaVersion: 2018, | ||
| sourceType: 'module', | ||
| }, | ||
| rules: { | ||
| 'linebreak-style': 0, | ||
| 'prefer-destructuring': 0, | ||
| 'import/extensions': 0, | ||
| 'import/prefer-default-export': 0, | ||
| 'jest/no-disabled-tests': 'warn', | ||
| 'jest/no-focused-tests': 'error', | ||
| 'jest/no-identical-title': 'error', | ||
| 'jest/prefer-to-have-length': 'warn', | ||
| 'jest/valid-expect': 'error', | ||
| }, | ||
| }; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| [debug] [2020-04-09T23:35:22.180Z] ---------------------------------------------------------------------- | ||
| [debug] [2020-04-09T23:35:22.197Z] Command: C:\Program Files\nodejs\node.exe C:\Users\eliza\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js init | ||
| [debug] [2020-04-09T23:35:22.200Z] CLI Version: 8.0.2 | ||
| [debug] [2020-04-09T23:35:22.201Z] Platform: win32 | ||
| [debug] [2020-04-09T23:35:22.201Z] Node Version: v12.14.1 | ||
| [debug] [2020-04-09T23:35:22.208Z] Time: Thu Apr 09 2020 18:35:22 GMT-0500 (GMT-05:00) | ||
| [debug] [2020-04-09T23:35:22.209Z] ---------------------------------------------------------------------- | ||
| [debug] [2020-04-09T23:35:22.210Z] | ||
| [debug] [2020-04-09T23:35:22.262Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] | ||
| [debug] [2020-04-09T23:35:22.453Z] Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information. | ||
| at GoogleAuth.getApplicationDefaultAsync (C:\Users\eliza\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\google-auth-library\build\src\auth\googleauth.js:160:19) | ||
| at processTicksAndRejections (internal/process/task_queues.js:94:5) | ||
| at async GoogleAuth.getClient (C:\Users\eliza\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\google-auth-library\build\src\auth\googleauth.js:502:17) | ||
| at async GoogleAuth.getAccessToken (C:\Users\eliza\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\google-auth-library\build\src\auth\googleauth.js:524:24) | ||
| [error] | ||
| [error] Error: An unexpected error has occurred. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| export const closeSesion = () => { | ||
| firebase.auth().signOut() | ||
| .then(() => { | ||
| console.log('Cerrando sesión'); | ||
| }).catch(function(error){ | ||
| console.log(error); | ||
| }) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| import { router } from './index.js'; | ||
| import { closeSesion } from './cerrarSesion.js'; | ||
| import { readerMyTrips } from './myTrips.js'; | ||
| import { postGeneral } from './postGeneral.js'; | ||
| import { renderEditProfeli } from './editProfeli.js'; | ||
| import {renderPost} from "./createPost.js"; | ||
| import {newPost} from "./createPost.js"; | ||
|
|
||
|
|
||
| //import { profil} from './createPost.js'; | ||
| let db= firebase.firestore(); | ||
| let userRef = db.collection('users'); | ||
| let main = document.querySelector('#main'); | ||
|
|
||
| export const renderContent = () => { | ||
| let uiduser = firebase.auth().currentUser.uid; | ||
| if (uiduser != null) { | ||
| userRef.where('uid', '==', uiduser).get() | ||
| .then(snapshot => { | ||
| if (snapshot.empty) { | ||
| console.log('No matching documents.'); | ||
| return; | ||
| } | ||
| snapshot.forEach(doc => { | ||
| let imguser = doc.data().photo; | ||
| let photouser; | ||
| if(imguser == ''){ | ||
| photouser = 'images/defaultUser.png'; | ||
|
Comment on lines
+24
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Es mejor devolver en una función aparte un array con los usuares y en otra funcion dibujarlos. Para separar responsabilidades |
||
| }else{ | ||
| photouser = imguser; | ||
| } | ||
| let profilView = ` | ||
|
|
||
| <header> | ||
| <div class="positiononeheader"> | ||
| <img class="logo" src="images/logo.png" alt="TripLife"> | ||
| </div> | ||
| <div class="positiontwoheader"> | ||
| <div class="menu-togle" id="menu"> | ||
| <div class="hamburger"></div> | ||
| </div> | ||
|
|
||
| <nav class="site-nav" id="site-nav"> | ||
| <ul> | ||
| <li> <a href="#" id="index"> Inicio </a></li> | ||
| <li> <a href="#" id="editProfile"> Perfil </a></li> | ||
| <li> <a href="#" id="logout"> Cerrar Sesión </a></li> | ||
| </ul> | ||
| </nav> | ||
| </div> | ||
| </header> | ||
| <section class="content-section"> | ||
| <div id="editP" class="info-user"> | ||
| <div class="position-photo"> | ||
| <img class="photo" src="${photouser}" /> | ||
| </div> | ||
| <div class="position-profeli"> | ||
| <p class="name">${doc.data().name} ${doc.data().lastName}</p> | ||
| <p class="description">${doc.data().description}</p> | ||
| </div> | ||
| </div> | ||
| <div class="board-btns"> | ||
| <input type="button" id="MyTrips" class="buttonL" value="My Trips"> | ||
| <input type="button" id="TripBoad" class="buttonR" value="Trip Board"> | ||
| </div> | ||
| <div class="board-container"> | ||
| <div class="post-generator"> | ||
| <img class="thought-photo" src="${photouser}" /> | ||
| <input type="button" id="thought" class='thought-input' value="¿Dónde te encuentras hoy?"/> | ||
| </div> | ||
| <div id="list-post"></div> | ||
| </div> | ||
| </section>`; | ||
| main.innerHTML = profilView; | ||
| postGeneral(); | ||
| let logout = document.querySelector("#logout"); | ||
| logout.addEventListener("click", closeSesion); | ||
| let pindex = document.querySelector("#index"); | ||
| pindex.addEventListener("click", ()=>{ | ||
| router('content'); | ||
| }); | ||
| let editProfile = document.querySelector("#editProfile"); | ||
| editProfile.addEventListener("click", () =>{ | ||
| renderEditProfeli(); | ||
| }); | ||
| let MyTrips = document.querySelector("#MyTrips"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Estas dos lineas pueden ser una |
||
| MyTrips.addEventListener("click", () =>{ | ||
| readerMyTrips(); | ||
| }); | ||
| let tripBoard = document.querySelector("#TripBoad"); | ||
| tripBoard.addEventListener("click", () =>{ | ||
| postGeneral(); | ||
| }); | ||
| let thought = document.querySelector("#thought"); | ||
| thought.addEventListener("click", () =>{ | ||
| //profil(); | ||
| console.log("Create post"); | ||
| let userName = `${doc.data().name}`; | ||
| renderPost(userName, uiduser); | ||
| newPost(userName, uiduser, doc.data().photo); | ||
|
|
||
| }); | ||
| let menu = document.querySelector("#menu"); | ||
| menu.addEventListener("click", () =>{ | ||
| let siteNav = document.querySelector("#site-nav"); | ||
| siteNav.classList.toggle("site-nav-open"); | ||
| }); | ||
| }); | ||
| }) | ||
| .catch(err => { | ||
| console.log('Error getting documents', err); | ||
| }); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bien las importaciones