parent
80b279d3c3
commit
cb288e204d
@ -1,6 +1,7 @@
|
||||
export * as Plugins from "./plugins";
|
||||
export * as Webpack from "./utils/webpack";
|
||||
export * as Api from "./api";
|
||||
export * as Components from "./components";
|
||||
|
||||
import "./utils/patchWebpack";
|
||||
import "./utils/quickCss";
|
||||
|
@ -0,0 +1,4 @@
|
||||
export default function Settings(props) {
|
||||
console.log(props);
|
||||
return (<p>Hi</p>);
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export default () => {
|
||||
<div>
|
||||
Hi
|
||||
</div>;
|
||||
};
|
@ -0,0 +1 @@
|
||||
export { default as Settings } from "./Settings";
|
@ -1,17 +0,0 @@
|
||||
import definePlugin from "../utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "ClientInfo",
|
||||
description: "Adds extra info to Client Info in settings",
|
||||
author: "Vendicated",
|
||||
patches: [{
|
||||
find: "default.versionHash",
|
||||
replacement: {
|
||||
match: /\w\.createElement.+?["']Host ["'].+?\):null/,
|
||||
replace: m => {
|
||||
const idx = m.indexOf("Host") - 1;
|
||||
return `${m},${m.slice(0, idx)}"Vencord ".repeat(50),"1.0.0")," ")`;
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
@ -0,0 +1,39 @@
|
||||
import definePlugin from "../utils/types";
|
||||
import gitHash from "git-hash";
|
||||
|
||||
export default definePlugin({
|
||||
name: "Settings",
|
||||
description: "Adds Settings UI and debug info",
|
||||
author: "Vendicated",
|
||||
patches: [{
|
||||
find: "default.versionHash",
|
||||
replacement: [
|
||||
{
|
||||
match: /return .{1,2}\("div"/,
|
||||
replace: (m) => {
|
||||
return `var versions=VencordNative.getVersions();${m}`;
|
||||
}
|
||||
},
|
||||
{
|
||||
match: /\w\.createElement.+?["']Host ["'].+?\):null/,
|
||||
replace: m => {
|
||||
const idx = m.indexOf("Host") - 1;
|
||||
const template = m.slice(0, idx);
|
||||
return `${m}, ${template}"Vencord ", "${gitHash}"), " "), ` +
|
||||
`${template} "Electron ", versions.electron), " "), ` +
|
||||
`${template} "Chrome ", versions.chrome), " ")`;
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
find: "Messages.ACTIVITY_SETTINGS",
|
||||
replacement: {
|
||||
match: /\{section:(.{1,2})\.SectionTypes\.HEADER,label:(.{1,2})\.default\.Messages\.ACTIVITY_SETTINGS\}/,
|
||||
replace: (m, mod) =>
|
||||
`{section:${mod}.SectionTypes.HEADER,label:"Vencord"},` +
|
||||
`{section:"Vencord",label:"Vencord",element:Vencord.Components.Settings},` +
|
||||
`{section:${mod}.SectionTypes.DIVIDER},${m}`
|
||||
|
||||
}
|
||||
}]
|
||||
});
|
@ -1,4 +1,9 @@
|
||||
declare module "plugins" {
|
||||
const plugins: import("./utils/types").Plugin[];
|
||||
export default plugins;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "git-hash" {
|
||||
const hash: string;
|
||||
export default hash;
|
||||
}
|
||||
|
Loading…
Reference in new issue