mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 01:23:03 -04:00
Vencord Standalone without git/node (#148)
This commit is contained in:
parent
ffbb52512c
commit
5fac8be0ae
30 changed files with 373 additions and 129 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Plugins from "plugins";
|
||||
import Plugins from "~plugins";
|
||||
|
||||
import { registerCommand, unregisterCommand } from "../api/Commands";
|
||||
import { Settings } from "../api/settings";
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { classes,useAwaiter } from "../../../utils";
|
||||
import { useAwaiter } from "../../../utils";
|
||||
import { Settings } from "../../../Vencord";
|
||||
import { UserStore } from "../../../webpack/common";
|
||||
import { PronounMapping, UserProfileProps } from "../types";
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import gitHash from "git-hash";
|
||||
|
||||
import { debounce } from "../../utils";
|
||||
import { VENCORD_USER_AGENT } from "../../utils/constants";
|
||||
import { debounce } from "../../utils/debounce";
|
||||
import { Settings } from "../../Vencord";
|
||||
import { PronounsFormat } from ".";
|
||||
import { PronounCode, PronounMapping, PronounsResponse } from "./types";
|
||||
|
@ -64,7 +63,7 @@ async function bulkFetchPronouns(ids: string[]): Promise<PronounsResponse> {
|
|||
method: "GET",
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"X-PronounDB-Source": `Vencord/${gitHash} (github.com/Vendicated/Vencord)`
|
||||
"X-PronounDB-Source": VENCORD_USER_AGENT
|
||||
}
|
||||
});
|
||||
return await req.json()
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Message } from "discord-types/general";
|
||||
import { PartialDeep } from "type-fest";
|
||||
|
||||
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
|
||||
import { lazyWebpack } from "../utils";
|
||||
import { Devs } from "../utils/constants";
|
||||
|
@ -27,33 +24,33 @@ import { filters } from "../webpack";
|
|||
import { FluxDispatcher } from "../webpack/common";
|
||||
|
||||
interface Album {
|
||||
id: string
|
||||
id: string;
|
||||
image: {
|
||||
height: number
|
||||
width: number
|
||||
url: string
|
||||
}
|
||||
name: string
|
||||
height: number;
|
||||
width: number;
|
||||
url: string;
|
||||
};
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface Artist {
|
||||
external_urls: {
|
||||
spotify: string
|
||||
}
|
||||
href: string
|
||||
id: string
|
||||
name: string
|
||||
type: "artist" | string
|
||||
uri: string
|
||||
spotify: string;
|
||||
};
|
||||
href: string;
|
||||
id: string;
|
||||
name: string;
|
||||
type: "artist" | string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
interface Track {
|
||||
id: string
|
||||
album: Album
|
||||
artists: Artist[]
|
||||
duration: number
|
||||
isLocal: boolean
|
||||
name: string
|
||||
id: string;
|
||||
album: Album;
|
||||
artists: Artist[];
|
||||
duration: number;
|
||||
isLocal: boolean;
|
||||
name: string;
|
||||
}
|
||||
|
||||
const Spotify = lazyWebpack(filters.byProps(["getPlayerState"]));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Vencord, a modification for Discord's desktop app
|
||||
* Copyright (c) 2022 Vendicated and contributors
|
||||
* Copyright (c) 2022 Vendicated and Megumin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import gitHash from "git-hash";
|
||||
import gitHash from "~git-hash";
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
|
@ -34,7 +34,13 @@ export default definePlugin({
|
|||
replace: m => {
|
||||
const idx = m.indexOf("Host") - 1;
|
||||
const template = m.slice(0, idx);
|
||||
let r = `${m}, ${template}"Vencord ", "${gitHash}${IS_WEB ? " (Web)" : ""}"), " ")`;
|
||||
const additionalInfo = IS_WEB
|
||||
? " (Web)"
|
||||
: IS_STANDALONE
|
||||
? " (Standalone)"
|
||||
: "";
|
||||
|
||||
let r = `${m}, ${template}"Vencord ", "${gitHash}${additionalInfo}"), " ")`;
|
||||
if (!IS_WEB) {
|
||||
r += `,${template} "Electron ",VencordNative.getVersions().electron)," "),`;
|
||||
r += `${template} "Chrome ",VencordNative.getVersions().chrome)," ")`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue