AlwaysAnimate: Use Settings
This commit is contained in:
parent
7cd410eb7b
commit
2031927d03
5 changed files with 48 additions and 14 deletions
|
|
@ -93,7 +93,7 @@ export default settings;
|
|||
|
||||
const BadgeSettings = () => {
|
||||
const [images, setImages] = useState([
|
||||
{ src: "https://images.equicord.org/api/v1/files/raw/0199e71a-5555-7000-aafb-a07a355d9b28", shown: settings.store.showEquicordDonor, title: "Equicord donor badges", key: "EquicordDonor", position: settings.store.EquicordDonorPosition },
|
||||
{ src: "https://images.equicord.org/api/files/raw/0199e71a-5555-7000-aafb-a07a355d9b28", shown: settings.store.showEquicordDonor, title: "Equicord donor badges", key: "EquicordDonor", position: settings.store.EquicordDonorPosition },
|
||||
{ src: "https://equicord.org/assets/favicon.png", shown: settings.store.showEquicordContributor, title: "Equicord contributor badge", key: "EquicordContributer", position: settings.store.EquicordContributorPosition },
|
||||
{ src: "https://cdn.discordapp.com/emojis/1026533070955872337.png", shown: settings.store.showVencordDonor, title: "Vencord donor badges", key: "VencordDonor", position: settings.store.VencordDonorPosition },
|
||||
{ src: "https://cdn.discordapp.com/emojis/1092089799109775453.png", shown: settings.store.showVencordContributor, title: "Vencord contributor badge", key: "VencordContributer", position: settings.store.VencordContributorPosition },
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ const settings = definePluginSettings({
|
|||
imageLink: {
|
||||
description: "URL for the image (button and modal)",
|
||||
type: OptionType.STRING,
|
||||
default: "https://images.equicord.org/api/v1/files/raw/0199e730-70d5-7000-a44f-d1acb42064cc",
|
||||
default: "https://images.equicord.org/api/files/raw/0199e730-70d5-7000-a44f-d1acb42064cc",
|
||||
},
|
||||
songLink: {
|
||||
description: "URL for the song to play",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function blockedComponentRender(sticker) {
|
|||
|
||||
if (showGif) {
|
||||
elements.push(
|
||||
<img key="gif" src="https://images.equicord.org/api/v1/files/raw/0199e730-70cd-7001-ab3b-4c0ff258ec79" style={{ width: "160px", borderRadius: "20px" }} />
|
||||
<img key="gif" src="https://images.equicord.org/api/files/raw/0199e730-70cd-7001-ab3b-4c0ff258ec79" style={{ width: "160px", borderRadius: "20px" }} />
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import { EquicordDonorModal, VencordDonorModal } from "./modals";
|
|||
|
||||
const CONTRIBUTOR_BADGE = "https://cdn.discordapp.com/emojis/1092089799109775453.png?size=64";
|
||||
const EQUICORD_CONTRIBUTOR_BADGE = "https://equicord.org/assets/favicon.png";
|
||||
const EQUICORD_DONOR_BADGE = "https://images.equicord.org/api/v1/files/raw/0199e71a-5555-7000-aafb-a07a355d9b28";
|
||||
const EQUICORD_DONOR_BADGE = "https://images.equicord.org/api/files/raw/0199e71a-5555-7000-aafb-a07a355d9b28";
|
||||
|
||||
const ContributorBadge: ProfileBadge = {
|
||||
description: "Vencord Contributor",
|
||||
|
|
|
|||
|
|
@ -16,17 +16,47 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
const settings = definePluginSettings({
|
||||
icons: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Always animate server icons, avatars, decor and more",
|
||||
default: true,
|
||||
},
|
||||
statusEmojis: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Always animate status emojis",
|
||||
default: true,
|
||||
},
|
||||
serverBanners: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Always animate server banners",
|
||||
default: true,
|
||||
},
|
||||
nameplates: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Always animate nameplates",
|
||||
default: true,
|
||||
},
|
||||
roleGradients: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Always animate role gradients",
|
||||
default: true,
|
||||
}
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
name: "AlwaysAnimate",
|
||||
description: "Animates anything that can be animated",
|
||||
authors: [Devs.FieryFlames],
|
||||
|
||||
settings,
|
||||
patches: [
|
||||
{
|
||||
find: "canAnimate:",
|
||||
predicate: () => settings.store.icons,
|
||||
all: true,
|
||||
// Some modules match the find but the replacement is returned untouched
|
||||
noWarn: true,
|
||||
|
|
@ -42,6 +72,7 @@ export default definePlugin({
|
|||
{
|
||||
// Status emojis
|
||||
find: "#{intl::GUILD_OWNER}),children:",
|
||||
predicate: () => settings.store.statusEmojis,
|
||||
replacement: {
|
||||
match: /(\.CUSTOM_STATUS.+?animateEmoji:)\i/,
|
||||
replace: "$1!0"
|
||||
|
|
@ -50,14 +81,25 @@ export default definePlugin({
|
|||
{
|
||||
// Guild Banner
|
||||
find: ".animatedBannerHoverLayer,onMouseEnter:",
|
||||
predicate: () => settings.store.serverBanners,
|
||||
replacement: {
|
||||
match: /(\.headerContent.+?guildBanner:\i,animate:)\i/,
|
||||
replace: "$1!0"
|
||||
}
|
||||
},
|
||||
{
|
||||
// Nameplates
|
||||
find: ".MINI_PREVIEW,[",
|
||||
predicate: () => settings.store.nameplates,
|
||||
replacement: {
|
||||
match: /animate:\i,loop:.{0,15}===\i/,
|
||||
replace: "animate:true,loop:true"
|
||||
},
|
||||
},
|
||||
{
|
||||
// Role Gradients
|
||||
find: "animateGradient:",
|
||||
predicate: () => settings.store.roleGradients,
|
||||
all: true,
|
||||
noWarn: true,
|
||||
replacement: {
|
||||
|
|
@ -69,13 +111,5 @@ export default definePlugin({
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
// Nameplates
|
||||
find: ".MINI_PREVIEW,[",
|
||||
replacement: {
|
||||
match: /animate:\i,loop:/,
|
||||
replace: "animate:true,loop:true,_loop:"
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue