mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -04:00
Equicord Protocol
This commit is contained in:
parent
7518709310
commit
485452f65a
7 changed files with 32 additions and 7 deletions
|
@ -67,7 +67,7 @@ export const _handleCommand = function (cmd: Command, args: Argument[], ctx: Com
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
content: `${msg}:\n${makeCodeblock(reason)}`,
|
content: `${msg}:\n${makeCodeblock(reason)}`,
|
||||||
author: {
|
author: {
|
||||||
username: "Vencord"
|
username: "Equicord"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { openNewPluginsModal } from "./NewPluginsModal";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NewPluginsManager",
|
name: "NewPluginsManager",
|
||||||
description: "Utility that notifies you when new plugins are added to Vencord",
|
description: "Utility that notifies you when new plugins are added to Equicord",
|
||||||
authors: [Devs.Sqaaakoi],
|
authors: [Devs.Sqaaakoi],
|
||||||
flux: {
|
flux: {
|
||||||
async POST_CONNECTION_OPEN() {
|
async POST_CONNECTION_OPEN() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ const rootTitle = { base: null as string | null };
|
||||||
export const settings = definePluginSettings({
|
export const settings = definePluginSettings({
|
||||||
title: {
|
title: {
|
||||||
type: OptionType.STRING,
|
type: OptionType.STRING,
|
||||||
default: "Vencord",
|
default: "Equicord",
|
||||||
description: "Window title prefix",
|
description: "Window title prefix",
|
||||||
onChange: setTitle,
|
onChange: setTitle,
|
||||||
},
|
},
|
||||||
|
|
|
@ -241,7 +241,7 @@ async function createActivity(): Promise<Activity | undefined> {
|
||||||
|
|
||||||
let { type } = settings.store;
|
let { type } = settings.store;
|
||||||
|
|
||||||
let appName = "Vencord";
|
let appName = "Equicord";
|
||||||
let details = "";
|
let details = "";
|
||||||
let state = "";
|
let state = "";
|
||||||
let imageBig = "";
|
let imageBig = "";
|
||||||
|
|
|
@ -53,6 +53,31 @@ if (IS_VESKTOP || !IS_VANILLA) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
protocol.registerFileProtocol("equicord", ({ url: unsafeUrl }, cb) => {
|
||||||
|
let url = unsafeUrl.slice("equicord://".length);
|
||||||
|
if (url.endsWith("/")) url = url.slice(0, -1);
|
||||||
|
if (url.startsWith("/themes/")) {
|
||||||
|
const theme = url.slice("/themes/".length);
|
||||||
|
const safeUrl = ensureSafePath(THEMES_DIR, theme);
|
||||||
|
if (!safeUrl) {
|
||||||
|
cb({ statusCode: 403 });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cb(safeUrl.replace(/\?v=\d+$/, ""));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (url) {
|
||||||
|
case "renderer.js.map":
|
||||||
|
case "preload.js.map":
|
||||||
|
case "patcher.js.map":
|
||||||
|
case "main.js.map":
|
||||||
|
cb(join(__dirname, url));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
cb({ statusCode: 403 });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (RendererSettings.store.enableReactDevtools)
|
if (RendererSettings.store.enableReactDevtools)
|
||||||
installExt("fmkadmapgofadopljbjfkapdkoienihi")
|
installExt("fmkadmapgofadopljbjfkapdkoienihi")
|
||||||
|
|
|
@ -271,7 +271,7 @@ function sendMsgNotif(titleString: string, content: string, message: Message) {
|
||||||
content: content,
|
content: content,
|
||||||
useBase64Icon: true,
|
useBase64Icon: true,
|
||||||
icon: result,
|
icon: result,
|
||||||
sourceApp: "Vencord"
|
sourceApp: "Equicord"
|
||||||
};
|
};
|
||||||
Native.sendToOverlay(msgData);
|
Native.sendToOverlay(msgData);
|
||||||
});
|
});
|
||||||
|
@ -290,7 +290,7 @@ function sendOtherNotif(content: string, titleString: string) {
|
||||||
content: content,
|
content: content,
|
||||||
useBase64Icon: false,
|
useBase64Icon: false,
|
||||||
icon: null,
|
icon: null,
|
||||||
sourceApp: "Vencord"
|
sourceApp: "Equicord"
|
||||||
};
|
};
|
||||||
Native.sendToOverlay(msgData);
|
Native.sendToOverlay(msgData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ export async function compileUsercss(fileName: string) {
|
||||||
const preprocessorFn = preprocessors[preprocessor];
|
const preprocessorFn = preprocessors[preprocessor];
|
||||||
|
|
||||||
if (!preprocessorFn) {
|
if (!preprocessorFn) {
|
||||||
UserCSSLogger.error("File", fileName, "requires preprocessor", preprocessor, "which isn't known to Vencord");
|
UserCSSLogger.error("File", fileName, "requires preprocessor", preprocessor, "which isn't known to Equicord");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue