new plugin UnlockedAvatarZoom: allows crop zooming in further (#2287)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
Haruka 2024-04-09 04:56:28 +03:00 committed by GitHub
parent 38ffdd7d94
commit 34c74b43bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# UnlockedAvatarZoom
Allows you to zoom in further in the image crop tool when changing your avatar
![](https://raw.githubusercontent.com/Vencord/plugin-assets/main/UnlockedAvatarZoom/demo.avif)

View file

@ -0,0 +1,35 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { definePluginSettings } from "@api/Settings";
import { makeRange } from "@components/PluginSettings/components";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
const settings = definePluginSettings({
zoomMultiplier: {
type: OptionType.SLIDER,
description: "Zoom multiplier",
markers: makeRange(2, 16),
default: 4,
},
});
export default definePlugin({
name: "UnlockedAvatarZoom",
description: "Allows you to zoom in further in the image crop tool when changing your avatar",
authors: [Devs.nakoyasha],
settings,
patches: [
{
find: ".Messages.AVATAR_UPLOAD_EDIT_MEDIA",
replacement: {
match: /maxValue:\d/,
replace: "maxValue:$self.settings.store.zoomMultiplier",
}
}
]
});

View file

@ -426,6 +426,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
name: "newwares", name: "newwares",
id: 421405303951851520n id: 421405303951851520n
}, },
nakoyasha: {
name: "nakoyasha",
id: 222069018507345921n
},
Sqaaakoi: { Sqaaakoi: {
name: "Sqaaakoi", name: "Sqaaakoi",
id: 259558259491340288n id: 259558259491340288n