mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-29 10:20:59 -05:00
Merge account page.
This commit is contained in:
parent
343b72928e
commit
029d902be8
3 changed files with 47 additions and 15 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 3c3dc02e94d859e3bc1e47030df57b95e9a3c4bc
|
Subproject commit 55fb420c9d7251cb0263dc47efe8870b98c7944f
|
|
@ -21,7 +21,7 @@ import Tooltip from "../../../components/common/Tooltip";
|
||||||
import Tip from "../../../components/ui/Tip";
|
import Tip from "../../../components/ui/Tip";
|
||||||
|
|
||||||
export function Account() {
|
export function Account() {
|
||||||
const { openScreen } = useIntermediate();
|
const { openScreen, writeClipboard } = useIntermediate();
|
||||||
const status = useContext(StatusContext);
|
const status = useContext(StatusContext);
|
||||||
|
|
||||||
const ctx = useForceUpdate();
|
const ctx = useForceUpdate();
|
||||||
|
@ -29,6 +29,7 @@ export function Account() {
|
||||||
if (!user) return null;
|
if (!user) return null;
|
||||||
|
|
||||||
const [email, setEmail] = useState("...");
|
const [email, setEmail] = useState("...");
|
||||||
|
const [revealEmail, setRevealEmail] = useState(false);
|
||||||
const [profile, setProfile] = useState<undefined | Users.Profile>(
|
const [profile, setProfile] = useState<undefined | Users.Profile>(
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
|
@ -64,10 +65,14 @@ export function Account() {
|
||||||
<div className={styles.userDetail}>
|
<div className={styles.userDetail}>
|
||||||
<div className={styles.username}>@{user.username}</div>
|
<div className={styles.username}>@{user.username}</div>
|
||||||
<div className={styles.userid}>
|
<div className={styles.userid}>
|
||||||
<Tooltip content={<Text id="app.settings.pages.account.tooltip_ulid" />}>
|
<Tooltip content={<Text id="app.settings.pages.account.unique_id" />}>
|
||||||
<HelpCircle size={16} />
|
<HelpCircle size={16} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{user._id}
|
<Tooltip content={<Text id="app.special.copy" />}>
|
||||||
|
<a onClick={() => writeClipboard(user._id)}>
|
||||||
|
{user._id}
|
||||||
|
</a>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -85,7 +90,13 @@ export function Account() {
|
||||||
<div className={styles.subtext}>
|
<div className={styles.subtext}>
|
||||||
<Text id={`login.${field}`} />
|
<Text id={`login.${field}`} />
|
||||||
</div>
|
</div>
|
||||||
<p>{value}</p>
|
<p>{
|
||||||
|
field === 'email' ?
|
||||||
|
(revealEmail ? value :
|
||||||
|
<>***********@{value.split('@').pop()} <a onClick={() => setRevealEmail(true)}>
|
||||||
|
<Text id="app.special.modals.actions.reveal" /></a></>)
|
||||||
|
: value
|
||||||
|
}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
|
@ -102,21 +113,29 @@ export function Account() {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{/*<h3><Text id="app.settings.pages.account.two_factor_auth.title" /></h3>
|
<h3><Text id="app.settings.pages.account.account_management.title" /></h3>
|
||||||
<h5><Text id="app.settings.pages.account.two_factor_auth.description" /></h5>
|
<h5><Text id="app.settings.pages.account.account_management.description" /></h5>
|
||||||
|
|
||||||
|
<h3><Text id="app.settings.pages.account.2fa.title" /></h3>
|
||||||
|
<h5>Currently work in progress, see <a href="https://gitlab.insrt.uk/insert/rauth/-/issues/2" target="_blank">tracking issue here</a>.</h5>
|
||||||
|
{/*<h5><Text id="app.settings.pages.account.two_factor_auth.description" /></h5>
|
||||||
<Button accent compact>
|
<Button accent compact>
|
||||||
<Text id="app.settings.pages.account.two_factor_auth.add_auth" />
|
<Text id="app.settings.pages.account.two_factor_auth.add_auth" />
|
||||||
</Button>*/}
|
</Button>*/}
|
||||||
<h3><Text id="app.settings.pages.account.account_management.title" /></h3>
|
|
||||||
<h5><Text id="app.settings.pages.account.account_management.description" /></h5>
|
<h3><Text id="app.settings.pages.account.manage.title" /></h3>
|
||||||
|
<h5><Text id="app.settings.pages.account.manage.desciption" /></h5>
|
||||||
<div className={styles.buttons}>
|
<div className={styles.buttons}>
|
||||||
{/*<Button error compact>
|
{/* <Button contrast>
|
||||||
<Text id="app.settings.pages.account.account_management.disable_account" />
|
<Text id="app.settings.pages.account.manage.disable" />
|
||||||
</Button>*/}
|
</Button> */}
|
||||||
<Button error compact>
|
<a href="mailto:contact@revolt.chat?subject=Delete%20my%20account">
|
||||||
<Text id="app.settings.pages.account.account_management.delete_account" />
|
<Button contrast>
|
||||||
</Button>
|
<Text id="app.settings.pages.account.manage.delete" />
|
||||||
|
</Button>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Tip>
|
<Tip>
|
||||||
<span>
|
<span>
|
||||||
<Text id="app.settings.tips.account.a" />
|
<Text id="app.settings.tips.account.a" />
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
color: var(--tertiary-foreground);
|
color: var(--tertiary-foreground);
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +67,14 @@
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|
Loading…
Reference in a new issue