chore: strip emoji picker experiment

chore: use discrim
This commit is contained in:
Paul Makles 2023-06-11 18:36:07 +01:00
parent f20ada7c49
commit 636367faea
No known key found for this signature in database
GPG key ID: 5059F398521BB0F6
9 changed files with 58 additions and 33 deletions

2
external/components vendored

@ -1 +1 @@
Subproject commit 32f73acbd51ad11d25feaa42a0ebc93294dc7028
Subproject commit 4be02430c73bb4c69013a3b20b811c1391e1666d

2
external/revolt.js vendored

@ -1 +1 @@
Subproject commit cdc266ef164b43d715638cb895740155743d1529
Subproject commit 0c3da5fac33391e937d1631d2ba65d36c04425d6

View file

@ -119,19 +119,18 @@ export const MessageOverlayBar = observer(
</Tooltip>
)}
{message.channel?.havePermission("React") &&
state.experiments.isEnabled("picker") && (
<ReactionWrapper
open={reactionsOpen}
setOpen={setReactionsOpen}
message={message}>
<Tooltip content="React">
<Entry>
<HappyBeaming size={18} />
</Entry>
</Tooltip>
</ReactionWrapper>
)}
{message.channel?.havePermission("React") && (
<ReactionWrapper
open={reactionsOpen}
setOpen={setReactionsOpen}
message={message}>
<Tooltip content="React">
<Entry>
<HappyBeaming size={18} />
</Entry>
</Tooltip>
</ReactionWrapper>
)}
{isAuthor && (
<Tooltip content="Edit">

View file

@ -29,9 +29,14 @@ const HeaderBase = styled.div`
text-overflow: ellipsis;
}
.new-name {
font-size: 16px;
font-weight: 600;
}
.username {
cursor: pointer;
font-size: 16px;
font-size: 13px;
font-weight: 600;
}
@ -50,6 +55,9 @@ export default observer(({ user }: Props) => {
return (
<Header topBorder palette="secondary">
<HeaderBase>
<div className="new-name">
{user.display_name ?? user.username}
</div>
<Localizer>
<Tooltip content={<Text id="app.special.copy_username" />}>
<span
@ -57,7 +65,9 @@ export default observer(({ user }: Props) => {
onClick={() =>
modalController.writeText(user.username)
}>
@{user.username}
{user.username}
{"#"}
{user.discriminator}
</span>
</Tooltip>
</Localizer>

View file

@ -20,7 +20,7 @@ import {
} from "preact-context-menu";
import { Text } from "preact-i18n";
import { IconButton, LineDivider } from "@revoltchat/ui";
import { Column, IconButton, LineDivider } from "@revoltchat/ui";
import { useApplicationState } from "../mobx/State";
import { QueuedMessage } from "../mobx/stores/MessageQueue";
@ -1142,7 +1142,21 @@ export default function ContextMenus() {
content={
<Text id="app.special.copy_username" />
}>
@{user.username}
<Column gap="0">
<span>
{user.display_name ??
user.username}
</span>
<span
style={{
fontSize: "0.8em",
}}>
{user.username}
{"#"}
{user.discriminator ??
"0000"}
</span>
</Column>
</Tooltip>
</div>
<div

View file

@ -77,10 +77,6 @@ export default class Changelog implements Store, Persistent<Data>, Syncable {
runInAction(() => {
this.viewed = latestChangelog;
});
} else {
modalController.push({
type: "changelog_usernames",
});
}
}
}

View file

@ -10,7 +10,7 @@ import Store from "../interfaces/Store";
/**
* Union type of available experiments.
*/
export type Experiment = "dummy" | "offline_users" | "plugins" | "picker";
export type Experiment = "dummy" | "offline_users" | "plugins";
/**
* Currently active experiments.
@ -19,7 +19,6 @@ export const AVAILABLE_EXPERIMENTS: Experiment[] = [
"dummy",
"offline_users",
"plugins",
"picker",
];
/**
@ -42,11 +41,6 @@ export const EXPERIMENTS: {
description:
"This will enable the experimental plugin API. Only touch this if you know what you're doing.",
},
picker: {
title: "Custom Emoji",
description:
"This will enable a work-in-progress emoji picker, custom emoji settings and a reaction picker.",
},
};
export interface Data {

View file

@ -79,7 +79,6 @@ export default observer(() => {
id: "emojis",
icon: <HappyBeaming size={20} />,
title: <Text id="app.settings.server_pages.emojis.title" />,
hidden: !state.experiments.isEnabled("picker"),
},
{
category: (

View file

@ -80,10 +80,15 @@ const AccountHeader = styled.div`
font-size: 12px;
gap: 2px;
> span {
.new {
font-size: 20px;
font-weight: 600;
}
.full {
font-size: 14px;
font-weight: 600;
}
}
}
@ -336,7 +341,15 @@ export default observer(() => {
onClick={() => openContextMenu("Status")}
/>
<div className="details">
<Username user={client.user!} prefixAt />
<span className="new">
{client.user.display_name ??
client.user.username}
</span>
<span className="full">
{client.user.username}
{"#"}
{client.user.discriminator}
</span>
<UserStatus user={client.user!} />
</div>
</div>