Merge branch 'main' into pr/23

This commit is contained in:
thororen1234 2024-07-29 00:07:16 -04:00
commit 8172468fba
7 changed files with 69 additions and 33 deletions

View file

@ -8,11 +8,11 @@ export const images = {
cross: "https://i.imgur.com/XxRnu3b.png",
deviceImage: {
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:
"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:
"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;

View file

@ -141,6 +141,8 @@ const settings = definePluginSettings({}).withPrivateSettings<{
dismissedDevBuildWarning?: boolean;
}>();
let clicked = false;
export default definePlugin({
name: "SupportHelper",
required: true,
@ -177,18 +179,21 @@ export default definePlugin({
async CHANNEL_SELECT({ channelId }) {
if (!SUPPORT_CHANNEL_IDS.includes(channelId)) return;
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport")) return Alerts.show({
title: "You are entering the support channel!",
body: <div>
<style>
{'[class*="backdrop_"][style*="backdrop-filter"]{backdrop-filter:blur(16px) brightness(0.25) !important;}'}
</style>
<img src="https://media.tenor.com/QtGqjwBpRzwAAAAi/wumpus-dancing.gif" />
<Forms.FormText>Before you ask for help,</Forms.FormText>
<Forms.FormText>Check for updates and if this</Forms.FormText>
<Forms.FormText>issue could be caused by Equicord!</Forms.FormText>
</div>
});
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport") && !clicked) {
clicked = true;
return Alerts.show({
title: "You are entering the support channel!",
body: <div>
<style>
{'[class*="backdrop_"][style*="backdrop-filter"]{backdrop-filter:blur(16px) brightness(0.25) !important;}'}
</style>
<img src="https://media.tenor.com/QtGqjwBpRzwAAAAi/wumpus-dancing.gif" />
<Forms.FormText>Before you ask for help,</Forms.FormText>
<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;
if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return;

View file

@ -54,7 +54,7 @@ function Indicator() {
aria-label="Hidden Message Indicator (InvisibleChat)"
onMouseEnter={onMouseEnter}
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}
height={20}
style={{ transform: "translateY(4p)", paddingInline: 4 }}

View file

@ -60,6 +60,12 @@ export const settings = definePluginSettings({
description: "Whether the permissions dropdown on user popouts should be open by default",
type: OptionType.BOOLEAN,
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,",
replacement: {
match: /children:"\+"\.concat\(\i\.length-\i\.length\).{0,20}\}\),/,
replace: "$&$self.ViewPermissionsButton(arguments[0]),"
}
replacement: [
{
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
}
]
}
],

View file

@ -85,12 +85,21 @@ export default definePlugin({
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:",
replacement: {
match: /(?<=\.BITE_SIZE,children:\[)\(0,\i\.jsx\)\(\i\.\i,\{user:(\i),/,
replace: "$self.BiteSizeReviewsButton({user:$1}),$&"
}
},
predicate: () => settings.store.preferButtonOverDropdown
}
],

View file

@ -54,6 +54,12 @@ export const settings = definePluginSettings({
description: "Hide reviews from blocked users",
default: true,
},
preferButtonOverDropdown: {
description: "Show a button instead of dropdown to view reviews",
type: OptionType.BOOLEAN,
default: true,
restartNeeded: true
},
buttons: {
type: OptionType.COMPONENT,
description: "ReviewDB buttons",

View file

@ -20,7 +20,6 @@ import "./styles.css";
import { definePluginSettings } from "@api/Settings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Flex } from "@components/Flex";
import { CopyIcon, LinkIcon } from "@components/Icons";
import { Devs } from "@utils/constants";
import { copyWithToast } from "@utils/misc";
@ -106,13 +105,23 @@ function ConnectionsComponent({ id, theme, simplified }: { id: string, theme: st
return null;
const connectionsContainer = (
<Flex style={{
<div style={{
marginTop: !simplified ? "8px" : undefined,
gap: getSpacingPx(settings.store.iconSpacing),
flexWrap: "wrap"
}}>
<Text
tag="h2"
variant="eyebrow"
style={{
color: "var(--header-primary)",
marginBottom: "4px"
}}
>
Connections
</Text>
{connections.map(connection => <CompactConnectionComponent connection={connection} theme={theme} />)}
</Flex>
</div>
);
if (simplified)
@ -120,13 +129,6 @@ function ConnectionsComponent({ id, theme, simplified }: { id: string, theme: st
return (
<Section>
<Text
tag="h2"
variant="eyebrow"
style={{ color: "var(--header-primary)" }}
>
Connections
</Text>
{connectionsContainer}
</Section>
);
@ -211,9 +213,9 @@ export default definePlugin({
}
},
{
find: /\.bio,hidePersonalInformation:\i,onClose:/,
find: /inline:!1,profileViewedAnalytics:\i}\),/,
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 })"
}
}