Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2025-02-18 14:43:57 -05:00
commit 547af260a5
No known key found for this signature in database
19 changed files with 683 additions and 1325 deletions

View file

@ -5,15 +5,9 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
# READ THIS BEFORE OPENING AN ISSUE ![Are you a developer? No? This form is not for you!](https://github.com/Vendicated/Vencord/blob/main/.github/ISSUE_TEMPLATE/developer-banner.png?raw=true)
This form is ONLY FOR DEVELOPERS. YOUR ISSUE WILL BE CLOSED AND YOU WILL POSSIBLY BE BLOCKED FROM THE REPOSITORY IF YOU IGNORE THIS. GitHub Issues are for development, not support! Please use our [support server](https://vencord.dev/discord) unless you are a Vencord Developer.
DO NOT USE THIS FORM, unless
- you are a equicord/vencord contributor
- you were given explicit permission to use this form by a moderator in our support server
DO NOT USE THIS FORM FOR SECURITY RELATED ISSUES. [CREATE A SECURITY ADVISORY INSTEAD.](https://github.com/Vendicated/Vencord/security/advisories/new)
- type: textarea - type: textarea
id: content id: content

View file

@ -7,24 +7,9 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
# READ THIS BEFORE OPENING AN ISSUE ![Are you a developer? No? This form is not for you!](https://github.com/Equicord/Equicord/blob/main/.github/ISSUE_TEMPLATE/developer-banner.png?raw=true)
This form is ONLY FOR DEVELOPERS. YOUR ISSUE WILL BE CLOSED AND YOU WILL POSSIBLY BE BLOCKED FROM THE REPOSITORY IF YOU IGNORE THIS. GitHub Issues are for development, not support! Please use our [support server](https://discord.gg/5Xh2W87egW) unless you are a Equicord/Vencord Developer.
DO NOT USE THIS FORM, unless
- you are a equicord/vencord contributor
- you were given explicit permission to use this form by a moderator in our support server
DO NOT USE THIS FORM FOR SECURITY RELATED ISSUES. [CREATE A SECURITY ADVISORY INSTEAD.](https://github.com/Equicord/Equicord/security/advisories/new)
- type: input
id: discord
attributes:
label: Discord Account
description: Who on Discord is making this request? Not required but encouraged for easier follow-up
placeholder: username#0000
validations:
required: false
- type: textarea - type: textarea
id: bug-description id: bug-description
@ -77,5 +62,5 @@ body:
options: options:
- label: I am using Discord Stable or tried on Stable and this bug happens there as well - label: I am using Discord Stable or tried on Stable and this bug happens there as well
required: true required: true
- label: I have read the requirements for opening an issue above - label: I am a Equicord/Vencord Developer
required: true required: true

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -25,7 +25,7 @@
"watchWeb": "pnpm buildWeb --watch", "watchWeb": "pnpm buildWeb --watch",
"generatePluginJson": "tsx scripts/generatePluginList.ts", "generatePluginJson": "tsx scripts/generatePluginList.ts",
"generateEquicordPluginJson": "tsx scripts/generateEquicordPluginList.ts", "generateEquicordPluginJson": "tsx scripts/generateEquicordPluginList.ts",
"generateTypes": "tspc --emitDeclarationOnly --declaration --outDir packages/vencord-types", "generateTypes": "tspc --emitDeclarationOnly --declaration --outDir packages/vencord-types --allowJs false",
"inject": "node scripts/runInstaller.mjs", "inject": "node scripts/runInstaller.mjs",
"uninject": "node scripts/runInstaller.mjs", "uninject": "node scripts/runInstaller.mjs",
"lint": "eslint", "lint": "eslint",
@ -57,31 +57,31 @@
"virtual-merge": "^1.0.1" "virtual-merge": "^1.0.1"
}, },
"devDependencies": { "devDependencies": {
"@stylistic/eslint-plugin": "^2.12.1", "@stylistic/eslint-plugin": "^4.0.0",
"@electron/asar": "^3.2.10", "@electron/asar": "^3.2.10",
"@types/chrome": "^0.0.287", "@types/chrome": "^0.0.304",
"@types/diff": "^6.0.0", "@types/diff": "^7.0.1",
"@types/lodash": "^4.17.14", "@types/lodash": "^4.17.14",
"@types/node": "^22.10.5", "@types/node": "^22.10.5",
"@types/react": "^19.0.2", "@types/react": "^19.0.10",
"@types/react-dom": "^19.0.2", "@types/react-dom": "^19.0.4",
"@types/yazl": "^2.4.5", "@types/yazl": "^2.4.5",
"diff": "^7.0.0", "diff": "^7.0.0",
"discord-types": "^1.3.26", "discord-types": "^1.3.26",
"esbuild": "^0.25.0", "esbuild": "^0.25.0",
"eslint": "^9.17.0", "eslint": "^9.20.1",
"eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-react": "^7.37.3", "eslint-plugin-react": "^7.37.3",
"eslint-plugin-simple-header": "^1.2.1", "eslint-plugin-simple-header": "^1.2.1",
"eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.4", "eslint-plugin-unused-imports": "^4.1.4",
"highlight.js": "11.7.0", "highlight.js": "11.11.1",
"html-minifier-terser": "^7.2.0", "html-minifier-terser": "^7.2.0",
"moment": "^2.22.2", "moment": "^2.22.2",
"puppeteer-core": "^23.11.1", "puppeteer-core": "^24.2.1",
"standalone-electron-types": "^1.0.0", "standalone-electron-types": "^34.2.0",
"stylelint": "^16.12.0", "stylelint": "^16.12.0",
"stylelint-config-standard": "^36.0.1", "stylelint-config-standard": "^37.0.0",
"ts-patch": "^3.3.0", "ts-patch": "^3.3.0",
"ts-pattern": "^5.6.0", "ts-pattern": "^5.6.0",
"tsx": "^4.19.2", "tsx": "^4.19.2",
@ -96,7 +96,7 @@
"packageManager": "pnpm@9.1.0", "packageManager": "pnpm@9.1.0",
"pnpm": { "pnpm": {
"patchedDependencies": { "patchedDependencies": {
"eslint@9.17.0": "patches/eslint@9.17.0.patch", "eslint@9.20.1": "patches/eslint@9.20.1.patch",
"@types/less@3.0.6": "patches/@types__less@3.0.6.patch" "@types/less@3.0.6": "patches/@types__less@3.0.6.patch"
}, },
"peerDependencyRules": { "peerDependencyRules": {

View file

@ -1,7 +1,7 @@
{ {
"name": "@vencord/types", "name": "@vencord/types",
"private": false, "private": false,
"version": "0.1.3", "version": "1.11.5",
"description": "", "description": "",
"types": "index.d.ts", "types": "index.d.ts",
"scripts": { "scripts": {
@ -13,16 +13,16 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"devDependencies": { "devDependencies": {
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",
"fs-extra": "^11.2.0", "fs-extra": "^11.3.0",
"tsx": "^3.12.6" "tsx": "^4.19.2"
}, },
"dependencies": { "dependencies": {
"@types/lodash": "^4.14.191", "@types/lodash": "4.17.15",
"@types/node": "^18.11.18", "@types/node": "^22.13.4",
"@types/react": "^18.2.0", "@types/react": "18.3.1",
"@types/react-dom": "^18.0.10", "@types/react-dom": "18.3.1",
"discord-types": "^1.3.26", "discord-types": "^1.3.26",
"standalone-electron-types": "^1.0.0", "standalone-electron-types": "^34.2.0",
"type-fest": "^3.5.3" "type-fest": "^4.35.0"
} }
} }

1751
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import type { Settings } from "@api/Settings";
import { PluginIpcMappings } from "@main/ipcPlugins"; import { PluginIpcMappings } from "@main/ipcPlugins";
import { IpcEvents } from "@shared/IpcEvents"; import { IpcEvents } from "@shared/IpcEvents";
import { IpcRes } from "@utils/types"; import { IpcRes } from "@utils/types";
import type { Settings } from "api/Settings";
import { ipcRenderer } from "electron"; import { ipcRenderer } from "electron";
function invoke<T = any>(event: IpcEvents, ...args: any[]) { function invoke<T = any>(event: IpcEvents, ...args: any[]) {

View file

@ -5,7 +5,7 @@
*/ */
import { CopyIcon, DeleteIcon } from "@components/Icons"; import { CopyIcon, DeleteIcon } from "@components/Icons";
import { Alerts, Clipboard, ContextMenuApi, Menu, UserStore } from "webpack/common"; import { Alerts, Clipboard, ContextMenuApi, Menu, UserStore } from "@webpack/common";
import { Decoration } from "../../lib/api"; import { Decoration } from "../../lib/api";
import { useCurrentUserDecorationsStore } from "../../lib/stores/CurrentUserDecorationsStore"; import { useCurrentUserDecorationsStore } from "../../lib/stores/CurrentUserDecorationsStore";

View file

@ -9,7 +9,7 @@ import { RendererSettings } from "main/settings";
app.on("browser-window-created", (_, win) => { app.on("browser-window-created", (_, win) => {
win.webContents.on("frame-created", (_, { frame }) => { win.webContents.on("frame-created", (_, { frame }) => {
frame.once("dom-ready", () => { frame?.once("dom-ready", () => {
if (frame.url.startsWith("https://open.spotify.com/embed/")) { if (frame.url.startsWith("https://open.spotify.com/embed/")) {
const settings = RendererSettings.store.plugins?.FixSpotifyEmbeds; const settings = RendererSettings.store.plugins?.FixSpotifyEmbeds;
if (!settings?.enabled) return; if (!settings?.enabled) return;

View file

@ -9,7 +9,7 @@ import { RendererSettings } from "main/settings";
app.on("browser-window-created", (_, win) => { app.on("browser-window-created", (_, win) => {
win.webContents.on("frame-created", (_, { frame }) => { win.webContents.on("frame-created", (_, { frame }) => {
frame.once("dom-ready", () => { frame?.once("dom-ready", () => {
if (frame.url.startsWith("https://www.youtube.com/")) { if (frame.url.startsWith("https://www.youtube.com/")) {
const settings = RendererSettings.store.plugins?.FixYoutubeEmbeds; const settings = RendererSettings.store.plugins?.FixYoutubeEmbeds;
if (!settings?.enabled) return; if (!settings?.enabled) return;

View file

@ -12,7 +12,7 @@ import { Devs } from "@utils/constants";
import { Margins } from "@utils/margins"; import { Margins } from "@utils/margins";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { findStoreLazy } from "@webpack"; import { findStoreLazy } from "@webpack";
import { Button, Forms, showToast, TextInput, Toasts, Tooltip, useEffect, useState } from "webpack/common"; import { Button, Forms, showToast, TextInput, Toasts, Tooltip, useEffect, useState } from "@webpack/common";
const enum ActivitiesTypes { const enum ActivitiesTypes {
Game, Game,

View file

@ -96,6 +96,6 @@
.vc-shiki-root .vc-shiki-table-cell:last-child { .vc-shiki-root .vc-shiki-table-cell:last-child {
padding-left: 8px; padding-left: 8px;
word-break: break-word; overflow-wrap: break-word;
width: 100%; width: 100%;
} }

View file

@ -77,7 +77,7 @@ export const SpotifyStore = proxyLazyWebpack(() => {
class SpotifyStore extends Store { class SpotifyStore extends Store {
public mPosition = 0; public mPosition = 0;
private start = 0; public _start = 0;
public track: Track | null = null; public track: Track | null = null;
public device: Device | null = null; public device: Device | null = null;
@ -100,26 +100,26 @@ export const SpotifyStore = proxyLazyWebpack(() => {
public get position(): number { public get position(): number {
let pos = this.mPosition; let pos = this.mPosition;
if (this.isPlaying) { if (this.isPlaying) {
pos += Date.now() - this.start; pos += Date.now() - this._start;
} }
return pos; return pos;
} }
public set position(p: number) { public set position(p: number) {
this.mPosition = p; this.mPosition = p;
this.start = Date.now(); this._start = Date.now();
} }
prev() { prev() {
this.req("post", "/previous"); this._req("post", "/previous");
} }
next() { next() {
this.req("post", "/next"); this._req("post", "/next");
} }
setVolume(percent: number) { setVolume(percent: number) {
this.req("put", "/volume", { this._req("put", "/volume", {
query: { query: {
volume_percent: Math.round(percent) volume_percent: Math.round(percent)
} }
@ -131,17 +131,17 @@ export const SpotifyStore = proxyLazyWebpack(() => {
} }
setPlaying(playing: boolean) { setPlaying(playing: boolean) {
this.req("put", playing ? "/play" : "/pause"); this._req("put", playing ? "/play" : "/pause");
} }
setRepeat(state: Repeat) { setRepeat(state: Repeat) {
this.req("put", "/repeat", { this._req("put", "/repeat", {
query: { state } query: { state }
}); });
} }
setShuffle(state: boolean) { setShuffle(state: boolean) {
this.req("put", "/shuffle", { this._req("put", "/shuffle", {
query: { state } query: { state }
}).then(() => { }).then(() => {
this.shuffle = state; this.shuffle = state;
@ -154,7 +154,7 @@ export const SpotifyStore = proxyLazyWebpack(() => {
this.isSettingPosition = true; this.isSettingPosition = true;
return this.req("put", "/seek", { return this._req("put", "/seek", {
query: { query: {
position_ms: Math.round(ms) position_ms: Math.round(ms)
} }
@ -164,7 +164,7 @@ export const SpotifyStore = proxyLazyWebpack(() => {
}); });
} }
private req(method: "post" | "get" | "put", route: string, data: any = {}) { _req(method: "post" | "get" | "put", route: string, data: any = {}) {
if (this.device?.is_active) if (this.device?.is_active)
(data.query ??= {}).device_id = this.device.id; (data.query ??= {}).device_id = this.device.id;

View file

@ -128,7 +128,7 @@ function VoiceChannelTooltip({ channel, isLocked }: VoiceChannelTooltipProps) {
); );
} }
interface VoiceChannelIndicatorProps { export interface VoiceChannelIndicatorProps {
userId: string; userId: string;
isActionButton?: boolean; isActionButton?: boolean;
shouldHighlight?: boolean; shouldHighlight?: boolean;

View file

@ -10,7 +10,7 @@ import adguard from "file://adguard.js?minify";
app.on("browser-window-created", (_, win) => { app.on("browser-window-created", (_, win) => {
win.webContents.on("frame-created", (_, { frame }) => { win.webContents.on("frame-created", (_, { frame }) => {
frame.once("dom-ready", () => { frame?.once("dom-ready", () => {
if (!RendererSettings.store.plugins?.YoutubeAdblock?.enabled) return; if (!RendererSettings.store.plugins?.YoutubeAdblock?.enabled) return;
if (frame.url.includes("youtube.com/embed/") || (frame.url.includes("discordsays") && frame.url.includes("youtube.com"))) { if (frame.url.includes("youtube.com/embed/") || (frame.url.includes("discordsays") && frame.url.includes("youtube.com"))) {

View file

@ -18,7 +18,6 @@
@media(width <= 485px) { @media(width <= 485px) {
.vc-image-modal { .vc-image-modal {
display: relative;
overflow: visible; overflow: visible;
overflow: initial; overflow: initial;
} }

View file

@ -16,7 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { runtimeHashMessageKey } from "@utils/intlHash";
import type { Channel } from "discord-types/general"; import type { Channel } from "discord-types/general";
import { _resolveReady, filters, findByCodeLazy, findByPropsLazy, findLazy, mapMangledModuleLazy, waitFor } from "../webpack"; import { _resolveReady, filters, findByCodeLazy, findByPropsLazy, findLazy, mapMangledModuleLazy, waitFor } from "../webpack";
@ -61,8 +60,8 @@ export const { match, P }: Pick<typeof import("ts-pattern"), "match" | "P"> = ma
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep"); export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
export const i18n = mapMangledModuleLazy('defaultLocale:"en-US"', { export const i18n = mapMangledModuleLazy('defaultLocale:"en-US"', {
t: filters.byProps(runtimeHashMessageKey("DISCORD")), t: m => m?.[Symbol.toStringTag] === "IntlMessagesProxy",
intl: filters.byProps("string", "format"), intl: m => m != null && Object.getPrototypeOf(m)?.withFormatters != null
}, true); }, true);
export let SnowflakeUtils: t.SnowflakeUtils; export let SnowflakeUtils: t.SnowflakeUtils;

View file

@ -506,7 +506,7 @@ function getAllPropertyNames(object: Record<PropertyKey, any>, includeNonEnumera
const getKeys = includeNonEnumerable ? Object.getOwnPropertyNames : Object.keys; const getKeys = includeNonEnumerable ? Object.getOwnPropertyNames : Object.keys;
do { do {
getKeys(object).forEach(name => names.add(name)); getKeys(object).forEach(name => name !== "__esModule" && names.add(name));
object = Object.getPrototypeOf(object); object = Object.getPrototypeOf(object);
} while (object != null); } while (object != null);