Compare commits
6 Commits
feat/permi
...
v1.5.5
Author | SHA1 | Date | |
---|---|---|---|
|
9e63da6d78 | ||
|
79295683ee | ||
|
5eb9dd04df | ||
|
03b5dc9c27 | ||
|
726a1b5d96 | ||
|
581fe252a4 |
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vencord",
|
||||
"private": "true",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.5",
|
||||
"description": "The cutest Discord client mod",
|
||||
"homepage": "https://github.com/Vendicated/Vencord#readme",
|
||||
"bugs": {
|
||||
|
@ -20,7 +20,6 @@ import { Channel, User } from "discord-types/general/index.js";
|
||||
|
||||
interface DecoratorProps {
|
||||
activities: any[];
|
||||
canUseAvatarDecorations: boolean;
|
||||
channel: Channel;
|
||||
/**
|
||||
* Only for DM members
|
||||
@ -52,9 +51,9 @@ export function removeDecorator(identifier: string) {
|
||||
decorators.delete(identifier);
|
||||
}
|
||||
|
||||
export function __addDecoratorsToList(props: DecoratorProps): (JSX.Element | null)[] {
|
||||
export function __getDecorators(props: DecoratorProps): (JSX.Element | null)[] {
|
||||
const isInGuild = !!(props.guildId);
|
||||
return [...decorators.values()].map(decoratorObj => {
|
||||
return Array.from(decorators.values(), decoratorObj => {
|
||||
const { decorator, onlyIn } = decoratorObj;
|
||||
// this can most likely be done cleaner
|
||||
if (!onlyIn || (onlyIn === "guilds" && isInGuild) || (onlyIn === "dms" && !isInGuild)) {
|
||||
|
@ -26,7 +26,7 @@ export default definePlugin({
|
||||
patches: [
|
||||
// obtain BUILT_IN_COMMANDS instance
|
||||
{
|
||||
find: '"giphy","tenor"',
|
||||
find: ',"tenor"',
|
||||
replacement: [
|
||||
{
|
||||
// Matches BUILT_IN_COMMANDS. This is not exported so this is
|
||||
@ -34,7 +34,7 @@ export default definePlugin({
|
||||
// patch simpler
|
||||
|
||||
// textCommands = builtInCommands.filter(...)
|
||||
match: /(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,
|
||||
match: /(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,
|
||||
replace: "Vencord.Api.Commands._init($1)$2",
|
||||
}
|
||||
],
|
||||
|
@ -22,21 +22,28 @@ import definePlugin from "@utils/types";
|
||||
export default definePlugin({
|
||||
name: "MemberListDecoratorsAPI",
|
||||
description: "API to add decorators to member list (both in servers and DMs)",
|
||||
authors: [Devs.TheSun],
|
||||
authors: [Devs.TheSun, Devs.Ven],
|
||||
patches: [
|
||||
{
|
||||
find: "lostPermissionTooltipText,",
|
||||
replacement: {
|
||||
match: /Fragment,{children:\[(.{30,80})\]/,
|
||||
replace: "Fragment,{children:Vencord.Api.MemberListDecorators.__addDecoratorsToList(this.props).concat($1)"
|
||||
match: /decorators:.{0,100}?children:\[(?<=(\i)\.lostPermissionTooltipText.+?)/,
|
||||
replace: "$&...Vencord.Api.MemberListDecorators.__getDecorators($1),"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: "PrivateChannel.renderAvatar",
|
||||
replacement: {
|
||||
match: /(subText:(.{1,2})\.renderSubtitle\(\).{1,50}decorators):(.{30,100}:null)/,
|
||||
replace: "$1:Vencord.Api.MemberListDecorators.__addDecoratorsToList($2.props).concat($3)"
|
||||
replacement: [
|
||||
// props are shadowed by nested props so we have to do this
|
||||
{
|
||||
match: /\i=(\i)\.applicationStream,/,
|
||||
replace: "$&vencordProps=$1,"
|
||||
},
|
||||
{
|
||||
match: /decorators:(\i\.isSystemDM\(\))\?(.+?):null/,
|
||||
replace: "decorators:[...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)), $1?$2:null]"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
});
|
||||
|
@ -48,6 +48,7 @@ export default definePlugin({
|
||||
{
|
||||
find: ".ADD_ROLE_A11Y_LABEL",
|
||||
predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !Settings.plugins.BetterRoleDot.bothStyles,
|
||||
noWarn: true,
|
||||
replacement: {
|
||||
match: /"dot"===\i/,
|
||||
replace: "true"
|
||||
@ -56,6 +57,7 @@ export default definePlugin({
|
||||
{
|
||||
find: ".roleVerifiedIcon",
|
||||
predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout && !Settings.plugins.BetterRoleDot.bothStyles,
|
||||
noWarn: true,
|
||||
replacement: {
|
||||
match: /"dot"===\i/,
|
||||
replace: "true"
|
||||
|
@ -165,7 +165,7 @@ export default definePlugin({
|
||||
{
|
||||
find: '"renderLinkComponent","maxWidth"',
|
||||
replacement: {
|
||||
match: /(return\(.{1,100}\(\)\.wrapper.{1,100})(src)/,
|
||||
match: /(return\(.{1,100}\(\)\.wrapper.{1,200})(src)/,
|
||||
replace: `$1id: '${ELEMENT_ID}',$2`
|
||||
}
|
||||
},
|
||||
|
@ -7,8 +7,3 @@ you don't want to do this") and onboarding requirements ("Making this change wil
|
||||
|
||||
This plugin will let you create permissions in servers that **WILL** lock you out of channels until an administrator
|
||||
can resolve it for you. Please be careful with the overwrites you are making and check carefully.
|
||||
|
||||
## Community Server Channels
|
||||
|
||||
Community Server channels (i.e., `#rules` and `#moderator-only`) are actually mandatory and their existence is enforced
|
||||
by the API, therefore this plugin cannot remove the restrictions behind them.
|
||||
|
@ -50,17 +50,6 @@ export default definePlugin({
|
||||
}
|
||||
],
|
||||
predicate: () => settings.store.onboarding
|
||||
},
|
||||
// Onboarding deletion
|
||||
{
|
||||
find: "Messages.DELETE_DEFAULT_CHANNEL_BODY",
|
||||
replacement: [
|
||||
{
|
||||
match: /if\((?=null!=\i.{5,20}Messages.DELETE_DEFAULT_CHANNEL_BODY)/,
|
||||
replace: "$&false&&"
|
||||
}
|
||||
],
|
||||
predicate: () => settings.store.onboarding
|
||||
}
|
||||
],
|
||||
settings
|
||||
|
@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import "./styles.css";
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
@ -41,6 +43,7 @@ export default definePlugin({
|
||||
{tooltipProps => (
|
||||
<div
|
||||
{...tooltipProps}
|
||||
className="vc-pip-button"
|
||||
role="button"
|
||||
style={{
|
||||
cursor: "pointer",
|
||||
@ -71,7 +74,7 @@ export default definePlugin({
|
||||
>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24">
|
||||
<path
|
||||
fill="var(--interactive-normal)"
|
||||
fill="currentColor"
|
||||
d="M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"
|
||||
/>
|
||||
</svg>
|
||||
|
8
src/plugins/pictureInPicture/styles.css
Normal file
8
src/plugins/pictureInPicture/styles.css
Normal file
@ -0,0 +1,8 @@
|
||||
.vc-pip-button {
|
||||
color: var(--interactive-normal);
|
||||
}
|
||||
|
||||
.vc-pip-button:hover {
|
||||
background-color: var(--background-modifier-hover);
|
||||
color: var(--interactive-hover);
|
||||
}
|
Reference in New Issue
Block a user