Merge branch 'main' of github.com:Vendicated/Vencord

This commit is contained in:
Vendicated 2022-10-02 02:51:10 +02:00
commit acd24cdc4f
No known key found for this signature in database
GPG Key ID: EC781ADFB93EFFA3
2 changed files with 15 additions and 7 deletions

View File

@ -69,10 +69,17 @@ export default ErrorBoundary.wrap(function Settings() {
</Forms.FormTitle>
<Forms.FormText>
SettingsDir: {settingsDir}
SettingsDir: <code style={{ userSelect: 'text', cursor: 'text' }}>{settingsDir}</code>
</Forms.FormText>
<Flex className={classes(Margins.marginBottom20)}>
<Button
onClick={() => window.DiscordNative.app.relaunch()}
size={Button.Sizes.SMALL}
color={Button.Colors.GREEN}
>
Reload
</Button>
<Button
onClick={() => window.DiscordNative.fileManager.showItemInFolder(settingsDir)}
size={Button.Sizes.SMALL}
@ -88,24 +95,25 @@ export default ErrorBoundary.wrap(function Settings() {
Open QuickCSS File
</Button>
</Flex>
<Forms.FormDivider />
<Forms.FormTitle tag="h5">Settings</Forms.FormTitle>
<Switch
value={settings.useQuickCss}
onChange={v => settings.useQuickCss = v}
note="Enable QuickCss"
onChange={(v: boolean) => settings.useQuickCss = v}
note="Enable QuickCSS"
>
Use QuickCss
</Switch>
<Switch
value={settings.notifyAboutUpdates}
onChange={v => settings.notifyAboutUpdates = v}
onChange={(v: boolean) => settings.notifyAboutUpdates = v}
note="Shows a Toast on StartUp"
>
Get notified about new Updates
</Switch>
<Switch
value={settings.unsafeRequire}
onChange={v => settings.unsafeRequire = v}
onChange={(v: boolean) => settings.unsafeRequire = v}
note="Enables VencordNative.require. Useful for testing, very bad for security. Leave this off unless you need it."
>
Enable Unsafe Require

View File

@ -135,7 +135,7 @@ export function search(...filters: Array<string | RegExp>) {
const factories = wreq.m;
outer:
for (const id in factories) {
const factory = factories[id];
const factory = factories[id].original ?? factories[id];
const str: string = factory.toString();
for (const filter of filters) {
if (typeof filter === "string" && !str.includes(filter)) continue outer;