mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-06 19:08:06 +08:00
showing when the account was created
This commit is contained in:
parent
65e6000adf
commit
04219f3d35
3 changed files with 17 additions and 0 deletions
|
|
@ -2497,6 +2497,11 @@ key {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
&.createdDate {
|
||||
text-align: center;
|
||||
color: var(--sub-color);
|
||||
}
|
||||
|
||||
&.history {
|
||||
.loadMoreButton {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
|
|
|
|||
|
|
@ -2851,6 +2851,7 @@
|
|||
<div class="val">-</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group createdDate">asd</div>
|
||||
<div class="group">
|
||||
<div class="title">personal bests</div>
|
||||
<div style="display: grid; grid-auto-flow: column; gap: 1rem">
|
||||
|
|
|
|||
|
|
@ -268,6 +268,17 @@ firebase.auth().onAuthStateChanged(function (user) {
|
|||
|
||||
showFavouriteThemesAtTheTop();
|
||||
|
||||
let text = "Account created on " + user.metadata.creationTime;
|
||||
|
||||
const date1 = new Date(text);
|
||||
const date2 = new Date();
|
||||
const diffTime = Math.abs(date2 - date1);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
||||
text += ` (${diffDays} days ago)`;
|
||||
|
||||
$(".pageAccount .group.createdDate").text(text);
|
||||
|
||||
if (verifyUserWhenLoggedIn !== null) {
|
||||
showNotification("Verifying", 1000);
|
||||
verifyUserWhenLoggedIn.uid = user.uid;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue