Merge branch 'main' into fix/macos-app-region-workaround
This commit is contained in:
commit
3bdc1efe79
7 changed files with 3238 additions and 2695 deletions
|
@ -53,7 +53,7 @@ If you don't know the difference, pick amd64.
|
|||
Below you can find unofficial packages created by the community. They are not officially supported by us, so before reporting issues, please first confirm the issue also happens on official builds. When in doubt, consult with their packager first. The flatpak and AppImage should work on any distro that [supports them](https://flatpak.org/setup/), so I recommend you just use those instead!
|
||||
|
||||
- Arch Linux: [Vesktop on the Arch user repository](https://aur.archlinux.org/packages?K=vesktop)
|
||||
- NixOS: https://nixos.wiki/wiki/Discord#Vesktop
|
||||
- NixOS: https://wiki.nixos.org/wiki/Discord#Vesktop
|
||||
- Windows - Scoop: https://scoop.sh/#/apps?q=Vesktop
|
||||
|
||||
## Building from Source
|
||||
|
|
35
package.json
35
package.json
|
@ -27,15 +27,15 @@
|
|||
"arrpc": "github:OpenAsar/arrpc#6960a8fd4d65d566da93dbdb8a7ca474aa0a3c9c"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@vencord/venmic": "^3.4.2"
|
||||
"@vencord/venmic": "^3.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||
"@types/node": "^20.11.26",
|
||||
"@types/react": "^18.2.65",
|
||||
"@types/react": "^18.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
||||
"@typescript-eslint/parser": "^7.2.0",
|
||||
"@vencord/types": "^0.1.2",
|
||||
"@vencord/types": "^1.8.4",
|
||||
"dotenv": "^16.4.5",
|
||||
"electron": "^29.1.1",
|
||||
"electron-builder": "^24.13.3",
|
||||
|
@ -55,7 +55,7 @@
|
|||
"typescript": "^5.4.2",
|
||||
"xml-formatter": "^3.6.2"
|
||||
},
|
||||
"packageManager": "pnpm@8.11.0",
|
||||
"packageManager": "pnpm@9.1.0",
|
||||
"engines": {
|
||||
"node": ">=18",
|
||||
"pnpm": ">=8"
|
||||
|
@ -136,20 +136,21 @@
|
|||
"icon": "build/icon.icns",
|
||||
"iconSize": 105,
|
||||
"window": {
|
||||
"width": 512,
|
||||
"height": 340
|
||||
"width": 512,
|
||||
"height": 340
|
||||
},
|
||||
|
||||
"contents": [{
|
||||
"x": 140,
|
||||
"y": 160
|
||||
},
|
||||
{
|
||||
"x": 372,
|
||||
"y": 160,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
}]
|
||||
"contents": [
|
||||
{
|
||||
"x": 140,
|
||||
"y": 160
|
||||
},
|
||||
{
|
||||
"x": 372,
|
||||
"y": 160,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nsis": {
|
||||
"include": "build/installer.nsh",
|
||||
|
|
5871
pnpm-lock.yaml
5871
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -40,6 +40,10 @@ function init() {
|
|||
app.commandLine.appendSwitch("disable-smooth-scrolling");
|
||||
}
|
||||
|
||||
// disable renderer backgrounding to prevent the app from unloading when in the background
|
||||
// https://github.com/electron/electron/issues/2822
|
||||
app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
||||
|
||||
// work around chrome 66 disabling autoplay by default
|
||||
app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");
|
||||
// WinRetrieveSuggestionsOnlyOnDemand: Work around electron 13 bug w/ async spellchecking on Windows.
|
||||
|
|
|
@ -12,6 +12,7 @@ import {
|
|||
Menu,
|
||||
MenuItemConstructorOptions,
|
||||
nativeTheme,
|
||||
screen,
|
||||
Tray
|
||||
} from "electron";
|
||||
import { rm } from "fs/promises";
|
||||
|
@ -269,7 +270,9 @@ function getWindowBoundsOptions(): BrowserWindowConstructorOptions {
|
|||
height: height ?? DEFAULT_HEIGHT
|
||||
} as BrowserWindowConstructorOptions;
|
||||
|
||||
if (x != null && y != null) {
|
||||
const storedDisplay = screen.getAllDisplays().find(display => display.id === State.store.displayid);
|
||||
|
||||
if (x != null && y != null && storedDisplay) {
|
||||
options.x = x;
|
||||
options.y = y;
|
||||
}
|
||||
|
@ -317,6 +320,7 @@ function initWindowBoundsListeners(win: BrowserWindow) {
|
|||
|
||||
const saveBounds = () => {
|
||||
State.store.windowBounds = win.getBounds();
|
||||
State.store.displayid = screen.getDisplayMatching(State.store.windowBounds).id;
|
||||
};
|
||||
|
||||
win.on("resize", saveBounds);
|
||||
|
|
|
@ -63,20 +63,6 @@ addPatch({
|
|||
match: /this.localWant=/,
|
||||
replace: "$self.patchStreamQuality(this);$&"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: "x-google-max-bitrate",
|
||||
replacement: [
|
||||
{
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
match: /"x-google-max-bitrate=".concat\(\i\)/,
|
||||
replace: '"x-google-max-bitrate=".concat("80_000")'
|
||||
},
|
||||
{
|
||||
match: /;level-asymmetry-allowed=1/,
|
||||
replace: ";b=AS:800000;level-asymmetry-allowed=1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
patchStreamQuality(opts: any) {
|
||||
|
|
1
src/shared/settings.d.ts
vendored
1
src/shared/settings.d.ts
vendored
|
@ -36,6 +36,7 @@ export interface State {
|
|||
maximized?: boolean;
|
||||
minimized?: boolean;
|
||||
windowBounds?: Rectangle;
|
||||
displayid: int;
|
||||
|
||||
skippedUpdate?: string;
|
||||
firstLaunch?: boolean;
|
||||
|
|
Reference in a new issue