mirror of
				https://github.com/monkeytypegame/monkeytype.git
				synced 2025-10-31 03:08:29 +08:00 
			
		
		
		
	fixed account loading bug, bad date format, and updated todo
This commit is contained in:
		
							parent
							
								
									3f1d111dce
								
							
						
					
					
						commit
						b669e1b107
					
				
					 4 changed files with 31 additions and 24 deletions
				
			
		|  | @ -1,26 +1,17 @@ | |||
| ## Todo | ||||
| 
 | ||||
| - Get google login working | ||||
| - Transfer leaderboard and other cloud functions | ||||
| - spinning wheel on account page should dissapear after data is loaded | ||||
| - Account data should be updated when new result is added/test completed | ||||
| - Add email verification | ||||
| - Joined date doesn't look the same as it did before | ||||
| - Personal bests items should not be arrays | ||||
|   - should be objects that are set on new pb | ||||
| - Move user data to localstorage instead of cookies | ||||
| - Result is duplicated in analytics | ||||
|   - Does entire result need to be stored in analytics | ||||
|   - Should result be stored in seperate collection and then referenced in user doc and analytics? | ||||
| - Fix localhost, production, development server detection | ||||
|   - Should be a setting in the .env | ||||
|   - Maybe it could be set through package.json | ||||
|     - When a specific script is run, a certain mode will be activated | ||||
| - Tests started and completed doesn't increment when quitting a running test | ||||
|   - Doesn't work as I expected in live version either, no issue | ||||
| - Create configSchema | ||||
| - Figure out if filteredResults.reverse(); in account.js is going to cause efficiency issues | ||||
|   - Could reverse processing of results, but that would add more complexity to code | ||||
| - Tags and leaderboard are still buggy | ||||
|   - Creating the first tag shows error "Unknown error, cannot read property \_id of undefined" | ||||
|   - Check for tag pb doesn't always work | ||||
|   - Leaderboard doesn't show the time until the daily reset | ||||
|   - User's Leaderboard history is not edited, and therefore distance moved on leaderboard does not work properly | ||||
| 
 | ||||
| ### leaderboard | ||||
| 
 | ||||
|  | @ -31,15 +22,26 @@ | |||
| 
 | ||||
| ## After beta is ready | ||||
| 
 | ||||
| - make sure refresh token won't expire | ||||
|   - make refresh token expire after session if don't remeber me is set? | ||||
| - Keep jwt and refresh in cookies? | ||||
| 
 | ||||
| - Get somebody else to check over security due to my lack of expertise | ||||
| - Work on transfering data from firebase to mongo | ||||
| - Make sure that development can be done on mac and windows computers as well | ||||
|   - directories in server.js might cause issues | ||||
| - Figure out if filteredResults.reverse(); in account.js is going to cause efficiency issues | ||||
|   - Could reverse processing of results, but that would add more complexity to code | ||||
| - Figure out why if (page == "account") pageTransition = false; gets rid of endless account loading bug when accessing via url | ||||
| 
 | ||||
| ### Analytics / Admin panel | ||||
| 
 | ||||
| - Create admin panel or public stats page to make use of analytics data | ||||
|   - What data needs to be in the analytics table | ||||
|     - New Account, sessions, number of tests started, which tests people take and how fast they are taking them | ||||
|       - Things like theme, popular languages, etc can be derived from user models | ||||
|         - Wouldn't be able to see change over time if you went with this method | ||||
|           - Could check and save once a day | ||||
|       - Could use google analytics for easy data analysis | ||||
|   - Result is duplicated in analytics | ||||
|     - Does entire result need to be stored in analytics | ||||
|     - Should result be stored in seperate collection and then referenced in user doc and analytics? | ||||
| 
 | ||||
| ## User transfer | ||||
| 
 | ||||
|  | @ -62,3 +64,10 @@ | |||
| - Create a backup system to prevent loss of data | ||||
|   - Users should be able to export their data themselves | ||||
|     - It's convenient because they would just have to download their user document, only one query for the server | ||||
| 
 | ||||
| ### General noticed bugs | ||||
| 
 | ||||
| - Tests started and completed doesn't increment when quitting a running test | ||||
|   - Doesn't work as I expected in live version either, no issue | ||||
| - Personal bests items should not be arrays | ||||
|   - should be objects that are set on new pb | ||||
|  |  | |||
|  | @ -236,7 +236,8 @@ export function userStateChanged(user) { | |||
|     // showFavouriteThemesAtTheTop();
 | ||||
|     CommandlineLists.updateThemeCommands(); | ||||
| 
 | ||||
|     let text = "Account created on " + user.metadata.creationTime; | ||||
|     let text = | ||||
|       "Account created on " + user.metadata.creationTime.substring(0, 10); | ||||
| 
 | ||||
|     const date1 = new Date(user.metadata.creationTime); | ||||
|     const date2 = new Date(); | ||||
|  |  | |||
|  | @ -165,12 +165,7 @@ function update() { | |||
|         globalData.board.forEach((entry) => { | ||||
|           if (entry.hidden) return; | ||||
|           let meClassString = ""; | ||||
|           console.log("Should be setting my leaderboard"); | ||||
|           console.log(entry.name); | ||||
|           console.log(DB.currentUser()); | ||||
|           console.log(DB.currentUser().name); | ||||
|           if (entry.name == DB.currentUser().name) { | ||||
|             console.log("Setting my leaderboard now"); | ||||
|             meClassString = ' class="me"'; | ||||
|             $("#leaderboardsWrapper table.global tfoot").html(` | ||||
|             <tr> | ||||
|  |  | |||
|  | @ -109,6 +109,8 @@ export function swapElements( | |||
| } | ||||
| 
 | ||||
| export function changePage(page) { | ||||
|   //next line fixes endless loading when accessing account via url
 | ||||
|   if (page == "account") pageTransition = false; | ||||
|   if (pageTransition) { | ||||
|     return; | ||||
|   } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue