Merge branch 'main' into threaded-arrpc

This commit is contained in:
Justin 2025-01-31 14:41:59 -05:00
commit 744d7ed93e
No known key found for this signature in database
GPG key ID: A260B29AA42DE5A6
10 changed files with 975 additions and 787 deletions

View file

@ -24,6 +24,7 @@ body:
- Issues with Input Methods[^4] - Issues with Input Methods[^4]
- Issues with File Drag and Drop[^5] - Issues with File Drag and Drop[^5]
- Network Errors[^6] - Network Errors[^6]
- Anything about Screenshare Performance[^7]
Linux users: Please only report issues with supported packages (flatpak and any builds from the README / releases). Linux users: Please only report issues with supported packages (flatpak and any builds from the README / releases).
We do not support other packages, like the AUR or Nix packages, so please first make sure your issue is reproducible with official releases, We do not support other packages, like the AUR or Nix packages, so please first make sure your issue is reproducible with official releases,
@ -36,6 +37,8 @@ body:
[^4]: These things are handled by Chromium / Electron, not us. If they don't work, it's either an issue with your system or a bug with Chromium. [^4]: These things are handled by Chromium / Electron, not us. If they don't work, it's either an issue with your system or a bug with Chromium.
[^5]: You are likely using the Vesktop flatpak and trying to drop a file the flatpak can't access. You can fix this by installing Flatseal and using it to grant Vesktop full access to your files [^5]: You are likely using the Vesktop flatpak and trying to drop a file the flatpak can't access. You can fix this by installing Flatseal and using it to grant Vesktop full access to your files
[^6]: Issue on your end, you have to fix it. Try changing your DNS to [1.1.1.1 (Cloudflare DNS)](https://developers.cloudflare.com/1.1.1.1/setup/) [^6]: Issue on your end, you have to fix it. Try changing your DNS to [1.1.1.1 (Cloudflare DNS)](https://developers.cloudflare.com/1.1.1.1/setup/)
[^7]: Screensharing is managed entirely by Chromium and your System. For optimal performance, make sure you [enable Hardware Acceleration](https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration).
Depending on GPU driver, it might not be supported. We are actively working on making this work out of the box everywhere.
- type: input - type: input
id: discord id: discord

View file

@ -53,6 +53,7 @@ Below you can find unofficial packages created by the community. They are not of
- Arch Linux: [Vesktop on the Arch user repository](https://aur.archlinux.org/packages?K=vesktop) - Arch Linux: [Vesktop on the Arch user repository](https://aur.archlinux.org/packages?K=vesktop)
- NixOS: https://wiki.nixos.org/wiki/Discord#Vesktop - NixOS: https://wiki.nixos.org/wiki/Discord#Vesktop
- Slackware: [Vesktop on the SlackBuilds](https://slackbuilds.org/result/?search=vesktop)
- Windows - Scoop: https://scoop.sh/#/apps?q=Vesktop - Windows - Scoop: https://scoop.sh/#/apps?q=Vesktop
## Building from Source ## Building from Source

View file

@ -21,10 +21,12 @@
"test": "pnpm lint && pnpm testTypes", "test": "pnpm lint && pnpm testTypes",
"testTypes": "tsc --noEmit", "testTypes": "tsc --noEmit",
"watch": "pnpm build --watch", "watch": "pnpm build --watch",
"updateMeta": "tsx scripts/utils/updateMeta.mts" "updateMeta": "tsx scripts/utils/updateMeta.mts",
"updateArrpcDB": "node ./node_modules/arrpc/update_db.js",
"postinstall": "pnpm updateArrpcDB"
}, },
"dependencies": { "dependencies": {
"arrpc": "github:OpenAsar/arrpc#5aadc307cb9bf4479f0a12364a253b07a77ace22", "arrpc": "github:OpenAsar/arrpc#2234e9c9111f4c42ebcc3aa6a2215bfd979eef77",
"electron-updater": "^6.3.9" "electron-updater": "^6.3.9"
}, },
"optionalDependencies": { "optionalDependencies": {
@ -32,27 +34,27 @@
}, },
"devDependencies": { "devDependencies": {
"@fal-works/esbuild-plugin-global-externals": "^2.1.2", "@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@stylistic/eslint-plugin": "^2.11.0", "@stylistic/eslint-plugin": "^2.13.0",
"@types/node": "^22.10.1", "@types/node": "^22.10.7",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"@vencord/types": "^1.8.4", "@vencord/types": "^1.8.4",
"dotenv": "^16.4.6", "dotenv": "^16.4.7",
"electron": "^33.2.1", "electron": "^34.0.1",
"electron-builder": "^25.1.8", "electron-builder": "^25.1.8",
"esbuild": "^0.24.0", "esbuild": "^0.24.2",
"eslint": "^9.16.0", "eslint": "^9.18.0",
"eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-path-alias": "^2.1.0", "eslint-plugin-path-alias": "^2.1.0",
"eslint-plugin-prettier": "^5.2.1", "eslint-plugin-prettier": "^5.2.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",
"prettier": "^3.4.1", "prettier": "^3.4.2",
"source-map-support": "^0.5.21", "source-map-support": "^0.5.21",
"tsx": "^4.19.2", "tsx": "^4.19.2",
"type-fest": "^4.30.0", "type-fest": "^4.33.0",
"typescript": "^5.7.2", "typescript": "^5.7.3",
"typescript-eslint": "^8.17.0", "typescript-eslint": "^8.21.0",
"xml-formatter": "^3.6.3" "xml-formatter": "^3.6.3"
}, },
"packageManager": "pnpm@9.1.0", "packageManager": "pnpm@9.1.0",

1652
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -135,6 +135,17 @@ handle(IpcEvents.CLIPBOARD_COPY_IMAGE, async (_, buf: ArrayBuffer, src: string)
}); });
}); });
function openDebugPage(page: string) {
const win = new BrowserWindow({
autoHideMenuBar: true
});
win.loadURL(page);
}
handle(IpcEvents.DEBUG_LAUNCH_GPU, () => openDebugPage("chrome://gpu"));
handle(IpcEvents.DEBUG_LAUNCH_WEBRTC_INTERNALS, () => openDebugPage("chrome://webrtc-internals"));
function readCss() { function readCss() {
return readFile(VENCORD_QUICKCSS_FILE, "utf-8").catch(() => ""); return readFile(VENCORD_QUICKCSS_FILE, "utf-8").catch(() => "");
} }

View file

@ -78,5 +78,9 @@ export const VesktopNative = {
clipboard: { clipboard: {
copyImage: (imageBuffer: Uint8Array, imageSrc: string) => copyImage: (imageBuffer: Uint8Array, imageSrc: string) =>
invoke<void>(IpcEvents.CLIPBOARD_COPY_IMAGE, imageBuffer, imageSrc) invoke<void>(IpcEvents.CLIPBOARD_COPY_IMAGE, imageBuffer, imageSrc)
},
debug: {
launchGpu: () => invoke<void>(IpcEvents.DEBUG_LAUNCH_GPU),
launchWebrtcInternals: () => invoke<void>(IpcEvents.DEBUG_LAUNCH_WEBRTC_INTERNALS)
} }
}; };

View file

@ -4,12 +4,56 @@
* Copyright (c) 2023 Vendicated and Vencord contributors * Copyright (c) 2023 Vendicated and Vencord contributors
*/ */
import { useForceUpdater } from "@vencord/types/utils"; import {
import { Button, Forms, Toasts } from "@vencord/types/webpack/common"; Margins,
ModalCloseButton,
ModalContent,
ModalHeader,
ModalRoot,
ModalSize,
openModal,
useForceUpdater
} from "@vencord/types/utils";
import { Button, Forms, Text, Toasts } from "@vencord/types/webpack/common";
import { Settings } from "shared/settings";
import { SettingsComponent } from "./Settings"; import { SettingsComponent } from "./Settings";
export const VencordLocationPicker: SettingsComponent = ({ settings }) => { export const DeveloperOptionsButton: SettingsComponent = ({ settings }) => {
return <Button onClick={() => openDeveloperOptionsModal(settings)}>Open Developer Settings</Button>;
};
function openDeveloperOptionsModal(settings: Settings) {
openModal(props => (
<ModalRoot {...props} size={ModalSize.MEDIUM}>
<ModalHeader>
<Text variant="heading-lg/semibold" style={{ flexGrow: 1 }}>
Vesktop Developer Options
</Text>
<ModalCloseButton onClick={props.onClose} />
</ModalHeader>
<ModalContent>
<div style={{ padding: "1em 0" }}>
<Forms.FormTitle tag="h5">Vencord Location</Forms.FormTitle>
<VencordLocationPicker settings={settings} />
<Forms.FormTitle tag="h5" className={Margins.top16}>
Debugging
</Forms.FormTitle>
<div className="vcd-settings-button-grid">
<Button onClick={() => VesktopNative.debug.launchGpu()}>Open chrome://gpu</Button>
<Button onClick={() => VesktopNative.debug.launchWebrtcInternals()}>
Open chrome://webrtc-internals
</Button>
</div>
</div>
</ModalContent>
</ModalRoot>
));
}
const VencordLocationPicker: SettingsComponent = ({ settings }) => {
const forceUpdate = useForceUpdater(); const forceUpdate = useForceUpdater();
const vencordDir = VesktopNative.fileManager.getVencordDir(); const vencordDir = VesktopNative.fileManager.getVencordDir();
@ -31,7 +75,7 @@ export const VencordLocationPicker: SettingsComponent = ({ settings }) => {
"the default location" "the default location"
)} )}
</Forms.FormText> </Forms.FormText>
<div className="vcd-location-btns"> <div className="vcd-settings-button-grid">
<Button <Button
size={Button.Sizes.SMALL} size={Button.Sizes.SMALL}
onClick={async () => { onClick={async () => {

View file

@ -12,9 +12,9 @@ import { Settings, useSettings } from "renderer/settings";
import { isMac, isWindows } from "renderer/utils"; import { isMac, isWindows } from "renderer/utils";
import { AutoStartToggle } from "./AutoStartToggle"; import { AutoStartToggle } from "./AutoStartToggle";
import { DeveloperOptionsButton } from "./DeveloperOptions";
import { DiscordBranchPicker } from "./DiscordBranchPicker"; import { DiscordBranchPicker } from "./DiscordBranchPicker";
import { NotificationBadgeToggle } from "./NotificationBadgeToggle"; import { NotificationBadgeToggle } from "./NotificationBadgeToggle";
import { VencordLocationPicker } from "./VencordLocationPicker";
import { WindowsTransparencyControls } from "./WindowsTransparencyControls"; import { WindowsTransparencyControls } from "./WindowsTransparencyControls";
interface BooleanSetting { interface BooleanSetting {
@ -118,7 +118,7 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
defaultValue: false defaultValue: false
} }
], ],
"Vencord Location": [VencordLocationPicker] "Developer Options": [DeveloperOptionsButton]
}; };
function SettingsSections() { function SettingsSections() {

View file

@ -1,4 +1,4 @@
.vcd-location-btns { .vcd-settings-button-grid {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 0.5em; gap: 0.5em;

View file

@ -50,5 +50,8 @@ export const enum IpcEvents {
ARRPC_ACTIVITY = "VCD_ARRPC_ACTIVITY", ARRPC_ACTIVITY = "VCD_ARRPC_ACTIVITY",
CLIPBOARD_COPY_IMAGE = "VCD_CLIPBOARD_COPY_IMAGE" CLIPBOARD_COPY_IMAGE = "VCD_CLIPBOARD_COPY_IMAGE",
DEBUG_LAUNCH_GPU = "VCD_DEBUG_LAUNCH_GPU",
DEBUG_LAUNCH_WEBRTC_INTERNALS = "VCD_DEBUG_LAUNCH_WEBRTC"
} }