mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-21 22:50:59 -05:00
feat: swap pomelo usernames for discriminators
This commit is contained in:
parent
9bc052ea87
commit
86218a7272
6 changed files with 59 additions and 8 deletions
2
external/components
vendored
2
external/components
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit d21aeb7924f6eea795da41ee97e0c3b6cc14ffc4
|
Subproject commit 393f87aaba71d6f11b3df05766cad982f1cdaa82
|
|
@ -37,7 +37,7 @@ export default observer(() => {
|
||||||
|
|
||||||
{(
|
{(
|
||||||
[
|
[
|
||||||
["username", client.user!.username, At],
|
["username", client.user!.username + "#0000", At],
|
||||||
["email", email, Envelope],
|
["email", email, Envelope],
|
||||||
["password", "•••••••••", Key],
|
["password", "•••••••••", Key],
|
||||||
] as const
|
] as const
|
||||||
|
|
|
@ -46,13 +46,26 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
.usernameDetail {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.displayname {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.username {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--secondary-foreground);
|
||||||
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
color: var(--secondary-foreground);
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
display: inline !important;
|
display: inline !important;
|
||||||
|
|
|
@ -163,16 +163,22 @@ export const UserProfile = observer(
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<div className={styles.details}>
|
<div className={styles.details}>
|
||||||
<Localizer>
|
<div className={styles.usernameDetail}>
|
||||||
|
<span
|
||||||
|
className={styles.displayname}
|
||||||
|
onClick={() =>
|
||||||
|
modalController.writeText(user.username)
|
||||||
|
}>
|
||||||
|
{user.username}
|
||||||
|
</span>
|
||||||
<span
|
<span
|
||||||
className={styles.username}
|
className={styles.username}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
modalController.writeText(user.username)
|
modalController.writeText(user.username)
|
||||||
}>
|
}>
|
||||||
{"@"}
|
{user.username}#0000
|
||||||
{user.username}
|
|
||||||
</span>
|
</span>
|
||||||
</Localizer>
|
</div>
|
||||||
{user.status?.text && (
|
{user.status?.text && (
|
||||||
<span className={styles.status}>
|
<span className={styles.status}>
|
||||||
<UserStatus user={user} tooltip />
|
<UserStatus user={user} tooltip />
|
||||||
|
|
|
@ -694,3 +694,23 @@
|
||||||
section {
|
section {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.titleNew {
|
||||||
|
display: flex;
|
||||||
|
margin: 15px 0;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--secondary-foreground);
|
||||||
|
|
||||||
|
.new {
|
||||||
|
font-size: 10px;
|
||||||
|
background: red;
|
||||||
|
padding: 3px 5px;
|
||||||
|
border-radius: 20px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,11 +3,13 @@ import { observer } from "mobx-react-lite";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import { API } from "revolt.js";
|
import { API } from "revolt.js";
|
||||||
|
|
||||||
|
import { UserCircle } from "@styled-icons/boxicons-solid";
|
||||||
|
|
||||||
import styles from "./Panes.module.scss";
|
import styles from "./Panes.module.scss";
|
||||||
import { Text } from "preact-i18n";
|
import { Text } from "preact-i18n";
|
||||||
import { useCallback, useContext, useEffect, useState } from "preact/hooks";
|
import { useCallback, useContext, useEffect, useState } from "preact/hooks";
|
||||||
|
|
||||||
import { Button, LineDivider, Tip } from "@revoltchat/ui";
|
import { Button, LineDivider, Tip, CategoryButton } from "@revoltchat/ui";
|
||||||
|
|
||||||
import TextAreaAutoSize from "../../../lib/TextAreaAutoSize";
|
import TextAreaAutoSize from "../../../lib/TextAreaAutoSize";
|
||||||
import { useTranslation } from "../../../lib/i18n";
|
import { useTranslation } from "../../../lib/i18n";
|
||||||
|
@ -77,6 +79,16 @@ export const Profile = observer(() => {
|
||||||
{...({} as any)}
|
{...({} as any)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className={styles.titleNew}>
|
||||||
|
Display Name
|
||||||
|
<div className={styles.new}>NEW</div>
|
||||||
|
</div>
|
||||||
|
<CategoryButton
|
||||||
|
icon={<UserCircle size={24} />}
|
||||||
|
action="chevron"
|
||||||
|
description={"Change your display name to whatever you like"}>
|
||||||
|
Display Name
|
||||||
|
</CategoryButton>
|
||||||
{/*<h3>Badges</h3>
|
{/*<h3>Badges</h3>
|
||||||
<div className={styles.badgePicker}>
|
<div className={styles.badgePicker}>
|
||||||
<div className={styles.overlay} />
|
<div className={styles.overlay} />
|
||||||
|
|
Loading…
Reference in a new issue