From 029d902be8290810a4173b933bb6dcf95e9e5989 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 6 Jul 2021 13:29:11 +0100 Subject: [PATCH] Merge account page. --- external/lang | 2 +- src/pages/settings/panes/Account.tsx | 47 +++++++++++++++------- src/pages/settings/panes/Panes.module.scss | 13 ++++++ 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/external/lang b/external/lang index 3c3dc02e..55fb420c 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit 3c3dc02e94d859e3bc1e47030df57b95e9a3c4bc +Subproject commit 55fb420c9d7251cb0263dc47efe8870b98c7944f diff --git a/src/pages/settings/panes/Account.tsx b/src/pages/settings/panes/Account.tsx index 8e0741da..e32ef822 100644 --- a/src/pages/settings/panes/Account.tsx +++ b/src/pages/settings/panes/Account.tsx @@ -21,7 +21,7 @@ import Tooltip from "../../../components/common/Tooltip"; import Tip from "../../../components/ui/Tip"; export function Account() { - const { openScreen } = useIntermediate(); + const { openScreen, writeClipboard } = useIntermediate(); const status = useContext(StatusContext); const ctx = useForceUpdate(); @@ -29,6 +29,7 @@ export function Account() { if (!user) return null; const [email, setEmail] = useState("..."); + const [revealEmail, setRevealEmail] = useState(false); const [profile, setProfile] = useState( undefined, ); @@ -64,10 +65,14 @@ export function Account() {
@{user.username}
- }> + }> - {user._id} + }> + writeClipboard(user._id)}> + {user._id} + +
@@ -85,7 +90,13 @@ export function Account() {
-

{value}

+

{ + field === 'email' ? + (revealEmail ? value : + <>***********@{value.split('@').pop()} setRevealEmail(true)}> + ) + : value + }

- {/*

-
+

+
+ +

+
Currently work in progress, see tracking issue here.
+ {/*
*/} -

-
+ +

+
- {/**/} - + {/* */} + + +
+ diff --git a/src/pages/settings/panes/Panes.module.scss b/src/pages/settings/panes/Panes.module.scss index 91e52672..01a7d5ec 100644 --- a/src/pages/settings/panes/Panes.module.scss +++ b/src/pages/settings/panes/Panes.module.scss @@ -30,6 +30,11 @@ align-items: center; gap: 4px; color: var(--tertiary-foreground); + + a { + color: inherit; + cursor: pointer; + } } } @@ -62,6 +67,14 @@ color: var(--foreground); text-transform: uppercase; } + + a { + cursor: pointer; + + &:hover { + text-decoration: underline; + } + } } p {