mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 09:57:08 -04:00
Merge branch 'main' into pr/23
This commit is contained in:
commit
8172468fba
7 changed files with 69 additions and 33 deletions
|
@ -8,11 +8,11 @@ export const images = {
|
||||||
cross: "https://i.imgur.com/XxRnu3b.png",
|
cross: "https://i.imgur.com/XxRnu3b.png",
|
||||||
deviceImage: {
|
deviceImage: {
|
||||||
success:
|
success:
|
||||||
"https://github.com/nexpid/Themelings/raw/data/icons/images/native/img_remote_auth_succeeded.png",
|
"https://github.com/nexpid/Themelings/blob/3a063c5188f4cac096171f29163f9e2659f275a3/icons/images/native/img_remote_auth_succeeded.png",
|
||||||
notFound:
|
notFound:
|
||||||
"https://github.com/nexpid/Themelings/raw/data/icons/images/native/img_remote_auth_not_found.png",
|
"https://github.com/nexpid/Themelings/blob/3a063c5188f4cac096171f29163f9e2659f275a3/icons/images/native/img_remote_auth_not_found.png",
|
||||||
loading:
|
loading:
|
||||||
"https://github.com/nexpid/Themelings/raw/data/icons/images/native/img_remote_auth_loaded.png",
|
"https://github.com/nexpid/Themelings/blob/3a063c5188f4cac096171f29163f9e2659f275a3/icons/images/native/img_remote_auth_loaded.png",
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,8 @@ const settings = definePluginSettings({}).withPrivateSettings<{
|
||||||
dismissedDevBuildWarning?: boolean;
|
dismissedDevBuildWarning?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
let clicked = false;
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "SupportHelper",
|
name: "SupportHelper",
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -177,18 +179,21 @@ export default definePlugin({
|
||||||
async CHANNEL_SELECT({ channelId }) {
|
async CHANNEL_SELECT({ channelId }) {
|
||||||
if (!SUPPORT_CHANNEL_IDS.includes(channelId)) return;
|
if (!SUPPORT_CHANNEL_IDS.includes(channelId)) return;
|
||||||
|
|
||||||
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport")) return Alerts.show({
|
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport") && !clicked) {
|
||||||
title: "You are entering the support channel!",
|
clicked = true;
|
||||||
body: <div>
|
return Alerts.show({
|
||||||
<style>
|
title: "You are entering the support channel!",
|
||||||
{'[class*="backdrop_"][style*="backdrop-filter"]{backdrop-filter:blur(16px) brightness(0.25) !important;}'}
|
body: <div>
|
||||||
</style>
|
<style>
|
||||||
<img src="https://media.tenor.com/QtGqjwBpRzwAAAAi/wumpus-dancing.gif" />
|
{'[class*="backdrop_"][style*="backdrop-filter"]{backdrop-filter:blur(16px) brightness(0.25) !important;}'}
|
||||||
<Forms.FormText>Before you ask for help,</Forms.FormText>
|
</style>
|
||||||
<Forms.FormText>Check for updates and if this</Forms.FormText>
|
<img src="https://media.tenor.com/QtGqjwBpRzwAAAAi/wumpus-dancing.gif" />
|
||||||
<Forms.FormText>issue could be caused by Equicord!</Forms.FormText>
|
<Forms.FormText>Before you ask for help,</Forms.FormText>
|
||||||
</div>
|
<Forms.FormText>Check for updates and if this</Forms.FormText>
|
||||||
});
|
<Forms.FormText>issue could be caused by Equicord!</Forms.FormText>
|
||||||
|
</div>
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const selfId = UserStore.getCurrentUser()?.id;
|
const selfId = UserStore.getCurrentUser()?.id;
|
||||||
if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return;
|
if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return;
|
||||||
|
|
|
@ -54,7 +54,7 @@ function Indicator() {
|
||||||
aria-label="Hidden Message Indicator (InvisibleChat)"
|
aria-label="Hidden Message Indicator (InvisibleChat)"
|
||||||
onMouseEnter={onMouseEnter}
|
onMouseEnter={onMouseEnter}
|
||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
src="https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png"
|
src="https://github.com/SammCheese/invisible-chat/blob/1c1a1111d5aed4ddd04bb76a8f10d138944e1d5a/src/assets/lock.png"
|
||||||
width={20}
|
width={20}
|
||||||
height={20}
|
height={20}
|
||||||
style={{ transform: "translateY(4p)", paddingInline: 4 }}
|
style={{ transform: "translateY(4p)", paddingInline: 4 }}
|
||||||
|
|
|
@ -60,6 +60,12 @@ export const settings = definePluginSettings({
|
||||||
description: "Whether the permissions dropdown on user popouts should be open by default",
|
description: "Whether the permissions dropdown on user popouts should be open by default",
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
default: false,
|
default: false,
|
||||||
|
},
|
||||||
|
preferButtonOverDropdown: {
|
||||||
|
description: "Show a button next to the roles instead of dropdown",
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
default: true,
|
||||||
|
restartNeeded: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -178,10 +184,18 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: ".VIEW_ALL_ROLES,",
|
find: ".VIEW_ALL_ROLES,",
|
||||||
replacement: {
|
replacement: [
|
||||||
match: /children:"\+"\.concat\(\i\.length-\i\.length\).{0,20}\}\),/,
|
{
|
||||||
replace: "$&$self.ViewPermissionsButton(arguments[0]),"
|
match: /children:"\+"\.concat\(\i\.length-\i\.length\).{0,20}\}\),/,
|
||||||
}
|
replace: "$&$self.ViewPermissionsButton(arguments[0]),",
|
||||||
|
predicate: () => settings.store.preferButtonOverDropdown
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /0!==\i\.length\|\|\i\?\(0,.+?guild:(\i),guildMember:(\i).+?null/,
|
||||||
|
replace: "[$&,$self.UserPermissions($1,$2)]",
|
||||||
|
predicate: () => !settings.store.preferButtonOverDropdown
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -85,12 +85,21 @@ export default definePlugin({
|
||||||
replace: "$&,$self.getReviewsComponent($1)"
|
replace: "$&,$self.getReviewsComponent($1)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
find: /inline:!1,profileViewedAnalytics:\i}\),/,
|
||||||
|
replacement: {
|
||||||
|
match: /currentUser:\i,guild:\i}\)(?<=user:(\i),bio:null==\i\?.+?)/,
|
||||||
|
replace: "$&,$self.getReviewsComponent($1)"
|
||||||
|
},
|
||||||
|
predicate: () => !settings.store.preferButtonOverDropdown
|
||||||
|
},
|
||||||
{
|
{
|
||||||
find: ".BITE_SIZE,user:",
|
find: ".BITE_SIZE,user:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=\.BITE_SIZE,children:\[)\(0,\i\.jsx\)\(\i\.\i,\{user:(\i),/,
|
match: /(?<=\.BITE_SIZE,children:\[)\(0,\i\.jsx\)\(\i\.\i,\{user:(\i),/,
|
||||||
replace: "$self.BiteSizeReviewsButton({user:$1}),$&"
|
replace: "$self.BiteSizeReviewsButton({user:$1}),$&"
|
||||||
}
|
},
|
||||||
|
predicate: () => settings.store.preferButtonOverDropdown
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,12 @@ export const settings = definePluginSettings({
|
||||||
description: "Hide reviews from blocked users",
|
description: "Hide reviews from blocked users",
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
preferButtonOverDropdown: {
|
||||||
|
description: "Show a button instead of dropdown to view reviews",
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
default: true,
|
||||||
|
restartNeeded: true
|
||||||
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
type: OptionType.COMPONENT,
|
type: OptionType.COMPONENT,
|
||||||
description: "ReviewDB buttons",
|
description: "ReviewDB buttons",
|
||||||
|
|
|
@ -20,7 +20,6 @@ import "./styles.css";
|
||||||
|
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
import ErrorBoundary from "@components/ErrorBoundary";
|
import ErrorBoundary from "@components/ErrorBoundary";
|
||||||
import { Flex } from "@components/Flex";
|
|
||||||
import { CopyIcon, LinkIcon } from "@components/Icons";
|
import { CopyIcon, LinkIcon } from "@components/Icons";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import { copyWithToast } from "@utils/misc";
|
import { copyWithToast } from "@utils/misc";
|
||||||
|
@ -106,13 +105,23 @@ function ConnectionsComponent({ id, theme, simplified }: { id: string, theme: st
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
const connectionsContainer = (
|
const connectionsContainer = (
|
||||||
<Flex style={{
|
<div style={{
|
||||||
marginTop: !simplified ? "8px" : undefined,
|
marginTop: !simplified ? "8px" : undefined,
|
||||||
gap: getSpacingPx(settings.store.iconSpacing),
|
gap: getSpacingPx(settings.store.iconSpacing),
|
||||||
flexWrap: "wrap"
|
flexWrap: "wrap"
|
||||||
}}>
|
}}>
|
||||||
|
<Text
|
||||||
|
tag="h2"
|
||||||
|
variant="eyebrow"
|
||||||
|
style={{
|
||||||
|
color: "var(--header-primary)",
|
||||||
|
marginBottom: "4px"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Connections
|
||||||
|
</Text>
|
||||||
{connections.map(connection => <CompactConnectionComponent connection={connection} theme={theme} />)}
|
{connections.map(connection => <CompactConnectionComponent connection={connection} theme={theme} />)}
|
||||||
</Flex>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (simplified)
|
if (simplified)
|
||||||
|
@ -120,13 +129,6 @@ function ConnectionsComponent({ id, theme, simplified }: { id: string, theme: st
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Section>
|
<Section>
|
||||||
<Text
|
|
||||||
tag="h2"
|
|
||||||
variant="eyebrow"
|
|
||||||
style={{ color: "var(--header-primary)" }}
|
|
||||||
>
|
|
||||||
Connections
|
|
||||||
</Text>
|
|
||||||
{connectionsContainer}
|
{connectionsContainer}
|
||||||
</Section>
|
</Section>
|
||||||
);
|
);
|
||||||
|
@ -211,9 +213,9 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: /\.bio,hidePersonalInformation:\i,onClose:/,
|
find: /inline:!1,profileViewedAnalytics:\i}\),/,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /currentUser:\i,guild:\i,onOpenProfile:.+?}\)(?=])(?<=user:(\i),bio:null==(\i)\?.+?)/,
|
match: /currentUser:\i,guild:\i}\)(?<=user:(\i),bio:null==(\i)\?.+?)/,
|
||||||
replace: "$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2, simplified: true })"
|
replace: "$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2, simplified: true })"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue