Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
2416d1f73d
5 changed files with 11 additions and 9 deletions
|
|
@ -163,8 +163,8 @@ export default definePlugin({
|
||||||
<BaseText size="md">
|
<BaseText size="md">
|
||||||
You can open Discord's DevTools via {" "}
|
You can open Discord's DevTools via {" "}
|
||||||
<div className={KbdStyles.combo} style={{ display: "inline-flex" }}>
|
<div className={KbdStyles.combo} style={{ display: "inline-flex" }}>
|
||||||
<kbd className={KbdStyles.key}>{modKey}</kbd> +{" "}
|
<kbd className={KbdStyles.key}>{modKey}</kbd>{" "}
|
||||||
<kbd className={KbdStyles.key}>{altKey}</kbd> +{" "}
|
<kbd className={KbdStyles.key}>{altKey}</kbd>{" "}
|
||||||
<kbd className={KbdStyles.key}>O</kbd>{" "}
|
<kbd className={KbdStyles.key}>O</kbd>{" "}
|
||||||
</div>
|
</div>
|
||||||
</BaseText>
|
</BaseText>
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ export default definePlugin({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Paragraph>
|
<Paragraph>
|
||||||
To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message
|
To quickly send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<Paragraph>
|
<Paragraph>
|
||||||
See below for examples.
|
See below for examples.
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ export default definePlugin({
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
// Same find as ReviewDB
|
// Same find as ReviewDB
|
||||||
find: ".USER_PROFILE_POPOUT])",
|
find: '"UserProfilePopout");',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /userId:\i\.id,guild:\i\}\)(?=])/,
|
match: /userId:\i\.id,guild:\i\}\)(?=])/,
|
||||||
replace: "$&,$self.profilePopoutComponent(arguments[0])"
|
replace: "$&,$self.profilePopoutComponent(arguments[0])"
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import { definePluginSettings, migratePluginToSettings, Settings } from "@api/Se
|
||||||
import ErrorBoundary from "@components/ErrorBoundary";
|
import ErrorBoundary from "@components/ErrorBoundary";
|
||||||
import { getCustomColorString } from "@equicordplugins/customUserColors";
|
import { getCustomColorString } from "@equicordplugins/customUserColors";
|
||||||
import { Devs, EquicordDevs } from "@utils/constants";
|
import { Devs, EquicordDevs } from "@utils/constants";
|
||||||
|
import { classNameFactory } from "@utils/css";
|
||||||
import { openUserProfile } from "@utils/discord";
|
import { openUserProfile } from "@utils/discord";
|
||||||
import { isNonNullish } from "@utils/guards";
|
import { isNonNullish } from "@utils/guards";
|
||||||
import { Logger } from "@utils/Logger";
|
import { Logger } from "@utils/Logger";
|
||||||
|
|
@ -30,6 +31,7 @@ import { PropsWithChildren } from "react";
|
||||||
|
|
||||||
import managedStyle from "./style.css?managed";
|
import managedStyle from "./style.css?managed";
|
||||||
|
|
||||||
|
const cl = classNameFactory("vc-typing-tweaks-");
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
showAvatars: {
|
showAvatars: {
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
|
|
@ -87,7 +89,7 @@ function typingUserColor(guildId: string, userId: string): string | undefined {
|
||||||
const TypingUser = ErrorBoundary.wrap(function TypingUser({ user, guildId }: TypingUserProps) {
|
const TypingUser = ErrorBoundary.wrap(function TypingUser({ user, guildId }: TypingUserProps) {
|
||||||
return (
|
return (
|
||||||
<strong
|
<strong
|
||||||
className="vc-typing-user"
|
className={cl("user")}
|
||||||
role="button"
|
role="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
openUserProfile(user.id);
|
openUserProfile(user.id);
|
||||||
|
|
@ -98,6 +100,7 @@ const TypingUser = ErrorBoundary.wrap(function TypingUser({ user, guildId }: Typ
|
||||||
>
|
>
|
||||||
{settings.store.showAvatars && (
|
{settings.store.showAvatars && (
|
||||||
<Avatar
|
<Avatar
|
||||||
|
className={cl("avatar")}
|
||||||
size="SIZE_16"
|
size="SIZE_16"
|
||||||
src={user.getAvatarURL(guildId, 128)} />
|
src={user.getAvatarURL(guildId, 128)} />
|
||||||
)}
|
)}
|
||||||
|
|
@ -128,7 +131,7 @@ export default definePlugin({
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
// Style the indicator and add function call to modify the children before rendering
|
// Style the indicator and add function call to modify the children before rendering
|
||||||
match: /(?<="aria-atomic":!0,children:)\i/,
|
match: /(?<="aria-hidden":!0,children:)\i/,
|
||||||
replace: "$self.renderTypingUsers({ users: arguments[0]?.typingUserObjects, guildId: arguments[0]?.channel?.guild_id, children: $& })"
|
replace: "$self.renderTypingUsers({ users: arguments[0]?.typingUserObjects, guildId: arguments[0]?.channel?.guild_id, children: $& })"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -194,8 +197,7 @@ export default definePlugin({
|
||||||
let element = 0;
|
let element = 0;
|
||||||
|
|
||||||
return children.map(c => {
|
return children.map(c => {
|
||||||
if (c.type !== "strong" && !(typeof c !== "string" && !React.isValidElement(c)))
|
if (c.type !== "strong" && !(typeof c !== "string" && !React.isValidElement(c))) return c;
|
||||||
return c;
|
|
||||||
|
|
||||||
const user = users[element++];
|
const user = users[element++];
|
||||||
return <TypingUser key={user.id} guildId={guildId} user={user} />;
|
return <TypingUser key={user.id} guildId={guildId} user={user} />;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.vc-typing-user {
|
.vc-typing-tweaks-user {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
[class*="wrapper"] {
|
[class*="wrapper"] {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue