20 Commits

Author SHA1 Message Date
V
be9642eff1 Bump to v0.2.7 2023-07-26 02:28:23 +02:00
Ryan Cao
d884b7d3d6 feat: add "Reset Vesktop" option to menu & tray (#53)
Co-authored-by: V <vendicated@riseup.net>
2023-07-14 00:14:48 +00:00
Ryan Cao
6d35be79b8 feat: use inset title bar style on macOS (#47)
Co-authored-by: V <vendicated@riseup.net>
2023-07-14 00:07:48 +00:00
Ryan Cao
70ca06eb16 fix: remove duplicate quit items on macOS (#49)
Co-authored-by: V <vendicated@riseup.net>
2023-07-13 17:07:19 +00:00
V
210ddbae06 Rename to Vesktop (#57) 2023-07-13 19:03:13 +02:00
V
3ee57831b9 Fix maximise button being wrongly disabled 2023-07-12 18:56:50 +02:00
Ryan Cao
72f83c3ac4 feat: add hide menu bar items on macOS (#50)
Co-authored-by: V <vendicated@riseup.net>
2023-07-11 21:35:15 +02:00
Ryan Cao
13d87dc85e fix: improve app hiding functionality (#51) 2023-07-11 20:57:10 +02:00
Flag
0415cb77f7 feat: implement transparency for Windows (#46) 2023-07-11 20:45:30 +02:00
V
b4da701080 Bump to 0.2.6 2023-07-05 00:49:43 +02:00
V
ed2361ff22 Don't show Menubar on alt press
Closes #45
2023-07-03 22:25:11 +02:00
V
c587e93c56 oop oop 2023-07-03 22:22:35 +02:00
V
6ba0896a6e Implement Screenshare Quality & fps settings 2023-07-03 22:12:26 +02:00
V
843b57e03e Support invite modal launch from web 2023-06-30 18:57:28 +02:00
V
49fb4c68b6 Updater Popup: Add Changelog; Make about page prettier 2023-06-26 01:42:51 +02:00
V
477ecbb4ba Cleanup 2023-06-26 00:41:52 +02:00
V
4abce9d084 Fix some Context Menus being broken by regression 2023-06-26 00:05:08 +02:00
V
7f54858b27 Add SpellCheck toggle in textarea context menu 2023-06-25 16:48:46 +02:00
V
be176fab71 Update README.md (#42) 2023-06-25 04:55:06 +02:00
V
e60f04bb79 Fix DevTools context menu 2023-06-25 04:20:26 +02:00
60 changed files with 740 additions and 430 deletions

View File

@@ -20,5 +20,6 @@
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"cSpell.words": ["Vesktop"]
}

View File

@@ -1,8 +1,6 @@
# Vencord Desktop
# Vesktop
Vencord Desktop is a cross platform desktop app aiming to give you a snappier Discord experience with Vencord pre-installed
Vencord Desktop is currently in beta
Vesktop is a cross platform desktop app aiming to give you a snappier Discord experience with Vencord pre-installed
**Not yet supported**:
- Global Keybinds
@@ -15,11 +13,11 @@ Bug reports, feature requests & contributions are highly appreciated!!
### Windows
Download and run Vencord-Desktop-Setup-VERSION.exe from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download and run Vesktop-Setup-VERSION.exe from [releases](https://github.com/Vencord/Vesktop/releases/latest)
### Mac
Download and run Vencord-Desktop-VERSION.dmg from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download and run Vesktop-VERSION.dmg from [releases](https://github.com/Vencord/Vesktop/releases/latest)
### Linux
@@ -29,15 +27,15 @@ Install [vencord-desktop-git](https://aur.archlinux.org/packages/vencord-desktop
#### Ubuntu/Debian based
Download Vencord-Desktop-VERSION.deb from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download Vesktop-VERSION.deb from [releases](https://github.com/Vencord/Vesktop/releases/latest)
#### Fedora/RHEL based
Download Vencord-Desktop-VERSION.rpm from [releases](https://github.com/Vencord/Desktop/releases/latest)
Download Vesktop-VERSION.rpm from [releases](https://github.com/Vencord/Vesktop/releases/latest)
#### Other
Either download Vencord-Desktop-VERSION.AppImage and just run it directly or grab Vencord-Desktop-VERSION.tar.gz, extract it somewhere and run `vencorddesktop`.
Either download Vesktop-VERSION.AppImage and just run it directly or grab Vesktop-VERSION.tar.gz, extract it somewhere and run `vencorddesktop`.
A flatpak is planned, if you want packages for other repos, feel free to create them and they can be linked as unofficial here
@@ -46,8 +44,8 @@ A flatpak is planned, if you want packages for other repos, feel free to create
Packaging will create builds in the dist/ folder. You can then install them like mentioned above or distribute them
```sh
git clone https://github.com/Vencord/Desktop
cd Desktop
git clone https://github.com/Vencord/Vesktop
cd Vesktop
# Install Dependencies
pnpm i

View File

@@ -1,6 +1,6 @@
{
"name": "VencordDesktop",
"version": "0.2.4",
"version": "0.2.7",
"private": true,
"description": "",
"keywords": [],
@@ -23,7 +23,7 @@
"watch": "pnpm build --watch"
},
"dependencies": {
"arrpc": "github:OpenAsar/arrpc#3eb5d36a5e9295d3aeafc49975df5d399eb627fd"
"arrpc": "github:OpenAsar/arrpc#061d473dc742266fc7f61587ed18e666543fed1e"
},
"devDependencies": {
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
@@ -57,7 +57,7 @@
},
"build": {
"appId": "dev.vencord.desktop",
"productName": "Vencord Desktop",
"productName": "Vesktop",
"files": [
"!*",
"dist/js",
@@ -67,7 +67,7 @@
],
"linux": {
"category": "Network",
"maintainer": "vendicated+vencord-desktop@riseup.net",
"maintainer": "vendicated+vesktop@riseup.net",
"target": [
"deb",
"tar.gz",
@@ -75,7 +75,7 @@
"AppImage"
],
"desktop": {
"Name": "Vencord Desktop",
"Name": "Vesktop",
"GenericName": "Internet Messenger",
"Type": "Application",
"Categories": "Network;InstantMessaging;Chat;",

254
pnpm-lock.yaml generated
View File

@@ -1,9 +1,13 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
arrpc:
specifier: github:OpenAsar/arrpc#3eb5d36a5e9295d3aeafc49975df5d399eb627fd
version: github.com/OpenAsar/arrpc/3eb5d36a5e9295d3aeafc49975df5d399eb627fd
specifier: github:OpenAsar/arrpc#061d473dc742266fc7f61587ed18e666543fed1e
version: github.com/OpenAsar/arrpc/061d473dc742266fc7f61587ed18e666543fed1e
devDependencies:
'@fal-works/esbuild-plugin-global-externals':
@@ -82,6 +86,11 @@ packages:
resolution: {integrity: sha512-sAP4LldeWNz0lNzmTird3uWfFDWWTeg6V/MsmyyLR9X1idwKBWIgt/ZvinqQldJm3LecKEs1emkbquO6PCiLVQ==}
dev: true
/@aashutoshrathi/word-wrap@1.2.6:
resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==}
engines: {node: '>=0.10.0'}
dev: true
/@develar/schema-utils@2.6.5:
resolution: {integrity: sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==}
engines: {node: '>= 8.9.0'}
@@ -126,7 +135,7 @@ packages:
resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==}
dependencies:
'@esbuild-kit/core-utils': 3.1.0
get-tsconfig: 4.5.0
get-tsconfig: 4.6.2
dev: true
/@esbuild-kit/core-utils@3.1.0:
@@ -140,7 +149,7 @@ packages:
resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==}
dependencies:
'@esbuild-kit/core-utils': 3.1.0
get-tsconfig: 4.5.0
get-tsconfig: 4.6.2
dev: true
/@esbuild/android-arm64@0.17.14:
@@ -348,21 +357,21 @@ packages:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
dependencies:
eslint: 8.38.0
eslint-visitor-keys: 3.4.0
eslint-visitor-keys: 3.4.1
dev: true
/@eslint-community/regexpp@4.5.0:
resolution: {integrity: sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==}
/@eslint-community/regexpp@4.5.1:
resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
dev: true
/@eslint/eslintrc@2.0.2:
resolution: {integrity: sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==}
/@eslint/eslintrc@2.0.3:
resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
ajv: 6.12.6
debug: 4.3.4
espree: 9.5.1
espree: 9.5.2
globals: 13.20.0
ignore: 5.2.4
import-fresh: 3.3.0
@@ -382,8 +391,8 @@ packages:
resolution: {integrity: sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==}
dev: true
/@humanwhocodes/config-array@0.11.8:
resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==}
/@humanwhocodes/config-array@0.11.10:
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
engines: {node: '>=10.10.0'}
dependencies:
'@humanwhocodes/object-schema': 1.2.1
@@ -468,8 +477,8 @@ packages:
'@types/responselike': 1.0.0
dev: true
/@types/debug@4.1.7:
resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==}
/@types/debug@4.1.8:
resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==}
dependencies:
'@types/ms': 0.7.31
dev: true
@@ -493,8 +502,8 @@ packages:
resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==}
dev: true
/@types/json-schema@7.0.11:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
/@types/json-schema@7.0.12:
resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==}
dev: true
/@types/json5@0.0.29:
@@ -507,8 +516,8 @@ packages:
'@types/node': 18.15.11
dev: true
/@types/lodash@4.14.194:
resolution: {integrity: sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==}
/@types/lodash@4.14.195:
resolution: {integrity: sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==}
dev: true
/@types/minimatch@5.1.2:
@@ -537,8 +546,8 @@ packages:
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
dev: true
/@types/react-dom@18.0.11:
resolution: {integrity: sha512-O38bPbI2CWtgw/OoQoY+BRelw7uysmXbWvw3nLWO21H1HSh+GOlqPuXshJfjmpNlKiiSDG9cc1JZAaMmVdcTlw==}
/@types/react-dom@18.2.6:
resolution: {integrity: sha512-2et4PDvg6PVCyS7fuTc4gPoksV58bW0RwSxWKcPRcHZf0PRUGq03TKcD/rUHe3azfV6/5/biUBJw+HhCQjaP0A==}
dependencies:
'@types/react': 18.0.33
dev: true
@@ -568,8 +577,8 @@ packages:
resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==}
dev: true
/@types/semver@7.3.13:
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
/@types/semver@7.5.0:
resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==}
dev: true
/@types/verror@1.10.6:
@@ -607,7 +616,7 @@ packages:
typescript:
optional: true
dependencies:
'@eslint-community/regexpp': 4.5.0
'@eslint-community/regexpp': 4.5.1
'@typescript-eslint/parser': 5.57.1(eslint@8.38.0)(typescript@5.0.2)
'@typescript-eslint/scope-manager': 5.57.1
'@typescript-eslint/type-utils': 5.57.1(eslint@8.38.0)(typescript@5.0.2)
@@ -617,7 +626,7 @@ packages:
grapheme-splitter: 1.0.4
ignore: 5.2.4
natural-compare-lite: 1.4.0
semver: 7.3.8
semver: 7.5.3
tsutils: 3.21.0(typescript@5.0.2)
typescript: 5.0.2
transitivePeerDependencies:
@@ -691,7 +700,7 @@ packages:
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.8
semver: 7.5.3
tsutils: 3.21.0(typescript@5.0.2)
typescript: 5.0.2
transitivePeerDependencies:
@@ -705,14 +714,14 @@ packages:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.38.0)
'@types/json-schema': 7.0.11
'@types/semver': 7.3.13
'@types/json-schema': 7.0.12
'@types/semver': 7.5.0
'@typescript-eslint/scope-manager': 5.57.1
'@typescript-eslint/types': 5.57.1
'@typescript-eslint/typescript-estree': 5.57.1(typescript@5.0.2)
eslint: 8.38.0
eslint-scope: 5.1.1
semver: 7.3.8
semver: 7.5.3
transitivePeerDependencies:
- supports-color
- typescript
@@ -723,31 +732,31 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.57.1
eslint-visitor-keys: 3.4.0
eslint-visitor-keys: 3.4.1
dev: true
/@vencord/types@0.1.2:
resolution: {integrity: sha512-C/dqZHn3aod/4izZT9sgZEef4478M7QNKTY8Gx2yB1CRYawJcs6hupXT/1SMmepKqrULbltL04Cnh5ieBm3Ucw==}
dependencies:
'@types/lodash': 4.14.194
'@types/lodash': 4.14.195
'@types/node': 18.15.11
'@types/react': 18.0.33
'@types/react-dom': 18.0.11
'@types/react-dom': 18.2.6
discord-types: 1.3.26
standalone-electron-types: 1.0.0
type-fest: 3.8.0
dev: true
/acorn-jsx@5.3.2(acorn@8.8.2):
/acorn-jsx@5.3.2(acorn@8.9.0):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
acorn: 8.8.2
acorn: 8.9.0
dev: true
/acorn@8.8.2:
resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==}
/acorn@8.9.0:
resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
@@ -821,8 +830,8 @@ packages:
minimatch: 3.1.2
read-config-file: 6.2.0
sanitize-filename: 1.6.3
semver: 7.3.8
tar: 6.1.13
semver: 7.5.3
tar: 6.1.15
temp-file: 3.4.0
transitivePeerDependencies:
- supports-color
@@ -856,7 +865,7 @@ packages:
call-bind: 1.0.2
define-properties: 1.2.0
es-abstract: 1.21.2
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
is-string: 1.0.7
dev: true
@@ -1060,7 +1069,7 @@ packages:
resolution: {integrity: sha512-QiQHweYsh8o+U/KNCZFSvISRnvRctb8m/2rB2I1JdByzvNKxPeFLlHFRPQRXab6aYeXc18j9LpsDLJ3sGQmWTQ==}
dependencies:
7zip-bin: 5.1.1
'@types/debug': 4.1.7
'@types/debug': 4.1.8
'@types/fs-extra': 9.0.13
app-builder-bin: 4.0.0
bluebird-lst: 1.0.9
@@ -1100,8 +1109,8 @@ packages:
engines: {node: '>=10.6.0'}
dev: true
/cacheable-request@7.0.2:
resolution: {integrity: sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==}
/cacheable-request@7.0.4:
resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==}
engines: {node: '>=8'}
dependencies:
clone-response: 1.0.3
@@ -1117,7 +1126,7 @@ packages:
resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
dependencies:
function-bind: 1.1.1
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
dev: true
/callsites@3.1.0:
@@ -1289,7 +1298,7 @@ packages:
supports-color:
optional: true
dependencies:
ms: 2.1.2
ms: 2.1.3
dev: true
/debug@4.3.4:
@@ -1455,7 +1464,7 @@ packages:
engines: {node: '>=0.10.0'}
hasBin: true
dependencies:
jake: 10.8.5
jake: 10.8.7
dev: true
/electron-builder@23.6.0:
@@ -1474,7 +1483,7 @@ packages:
lazy-val: 1.0.5
read-config-file: 6.2.0
simple-update-notifier: 1.1.0
yargs: 17.7.1
yargs: 17.7.2
transitivePeerDependencies:
- supports-color
dev: true
@@ -1547,7 +1556,7 @@ packages:
es-set-tostringtag: 2.0.1
es-to-primitive: 1.2.1
function.prototype.name: 1.1.5
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
get-symbol-description: 1.0.0
globalthis: 1.0.3
gopd: 1.0.1
@@ -1567,7 +1576,7 @@ packages:
object-inspect: 1.12.3
object-keys: 1.1.1
object.assign: 4.1.4
regexp.prototype.flags: 1.4.3
regexp.prototype.flags: 1.5.0
safe-regex-test: 1.0.0
string.prototype.trim: 1.2.7
string.prototype.trimend: 1.0.6
@@ -1581,7 +1590,7 @@ packages:
resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==}
engines: {node: '>= 0.4'}
dependencies:
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
has: 1.0.3
has-tostringtag: 1.0.0
dev: true
@@ -1668,14 +1677,14 @@ packages:
resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==}
dependencies:
debug: 3.2.7
is-core-module: 2.11.0
is-core-module: 2.12.1
resolve: 1.22.2
transitivePeerDependencies:
- supports-color
dev: true
/eslint-module-utils@2.7.4(@typescript-eslint/parser@5.57.1)(eslint-import-resolver-node@0.3.7)(eslint@8.38.0):
resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
/eslint-module-utils@2.8.0(@typescript-eslint/parser@5.57.1)(eslint-import-resolver-node@0.3.7)(eslint@8.38.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser': '*'
@@ -1721,9 +1730,9 @@ packages:
doctrine: 2.1.0
eslint: 8.38.0
eslint-import-resolver-node: 0.3.7
eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.57.1)(eslint-import-resolver-node@0.3.7)(eslint@8.38.0)
eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.57.1)(eslint-import-resolver-node@0.3.7)(eslint@8.38.0)
has: 1.0.3
is-core-module: 2.11.0
is-core-module: 2.12.1
is-glob: 4.0.3
minimatch: 3.1.2
object.values: 1.1.6
@@ -1806,16 +1815,16 @@ packages:
estraverse: 4.3.0
dev: true
/eslint-scope@7.1.1:
resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==}
/eslint-scope@7.2.0:
resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
esrecurse: 4.3.0
estraverse: 5.3.0
dev: true
/eslint-visitor-keys@3.4.0:
resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==}
/eslint-visitor-keys@3.4.1:
resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
@@ -1825,10 +1834,10 @@ packages:
hasBin: true
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.38.0)
'@eslint-community/regexpp': 4.5.0
'@eslint/eslintrc': 2.0.2
'@eslint-community/regexpp': 4.5.1
'@eslint/eslintrc': 2.0.3
'@eslint/js': 8.38.0
'@humanwhocodes/config-array': 0.11.8
'@humanwhocodes/config-array': 0.11.10
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
ajv: 6.12.6
@@ -1837,9 +1846,9 @@ packages:
debug: 4.3.4
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.1.1
eslint-visitor-keys: 3.4.0
espree: 9.5.1
eslint-scope: 7.2.0
eslint-visitor-keys: 3.4.1
espree: 9.5.2
esquery: 1.5.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
@@ -1853,14 +1862,14 @@ packages:
imurmurhash: 0.1.4
is-glob: 4.0.3
is-path-inside: 3.0.3
js-sdsl: 4.4.0
js-sdsl: 4.4.1
js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
lodash.merge: 4.6.2
minimatch: 3.1.2
natural-compare: 1.4.0
optionator: 0.9.1
optionator: 0.9.3
strip-ansi: 6.0.1
strip-json-comments: 3.1.1
text-table: 0.2.0
@@ -1868,13 +1877,13 @@ packages:
- supports-color
dev: true
/espree@9.5.1:
resolution: {integrity: sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==}
/espree@9.5.2:
resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
acorn: 8.8.2
acorn-jsx: 5.3.2(acorn@8.8.2)
eslint-visitor-keys: 3.4.0
acorn: 8.9.0
acorn-jsx: 5.3.2(acorn@8.9.0)
eslint-visitor-keys: 3.4.1
dev: true
/esquery@1.5.0:
@@ -1944,15 +1953,14 @@ packages:
/fast-deep-equal@3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
requiresBuild: true
dev: true
/fast-diff@1.2.0:
resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==}
/fast-diff@1.3.0:
resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}
dev: true
/fast-glob@3.2.12:
resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==}
/fast-glob@3.3.0:
resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==}
engines: {node: '>=8.6.0'}
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -1964,7 +1972,6 @@ packages:
/fast-json-stable-stringify@2.1.0:
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
requiresBuild: true
dev: true
/fast-levenshtein@2.0.6:
@@ -2120,11 +2127,12 @@ packages:
engines: {node: 6.* || 8.* || >= 10.*}
dev: true
/get-intrinsic@1.2.0:
resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==}
/get-intrinsic@1.2.1:
resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==}
dependencies:
function-bind: 1.1.1
has: 1.0.3
has-proto: 1.0.1
has-symbols: 1.0.3
dev: true
@@ -2140,11 +2148,13 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
dev: true
/get-tsconfig@4.5.0:
resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==}
/get-tsconfig@4.6.2:
resolution: {integrity: sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==}
dependencies:
resolve-pkg-maps: 1.0.0
dev: true
/get-value@2.0.6:
@@ -2186,7 +2196,7 @@ packages:
es6-error: 4.1.1
matcher: 3.0.0
roarr: 2.15.4
semver: 7.3.8
semver: 7.5.3
serialize-error: 7.0.1
dev: true
optional: true
@@ -2211,7 +2221,7 @@ packages:
dependencies:
array-union: 2.1.0
dir-glob: 3.0.1
fast-glob: 3.2.12
fast-glob: 3.3.0
ignore: 5.2.4
merge2: 1.4.1
slash: 3.0.0
@@ -2220,7 +2230,7 @@ packages:
/gopd@1.0.1:
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
dependencies:
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
dev: true
/got@11.8.6:
@@ -2232,7 +2242,7 @@ packages:
'@types/cacheable-request': 6.0.3
'@types/responselike': 1.0.0
cacheable-lookup: 5.0.4
cacheable-request: 7.0.2
cacheable-request: 7.0.4
decompress-response: 6.0.0
http2-wrapper: 1.0.3
lowercase-keys: 2.0.0
@@ -2264,7 +2274,7 @@ packages:
/has-property-descriptors@1.0.0:
resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
dependencies:
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
dev: true
/has-proto@1.0.1:
@@ -2419,7 +2429,7 @@ packages:
resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==}
engines: {node: '>= 0.4'}
dependencies:
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
has: 1.0.3
side-channel: 1.0.4
dev: true
@@ -2442,7 +2452,7 @@ packages:
resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==}
dependencies:
call-bind: 1.0.2
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
is-typed-array: 1.1.10
dev: true
@@ -2476,8 +2486,8 @@ packages:
ci-info: 3.8.0
dev: true
/is-core-module@2.11.0:
resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==}
/is-core-module@2.12.1:
resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==}
dependencies:
has: 1.0.3
dev: true
@@ -2668,8 +2678,8 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/jake@10.8.5:
resolution: {integrity: sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==}
/jake@10.8.7:
resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@@ -2679,8 +2689,8 @@ packages:
minimatch: 3.1.2
dev: true
/js-sdsl@4.4.0:
resolution: {integrity: sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==}
/js-sdsl@4.4.1:
resolution: {integrity: sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA==}
dev: true
/js-yaml@4.1.0:
@@ -2696,7 +2706,6 @@ packages:
/json-schema-traverse@0.4.1:
resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
requiresBuild: true
dev: true
/json-stable-stringify-without-jsonify@1.0.1:
@@ -2895,8 +2904,8 @@ packages:
yallist: 4.0.0
dev: true
/minipass@4.2.5:
resolution: {integrity: sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q==}
/minipass@5.0.0:
resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==}
engines: {node: '>=8'}
dev: true
@@ -2934,6 +2943,10 @@ packages:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
dev: true
/ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
dev: true
/nanomatch@1.2.13:
resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==}
engines: {node: '>=0.10.0'}
@@ -3029,16 +3042,16 @@ packages:
wrappy: 1.0.2
dev: true
/optionator@0.9.1:
resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==}
/optionator@0.9.3:
resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==}
engines: {node: '>= 0.8.0'}
dependencies:
'@aashutoshrathi/word-wrap': 1.2.6
deep-is: 0.1.4
fast-levenshtein: 2.0.6
levn: 0.4.1
prelude-ls: 1.2.1
type-check: 0.4.0
word-wrap: 1.2.3
dev: true
/p-cancelable@2.1.1:
@@ -3122,7 +3135,7 @@ packages:
resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
engines: {node: '>=6.0.0'}
dependencies:
fast-diff: 1.2.0
fast-diff: 1.3.0
dev: true
/prettier@2.8.7:
@@ -3146,7 +3159,6 @@ packages:
/punycode@2.3.0:
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
engines: {node: '>=6'}
requiresBuild: true
dev: true
/queue-microtask@1.2.3:
@@ -3177,8 +3189,8 @@ packages:
safe-regex: 1.1.0
dev: true
/regexp.prototype.flags@1.4.3:
resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==}
/regexp.prototype.flags@1.5.0:
resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
@@ -3205,6 +3217,10 @@ packages:
engines: {node: '>=4'}
dev: true
/resolve-pkg-maps@1.0.0:
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
dev: true
/resolve-url@0.2.1:
resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==}
deprecated: https://github.com/lydell/resolve-url#deprecated
@@ -3214,7 +3230,7 @@ packages:
resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==}
hasBin: true
dependencies:
is-core-module: 2.11.0
is-core-module: 2.12.1
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
dev: true
@@ -3265,7 +3281,7 @@ packages:
resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
dependencies:
call-bind: 1.0.2
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
is-regex: 1.1.4
dev: true
@@ -3304,8 +3320,8 @@ packages:
hasBin: true
dev: true
/semver@7.3.8:
resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==}
/semver@7.5.3:
resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@@ -3346,7 +3362,7 @@ packages:
resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
dependencies:
call-bind: 1.0.2
get-intrinsic: 1.2.0
get-intrinsic: 1.2.1
object-inspect: 1.12.3
dev: true
@@ -3532,13 +3548,13 @@ packages:
engines: {node: '>= 0.4'}
dev: true
/tar@6.1.13:
resolution: {integrity: sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==}
/tar@6.1.15:
resolution: {integrity: sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==}
engines: {node: '>=10'}
dependencies:
chownr: 2.0.0
fs-minipass: 2.1.0
minipass: 4.2.5
minipass: 5.0.0
minizlib: 2.1.2
mkdirp: 1.0.4
yallist: 4.0.0
@@ -3708,7 +3724,6 @@ packages:
/uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
requiresBuild: true
dependencies:
punycode: 2.3.0
dev: true
@@ -3768,11 +3783,6 @@ packages:
isexe: 2.0.0
dev: true
/word-wrap@1.2.3:
resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==}
engines: {node: '>=0.10.0'}
dev: true
/wrap-ansi@7.0.0:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
@@ -3819,8 +3829,8 @@ packages:
engines: {node: '>=12'}
dev: true
/yargs@17.7.1:
resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==}
/yargs@17.7.2:
resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
engines: {node: '>=12'}
dependencies:
cliui: 8.0.1
@@ -3844,8 +3854,8 @@ packages:
engines: {node: '>=10'}
dev: true
github.com/OpenAsar/arrpc/3eb5d36a5e9295d3aeafc49975df5d399eb627fd:
resolution: {tarball: https://codeload.github.com/OpenAsar/arrpc/tar.gz/3eb5d36a5e9295d3aeafc49975df5d399eb627fd}
github.com/OpenAsar/arrpc/061d473dc742266fc7f61587ed18e666543fed1e:
resolution: {tarball: https://codeload.github.com/OpenAsar/arrpc/tar.gz/061d473dc742266fc7f61587ed18e666543fed1e}
name: arrpc
version: 3.1.0
dependencies:

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -54,7 +54,7 @@ await Promise.all([
}),
createContext({
...CommonOpts,
globalName: "VencordDesktop",
globalName: "Vesktop",
entryPoints: ["src/renderer/index.ts"],
outfile: "dist/js/renderer.js",
format: "iife",
@@ -65,7 +65,11 @@ await Promise.all([
tsconfig: "./scripts/build/tsconfig.esbuild.json",
external: ["@vencord/types/*"],
plugins: [vencordDep],
footer: { js: "//# sourceURL=VCDRenderer" }
// TODO: remove legacy name once main Vencord codebase has migrated and some time has passed.
// this 0 is very important. we run this script via webFrame.executeJavaScript and the last
// expression will be the return value. Without the 0, the return value would be Vesktop which
// leads to "An object could not be cloned"
footer: { js: ";window.VencordDesktop=Vesktop;0 \n//# sourceURL=VCDRenderer" }
})
]);

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,5 +1,5 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

7
src/globals.d.ts vendored
View File

@@ -1,13 +1,12 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
declare global {
export var VencordDesktopNative: typeof import("preload/VencordDesktopNative").VencordDesktopNative;
export var VencordDesktop: typeof import("renderer/index");
export var vcdLS: typeof localStorage;
export var VesktopNative: typeof import("preload/VesktopNative").VesktopNative;
export var Vesktop: typeof import("renderer/index");
export var VCDP: any;
export var IS_DEV: boolean;

View File

@@ -1,11 +1,10 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { app, BrowserWindow } from "electron";
import { readFileSync } from "fs";
import { BrowserWindow } from "electron";
import { join } from "path";
import { ICON_PATH, VIEW_DIR } from "shared/paths";
@@ -15,14 +14,15 @@ export function createAboutWindow() {
const about = new BrowserWindow({
center: true,
autoHideMenuBar: true,
icon: ICON_PATH
icon: ICON_PATH,
webPreferences: {
preload: join(__dirname, "updaterPreload.js")
}
});
makeLinksOpenExternally(about);
const html = readFileSync(join(VIEW_DIR, "about.html"), "utf-8").replaceAll("%VERSION%", app.getVersion());
about.loadURL("data:text/html;charset=utf-8," + html);
about.loadFile(join(VIEW_DIR, "about.html"));
return about;
}

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,21 +1,40 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import Server from "arrpc";
import { send as sendToBridge } from "arrpc/src/bridge";
import { mainWin } from "./mainWindow";
import { Settings } from "./settings";
let server: any;
const inviteCodeRegex = /^(\w|-)+$/;
export async function initArRPC() {
if (server || !Settings.store.arRPC) return;
server = await new Server();
server.on("activity", sendToBridge);
try {
// This module starts a server as a side effect, so it needs to be lazy imported
const { send: sendToBridge } = await import("arrpc/src/bridge");
server = await new Server();
server.on("activity", sendToBridge);
server.on("invite", (invite: string, callback: (valid: boolean) => void) => {
invite = String(invite);
if (!inviteCodeRegex.test(invite)) return callback(false);
mainWin.webContents
// Safety: Result of JSON.stringify should always be safe to equal
// Also, just to be super super safe, invite is regex validated above
.executeJavaScript(`Vesktop.openInviteModal(${JSON.stringify(invite)})`)
.then(callback);
});
} catch (e) {
console.error("Failed to start arRPC server", e);
}
}
Settings.addChangeListener("arRPC", initArRPC);

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -17,7 +17,7 @@ export const VENCORD_SETTINGS_FILE = join(VENCORD_SETTINGS_DIR, "settings.json")
export const VENCORD_FILES_DIR =
(require("./settings") as typeof import("./settings")).Settings.store.vencordDir || join(DATA_DIR, "vencordDist");
export const USER_AGENT = `VencordDesktop/${app.getVersion()} (https://github.com/Vencord/Desktop)`;
export const USER_AGENT = `Vesktop/${app.getVersion()} (https://github.com/Vencord/Vesktop)`;
// dimensions shamelessly stolen from Discord Desktop :3
export const MIN_WIDTH = 940;

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -15,6 +15,7 @@ import { autoStart } from "./autoStart";
import { DATA_DIR } from "./constants";
import { createWindows } from "./mainWindow";
import { Settings } from "./settings";
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
interface Data {
minimizeToTray: boolean;
@@ -33,6 +34,8 @@ export function createFirstLaunchTour() {
width: 550
});
makeLinksOpenExternally(win);
win.loadFile(join(VIEW_DIR, "first-launch.html"));
win.webContents.addListener("console-message", (_e, _l, msg) => {
if (msg === "cancel") return app.exit();

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -24,20 +24,18 @@ if (IS_DEV) {
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;
function init() {
// <-- BEGIN COPY PASTED FROM DISCORD -->
// 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.
// HardwareMediaKeyHandling,MediaSessionService: Prevent Discord from registering as a media service.
//
// WidgetLayering (Vencord Added): Fix DevTools context menus https://github.com/electron/electron/issues/38790
app.commandLine.appendSwitch(
"disable-features",
"WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService"
"WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService,WidgetLayering"
);
// <-- END COPY PASTED FROM DISCORD -->
app.on("second-instance", (_event, _cmdLine, _cwd, data: any) => {
if (data.IS_DEV) app.quit();
else if (mainWin) {
@@ -63,10 +61,10 @@ function init() {
if (!app.requestSingleInstanceLock({ IS_DEV })) {
if (IS_DEV) {
console.log("Vencord Desktop is already running. Quitting previous instance...");
console.log("Vesktop is already running. Quitting previous instance...");
init();
} else {
console.log("Vencord Desktop is already running. Quitting...");
console.log("Vesktop is already running. Quitting...");
app.quit();
}
} else {

View File

@@ -1,12 +1,13 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { app, dialog, ipcMain, session, shell } from "electron";
import { existsSync, readFileSync, watch } from "fs";
import { open, readFile } from "fs/promises";
import { release } from "os";
import { join } from "path";
import { debounce } from "shared/utils/debounce";
@@ -41,6 +42,10 @@ ipcMain.on(IpcEvents.GET_VERSION, e => {
e.returnValue = app.getVersion();
});
ipcMain.on(IpcEvents.SUPPORTS_WINDOWS_TRANSPARENCY, e => {
e.returnValue = process.platform === "win32" && Number(release().split(".").pop()) >= 22621;
});
ipcMain.on(IpcEvents.AUTOSTART_ENABLED, e => {
e.returnValue = autoStart.isEnabled();
});
@@ -60,8 +65,11 @@ ipcMain.handle(IpcEvents.SHOW_ITEM_IN_FOLDER, (_, path) => {
shell.showItemInFolder(path);
});
ipcMain.handle(IpcEvents.FOCUS, e => {
e.sender.focus();
ipcMain.handle(IpcEvents.FOCUS, () => {
if (process.platform === "win32") mainWin.minimize(); // Windows is weird
mainWin.restore();
mainWin.show();
});
ipcMain.handle(IpcEvents.CLOSE, e => {

View File

@@ -1,18 +1,29 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { app, BrowserWindow, BrowserWindowConstructorOptions, Menu, Tray } from "electron";
import {
app,
BrowserWindow,
BrowserWindowConstructorOptions,
dialog,
Menu,
MenuItemConstructorOptions,
Tray
} from "electron";
import { rm } from "fs/promises";
import { join } from "path";
import { IpcEvents } from "shared/IpcEvents";
import { isTruthy } from "shared/utils/guards";
import { once } from "shared/utils/once";
import type { SettingsStore } from "shared/utils/SettingsStore";
import { ICON_PATH } from "../shared/paths";
import { createAboutWindow } from "./about";
import { initArRPC } from "./arrpc";
import { DEFAULT_HEIGHT, DEFAULT_WIDTH, MIN_HEIGHT, MIN_WIDTH, VENCORD_FILES_DIR } from "./constants";
import { DATA_DIR, DEFAULT_HEIGHT, DEFAULT_WIDTH, MIN_HEIGHT, MIN_WIDTH, VENCORD_FILES_DIR } from "./constants";
import { Settings, VencordSettings } from "./settings";
import { createSplashWindow } from "./splash";
import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally";
@@ -27,6 +38,27 @@ app.on("before-quit", () => {
export let mainWin: BrowserWindow;
function makeSettingsListenerHelpers<O extends object>(o: SettingsStore<O>) {
const listeners = new Map<(data: any) => void, PropertyKey>();
const addListener: typeof o.addChangeListener = (path, cb) => {
listeners.set(cb, path);
o.addChangeListener(path, cb);
};
const removeAllListeners = () => {
for (const [listener, path] of listeners) {
o.removeChangeListener(path as any, listener);
}
listeners.clear();
};
return [addListener, removeAllListeners] as const;
}
const [addSettingsListener, removeSettingsListeners] = makeSettingsListenerHelpers(Settings);
const [addVencordSettingsListener, removeVencordSettingsListeners] = makeSettingsListenerHelpers(VencordSettings);
function initTray(win: BrowserWindow) {
const trayMenu = Menu.buildFromTemplate([
{
@@ -48,6 +80,12 @@ function initTray(win: BrowserWindow) {
app.quit();
}
},
{
label: "Reset Vesktop",
async click() {
await clearData(win);
}
},
{
type: "separator"
},
@@ -59,7 +97,7 @@ function initTray(win: BrowserWindow) {
}
},
{
label: "Quit Vencord Desktop",
label: "Quit Vesktop",
click() {
isQuitting = true;
app.quit();
@@ -68,7 +106,7 @@ function initTray(win: BrowserWindow) {
]);
tray = new Tray(ICON_PATH);
tray.setToolTip("Vencord Desktop");
tray.setToolTip("Vesktop");
tray.setContextMenu(trayMenu);
tray.on("click", () => win.show());
@@ -81,62 +119,107 @@ function initTray(win: BrowserWindow) {
});
}
const enum MessageBoxChoice {
Default,
Cancel
}
async function clearData(win: BrowserWindow) {
const { response } = await dialog.showMessageBox(win, {
message: "Are you sure you want to reset Vesktop?",
detail: "This will log you out, clear caches and reset all your settings!\n\nVesktop will automatically restart after this operation.",
buttons: ["Yes", "No"],
cancelId: MessageBoxChoice.Cancel,
defaultId: MessageBoxChoice.Default,
type: "warning"
});
if (response === MessageBoxChoice.Cancel) return;
win.close();
await win.webContents.session.clearStorageData();
await win.webContents.session.clearCache();
await win.webContents.session.clearCodeCaches({});
await rm(DATA_DIR, { force: true, recursive: true });
app.relaunch();
app.quit();
}
function initMenuBar(win: BrowserWindow) {
const isWindows = process.platform === "win32";
const isDarwin = process.platform === "darwin";
const wantCtrlQ = !isWindows || VencordSettings.store.winCtrlQ;
const subMenu = [
{
label: "About Vesktop",
click: createAboutWindow
},
{
label: "Force Update Vencord",
async click() {
await downloadVencordFiles();
app.relaunch();
app.quit();
},
toolTip: "Vesktop will automatically restart after this operation"
},
{
label: "Reset Vesktop",
async click() {
await clearData(win);
},
toolTip: "Vesktop will automatically restart after this operation"
},
{
label: "Relaunch",
accelerator: "CmdOrCtrl+Shift+R",
click() {
app.relaunch();
app.quit();
}
},
isDarwin && {
label: "Hide",
role: "hide"
},
isDarwin && {
label: "Hide others",
role: "hideOthers"
},
{
label: "Quit",
accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0,
visible: !isWindows,
role: "quit",
click() {
app.quit();
}
},
isWindows && {
label: "Quit",
accelerator: "Alt+F4",
role: "quit",
click() {
app.quit();
}
},
// See https://github.com/electron/electron/issues/14742 and https://github.com/electron/electron/issues/5256
{
label: "Zoom in (hidden, hack for Qwertz and others)",
accelerator: "CmdOrCtrl+=",
role: "zoomIn",
visible: false
}
] satisfies Array<MenuItemConstructorOptions | false>;
const menu = Menu.buildFromTemplate([
{
label: "Vencord Desktop",
label: "Vesktop",
role: "appMenu",
submenu: [
{
label: "About Vencord Desktop",
click: createAboutWindow
},
{
label: "Force Update Vencord",
async click() {
await downloadVencordFiles();
app.relaunch();
app.quit();
},
toolTip: "Vencord Desktop will automatically restart after this operation"
},
{
label: "Relaunch",
accelerator: "CmdOrCtrl+Shift+R",
click() {
app.relaunch();
app.quit();
}
},
{
label: "Quit",
accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0,
visible: !isWindows,
role: "quit",
click() {
app.quit();
}
},
{
label: "Quit",
accelerator: isWindows ? "Alt+F4" : void 0,
visible: isWindows,
role: "quit",
click() {
app.quit();
}
},
// See https://github.com/electron/electron/issues/14742 and https://github.com/electron/electron/issues/5256
{
label: "Zoom in (hidden, hack for Qwertz and others)",
accelerator: "CmdOrCtrl+=",
role: "zoomIn",
visible: false
}
]
submenu: subMenu.filter(isTruthy)
},
{ role: "fileMenu" },
{ role: "editMenu" },
@@ -187,11 +270,11 @@ function initWindowBoundsListeners(win: BrowserWindow) {
}
function initSettingsListeners(win: BrowserWindow) {
Settings.addChangeListener("tray", enable => {
addSettingsListener("tray", enable => {
if (enable) initTray(win);
else tray?.destroy();
});
Settings.addChangeListener("disableMinSize", disable => {
addSettingsListener("disableMinSize", disable => {
if (disable) {
// 0 no work
win.setMinimumSize(1, 1);
@@ -206,7 +289,7 @@ function initSettingsListeners(win: BrowserWindow) {
}
});
VencordSettings.addChangeListener("macosTranslucency", enabled => {
addVencordSettingsListener("macosTranslucency", enabled => {
if (enabled) {
win.setVibrancy("sidebar");
win.setBackgroundColor("#ffffff00");
@@ -224,9 +307,14 @@ function initSpellCheck(win: BrowserWindow) {
}
function createMainWindow() {
// Clear up previous settings listeners
removeSettingsListeners();
removeVencordSettingsListeners();
const { staticTitle, transparencyOption } = Settings.store;
const { frameless, macosTranslucency } = VencordSettings.store;
const win = (mainWin = new BrowserWindow({
show: false,
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: false,
sandbox: false,
@@ -236,22 +324,34 @@ function createMainWindow() {
spellcheck: true
},
icon: ICON_PATH,
frame: VencordSettings.store.frameless !== true,
...(Settings.store.staticTitle ? { title: "Vencord" } : {}),
...(VencordSettings.store.macosTranslucency
frame: frameless !== true,
...(transparencyOption && transparencyOption !== "none"
? {
backgroundColor: "#00000000",
backgroundMaterial: Settings.store.transparencyOption,
transparent: true
}
: {}),
...(staticTitle ? { title: "Vencord" } : {}),
...(macosTranslucency
? {
vibrancy: "sidebar",
backgroundColor: "#ffffff00"
}
: {}),
...(process.platform === "darwin" ? { titleBarStyle: "hiddenInset" } : {}),
...getWindowBoundsOptions()
}));
win.setMenuBarVisibility(false);
win.on("close", e => {
if (isQuitting || Settings.store.minimizeToTray === false || Settings.store.tray === false) return;
const useTray = Settings.store.minimizeToTray && Settings.store.tray;
if (isQuitting || (process.platform !== "darwin" && !useTray)) return;
e.preventDefault();
win.hide();
if (process.platform === "darwin") app.hide();
else win.hide();
return false;
});

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -36,7 +36,7 @@ export function registerScreenShareHandler() {
}));
const choice = await request.frame
.executeJavaScript(`VencordDesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify(data)})`)
.executeJavaScript(`Vesktop.Components.ScreenShare.openScreenSharePicker(${JSON.stringify(data)})`)
.then(e => e as StreamPick)
.catch(() => null);

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -33,5 +33,5 @@ function loadSettings<T extends object = any>(file: string, name: string) {
return store;
}
export const Settings = loadSettings<TSettings>(SETTINGS_FILE, "Vencord Desktop");
export const Settings = loadSettings<TSettings>(SETTINGS_FILE, "Vesktop");
export const VencordSettings = loadSettings<any>(VENCORD_SETTINGS_FILE, "Vencord");

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -9,7 +9,7 @@ import type { Settings } from "shared/settings";
import type { LiteralUnion } from "type-fest";
import { IpcEvents } from "../shared/IpcEvents";
import { invoke, sendSync } from "./typedIpcs";
import { invoke, sendSync } from "./typedIpc";
type SpellCheckerResultCallback = (word: string, suggestions: string[]) => void;
@@ -19,11 +19,12 @@ ipcRenderer.on(IpcEvents.SPELLCHECK_RESULT, (_, w: string, s: string[]) => {
spellCheckCallbacks.forEach(cb => cb(w, s));
});
export const VencordDesktopNative = {
export const VesktopNative = {
app: {
relaunch: () => invoke<void>(IpcEvents.RELAUNCH),
getVersion: () => sendSync<void>(IpcEvents.GET_VERSION),
setBadgeCount: (count: number) => invoke<void>(IpcEvents.SET_BADGE_COUNT, count)
setBadgeCount: (count: number) => invoke<void>(IpcEvents.SET_BADGE_COUNT, count),
supportsWindowsTransparency: () => sendSync<boolean>(IpcEvents.SUPPORTS_WINDOWS_TRANSPARENCY)
},
autostart: {
isEnabled: () => sendSync<boolean>(IpcEvents.AUTOSTART_ENABLED),

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -8,9 +8,11 @@ import { contextBridge, ipcRenderer, webFrame } from "electron";
import { readFileSync, watch } from "fs";
import { IpcEvents } from "../shared/IpcEvents";
import { VencordDesktopNative } from "./VencordDesktopNative";
import { VesktopNative } from "./VesktopNative";
contextBridge.exposeInMainWorld("VencordDesktopNative", VencordDesktopNative);
contextBridge.exposeInMainWorld("VesktopNative", VesktopNative);
// TODO: remove legacy alias once main Vencord codebase has migrated and some time has passed
contextBridge.exposeInMainWorld("VencordDesktopNative", VesktopNative);
require(ipcRenderer.sendSync(IpcEvents.GET_VENCORD_PRELOAD_FILE));
@@ -41,4 +43,4 @@ if (IS_DEV) {
}
// #endregion
VencordDesktopNative.spellcheck.setLanguages(window.navigator.languages);
VesktopNative.spellcheck.setLanguages(window.navigator.languages);

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -23,7 +23,7 @@ export function setBadge() {
let totalCount = mentionCount + pendingRequests;
if (!totalCount && hasUnread && !disableUnreadBadge) totalCount = -1;
VencordDesktopNative.app.setBadgeCount(totalCount);
VesktopNative.app.setBadgeCount(totalCount);
}
let toFind = 3;

View File

@@ -1,21 +1,22 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import "./screenSharePicker.css";
import { classes, closeModal, Margins, Modals, openModal, useAwaiter } from "@vencord/types/utils";
import { findByPropsLazy } from "@vencord/types/webpack";
import { closeModal, Modals, openModal, useAwaiter } from "@vencord/types/utils";
import { findStoreLazy } from "@vencord/types/webpack";
import { Button, Card, Forms, Switch, Text, useState } from "@vencord/types/webpack/common";
import type { Dispatch, SetStateAction } from "react";
import { addPatch } from "renderer/patches/shared";
import { isWindows } from "renderer/utils";
const StreamResolutions = ["720", "1080", "1440", "Source"] as const;
const StreamResolutions = ["480", "720", "1080", "1440"] as const;
const StreamFps = ["15", "30", "60"] as const;
const WarningIconClasses = findByPropsLazy("warning", "error", "container");
const MediaEngineStore = findStoreLazy("MediaEngineStore");
export type StreamResolution = (typeof StreamResolutions)[number];
export type StreamFps = (typeof StreamFps)[number];
@@ -36,6 +37,39 @@ interface Source {
url: string;
}
let currentSettings: StreamSettings | null = null;
addPatch({
patches: [
{
find: "this.localWant=",
replacement: {
match: /this.localWant=/,
replace: "$self.patchStreamQuality(this);$&"
}
}
],
patchStreamQuality(opts: any) {
if (!currentSettings) return;
const framerate = Number(currentSettings.fps);
const height = Number(currentSettings.resolution);
const width = Math.round(height * (16 / 9));
Object.assign(opts, {
bitrateMin: 500000,
bitrateMax: 8000000,
bitrateTarget: 600000
});
Object.assign(opts.capture, {
framerate,
width,
height,
pixelCount: height * width
});
}
});
export function openScreenSharePicker(screens: Source[]) {
return new Promise<StreamPick>((resolve, reject) => {
const key = openModal(
@@ -84,7 +118,7 @@ function StreamSettings({
settings: StreamSettings;
setSettings: Dispatch<SetStateAction<StreamSettings>>;
}) {
const [thumb] = useAwaiter(() => VencordDesktopNative.capturer.getLargeThumbnail(source.id), {
const [thumb] = useAwaiter(() => VesktopNative.capturer.getLargeThumbnail(source.id), {
fallbackValue: source.url,
deps: [source.id]
});
@@ -100,12 +134,6 @@ function StreamSettings({
<Forms.FormTitle>Stream Settings</Forms.FormTitle>
<Card className="vcd-screen-picker-card">
<Card className={classes(WarningIconClasses.container, WarningIconClasses.warning, Margins.bottom8)}>
<Forms.FormText>
Resolution and Frame Rate aren't implemented for now. Locked to 720p 30fps
</Forms.FormText>
</Card>
<div className="vcd-screen-picker-quality">
<section>
<Forms.FormTitle>Resolution</Forms.FormTitle>
@@ -200,10 +228,31 @@ function ModalComponent({
<Button
disabled={!selected}
onClick={() => {
currentSettings = settings;
// If there are 2 connections, the second one is the existing stream.
// In that case, we patch its quality
const conn = [...MediaEngineStore.getMediaEngine().connections][1];
if (conn && conn.videoStreamParameters.length > 0) {
const height = Number(settings.resolution);
const width = Math.round(height * (16 / 9));
Object.assign(conn.videoStreamParameters[0], {
maxFrameRate: Number(settings.fps),
maxPixelCount: width * height,
maxBitrate: 8000000,
maxResolution: {
type: "fixed",
width,
height
}
});
}
submit({
id: selected!,
...settings
});
close();
}}
>

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -13,16 +13,17 @@ import { useSettings } from "renderer/settings";
export default function SettingsUi() {
const Settings = useSettings();
const supportsWindowsTransparency = VesktopNative.app.supportsWindowsTransparency();
const { autostart } = VencordDesktopNative;
const { autostart } = VesktopNative;
const [autoStartEnabled, setAutoStartEnabled] = useState(autostart.isEnabled());
const switches: [keyof typeof Settings, string, string, boolean?, (() => boolean)?][] = [
["tray", "Tray Icon", "Add a tray icon for Vencord Desktop", true],
["tray", "Tray Icon", "Add a tray icon for Vesktop", true],
[
"minimizeToTray",
"Minimize to tray",
"Hitting X will make Vencord Desktop minimize to the tray instead of closing",
"Hitting X will make Vesktop minimize to the tray instead of closing",
true,
() => Settings.tray ?? true
],
@@ -35,7 +36,7 @@ export default function SettingsUi() {
[
"openLinksWithElectron",
"Open Links in app (experimental)",
"Opens links in a new Vencord Desktop window instead of your web browser"
"Opens links in a new Vesktop window instead of your web browser"
],
["staticTitle", "Static Title", 'Makes the window title "Vencord" instead of changing to the current page']
];
@@ -43,10 +44,10 @@ export default function SettingsUi() {
return (
<Forms.FormSection>
<Text variant="heading-lg/semibold" style={{ color: "var(--header-primary)" }} tag="h2">
Vencord Desktop Settings
Vesktop Settings
</Text>
<Forms.FormTitle className={Margins.top16}>Discord Branch</Forms.FormTitle>
<Forms.FormTitle className={Margins.top16 + " " + Margins.bottom8}>Discord Branch</Forms.FormTitle>
<Select
placeholder="Stable"
options={[
@@ -68,7 +69,7 @@ export default function SettingsUi() {
await autostart[v ? "enable" : "disable"]();
setAutoStartEnabled(v);
}}
note="Automatically start Vencord Desktop on computer start-up"
note="Automatically start Vesktop on computer start-up"
>
Start With System
</Switch>
@@ -78,7 +79,7 @@ export default function SettingsUi() {
onChange={v => {
Settings.appBadge = v;
if (v) setBadge();
else VencordDesktopNative.app.setBadgeCount(0);
else VesktopNative.app.setBadgeCount(0);
}}
note="Show mention badge on the app icon"
>
@@ -97,6 +98,43 @@ export default function SettingsUi() {
</Switch>
))}
{supportsWindowsTransparency && (
<>
<Forms.FormTitle className={Margins.top16 + " " + Margins.bottom8}>
Transparency Options
</Forms.FormTitle>
<Forms.FormText className={Margins.bottom8}>
Requires a full restart. You will need a theme that supports transparency for this to work.
</Forms.FormText>
<Select
placeholder="None"
options={[
{
label: "None",
value: "none",
default: true
},
{
label: "Mica (incorporates system theme + desktop wallpaper to paint the background)",
value: "mica"
},
{ label: "Tabbed (variant of Mica with stronger background tinting)", value: "tabbed" },
{
label: "Acrylic (blurs the window behind Vesktop for a translucent background)",
value: "acrylic"
}
]}
closeOnSelect={true}
select={v => (Settings.transparencyOption = v)}
isSelected={v => v === Settings.transparencyOption}
serialize={s => s}
/>
<Forms.FormDivider className={Margins.top16 + " " + Margins.bottom16} />
</>
)}
<Forms.FormTitle>Vencord Location</Forms.FormTitle>
<Forms.FormText>
Vencord files are loaded from{" "}
@@ -105,7 +143,7 @@ export default function SettingsUi() {
href="about:blank"
onClick={e => {
e.preventDefault();
VencordDesktopNative.fileManager.showItemInFolder(Settings.vencordDir!);
VesktopNative.fileManager.showItemInFolder(Settings.vencordDir!);
}}
>
{Settings.vencordDir}
@@ -118,7 +156,7 @@ export default function SettingsUi() {
<Button
size={Button.Sizes.SMALL}
onClick={async () => {
const choice = await VencordDesktopNative.fileManager.selectVencordDir();
const choice = await VesktopNative.fileManager.selectVencordDir();
switch (choice) {
case "cancelled":
case "invalid":

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -94,8 +94,6 @@
gap: 1em;
margin-bottom: 0.5em;
opacity: 0.3;
}
.vcd-screen-picker-quality section {

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -16,17 +16,17 @@ Object.defineProperty(Notification.prototype, "onclick", {
set(onClick) {
originalSetOnClick.call(this, function (this: unknown) {
onClick.apply(this, arguments);
VencordDesktopNative.win.focus();
VesktopNative.win.focus();
});
},
configurable: true
});
// Enable Desktop Notifications by default
if (isFirstRun) {
// Hide "Download Discord Desktop now!!!!" banner
localStorage.setItem("hideNag", "true");
// Enable Desktop Notifications by default
waitFor("setDesktopType", m => {
m.setDesktopType("all");
});

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -11,9 +11,30 @@ import "./patches";
console.log("read if cute :3");
export * as Components from "./components";
import { findByPropsLazy } from "@vencord/types/webpack";
import { FluxDispatcher } from "@vencord/types/webpack/common";
import { Settings } from "./settings";
export { Settings };
const InviteActions = findByPropsLazy("resolveInvite");
export async function openInviteModal(code: string) {
const { invite } = await InviteActions.resolveInvite(code, "Desktop Modal");
if (!invite) return false;
VesktopNative.win.focus();
FluxDispatcher.dispatch({
type: "INVITE_MODAL_OPEN",
invite,
code,
context: "APP"
});
return true;
}
const arRPC = Vencord.Plugins.plugins["WebRichPresence (arRPC)"];
arRPC.required = !!Settings.store.arRPC;

View File

@@ -1,8 +1,9 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
// TODO: Possibly auto generate glob if we have more patches in the future
import "./spellCheck";
import "./platformClass";

View File

@@ -0,0 +1,22 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { addPatch } from "./shared";
addPatch({
patches: [
{
find: "platform-web",
replacement: {
// eslint-disable-next-line no-useless-escape
match: /(?<=" platform-overlay"\):)\i/,
replace: "$self.getPlatformClass()"
}
}
],
getPlatformClass: () => (navigator.platform.toLowerCase().startsWith("mac") ? "platform-osx" : "platform-web")
});

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -22,8 +22,8 @@ export function addPatch<P extends PatchData>(p: P) {
if (typeof r.replace === "string") r.replace = r.replace.replaceAll("$self", "VCDP");
}
patch.plugin = "VencordDesktop";
Vencord.Plugins.patches.push(patch as Patch);
patch.plugin = "Vesktop";
Vencord.Plugins.patches.push(patch);
}
Object.assign(VCDP, globals);

View File

@@ -1,17 +1,20 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { addContextMenuPatch } from "@vencord/types/api/ContextMenu";
import { Menu } from "@vencord/types/webpack/common";
import { findStoreLazy } from "@vencord/types/webpack";
import { ContextMenu, FluxDispatcher, Menu } from "@vencord/types/webpack/common";
import { addPatch } from "./shared";
let word: string;
let corrections: string[];
const SpellCheckStore = findStoreLazy("SpellcheckStore");
// Make spellcheck suggestions work
addPatch({
patches: [
@@ -19,41 +22,61 @@ addPatch({
find: ".enableSpellCheck)",
replacement: {
// if (isDesktop) { DiscordNative.onSpellcheck(openMenu(props)) } else { e.preventDefault(); openMenu(props) }
match: /else\{.{1,3}\.preventDefault\(\);(.{1,3}\(.{1,3}\))\}/,
match: /else\{(.{1,3})\.preventDefault\(\);(.{1,3}\(.{1,3}\))\}(?<=:(.{1,3})\.enableSpellCheck\).+?)/,
// ... else { $self.onSlateContext(() => openMenu(props)) }
replace: "else {$self.onSlateContext(() => $1)}"
replace: "else {$self.onSlateContext($1, $3?.enableSpellCheck, () => $2)}"
}
}
],
onSlateContext(openMenu: () => void) {
onSlateContext(e: MouseEvent, hasSpellcheck: boolean | undefined, openMenu: () => void) {
if (!hasSpellcheck) {
e.preventDefault();
openMenu();
return;
}
const cb = (w: string, c: string[]) => {
VencordDesktopNative.spellcheck.offSpellcheckResult(cb);
VesktopNative.spellcheck.offSpellcheckResult(cb);
word = w;
corrections = c;
openMenu();
};
VencordDesktopNative.spellcheck.onSpellcheckResult(cb);
VesktopNative.spellcheck.onSpellcheckResult(cb);
}
});
addContextMenuPatch("textarea-context", children => () => {
if (!word || !corrections?.length) return;
const hasCorrections = Boolean(word && corrections?.length);
children.push(
<Menu.MenuGroup>
{corrections.map(c => (
<Menu.MenuItem
id={"vcd-spellcheck-suggestion-" + c}
label={c}
action={() => VencordDesktopNative.spellcheck.replaceMisspelling(c)}
/>
))}
<Menu.MenuSeparator />
<Menu.MenuItem
id="vcd-spellcheck-learn"
label={`Add ${word} to dictionary`}
action={() => VencordDesktopNative.spellcheck.addToDictionary(word)}
{hasCorrections && (
<>
{corrections.map(c => (
<Menu.MenuItem
id={"vcd-spellcheck-suggestion-" + c}
label={c}
action={() => VesktopNative.spellcheck.replaceMisspelling(c)}
/>
))}
<Menu.MenuSeparator />
<Menu.MenuItem
id="vcd-spellcheck-learn"
label={`Add ${word} to dictionary`}
action={() => VesktopNative.spellcheck.addToDictionary(word)}
/>
</>
)}
<Menu.MenuCheckboxItem
id="vcd-spellcheck-enabled"
label="Enable Spellcheck"
checked={SpellCheckStore.isEnabled()}
action={() => {
FluxDispatcher.dispatch({ type: "SPELLCHECK_TOGGLE" });
// Haven't found a good way to update state, so just close for now 🤷‍♀️
ContextMenu.close();
}}
/>
</Menu.MenuGroup>
);

View File

@@ -1,14 +1,14 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { useEffect, useReducer } from "@vencord/types/webpack/common";
import { SettingsStore } from "shared/utils/SettingsStore";
export const Settings = new SettingsStore(VencordDesktopNative.settings.get());
Settings.addGlobalChangeListener((o, p) => VencordDesktopNative.settings.set(o, p));
export const Settings = new SettingsStore(VesktopNative.settings.get());
Settings.addGlobalChangeListener((o, p) => VesktopNative.settings.set(o, p));
export function useSettings() {
const [, update] = useReducer(x => x + 1, 0);

View File

@@ -1,10 +1,10 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
export const localStorage = (window.vcdLS = window.localStorage);
export const { localStorage } = window;
export const isFirstRun = (() => {
const key = "VCD_FIRST_RUN";

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
@@ -11,6 +11,7 @@ export const enum IpcEvents {
GET_RENDERER_CSS_FILE = "VCD_GET_RENDERER_CSS_FILE",
GET_VERSION = "VCD_GET_VERSION",
SUPPORTS_WINDOWS_TRANSPARENCY = "VCD_SUPPORTS_WINDOWS_TRANSPARENCY",
RELAUNCH = "VCD_RELAUNCH",
CLOSE = "VCD_CLOSE",

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,12 +1,13 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import type { Rectangle } from "electron";
export interface Settings {
transparencyOption?: "none" | "mica" | "tabbed" | "acrylic";
maximized?: boolean;
minimized?: boolean;
windowBounds?: Rectangle;

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -0,0 +1,13 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
export function isTruthy<T>(item: T): item is Exclude<T, 0 | "" | false | null | undefined> {
return Boolean(item);
}
export function isNonNullish<T>(item: T): item is Exclude<T, null | undefined> {
return item != null;
}

View File

@@ -1,23 +0,0 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
type Func = (...args: any[]) => any;
export function monkeyPatch<O extends object>(
object: O,
key: keyof O,
replacement: (original: Func, ...args: any[]) => any
): void {
const original = object[key] as Func;
const replacer = (object[key] = function (this: unknown, ...args: any[]) {
return replacement.call(this, original, ...args);
} as any);
Object.defineProperties(replacer, Object.getOwnPropertyDescriptors(original));
replacer.toString = () => original.toString();
replacer.$$original = original;
}

View File

@@ -1,6 +1,6 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/

View File

@@ -1,14 +1,14 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { app, BrowserWindow, ipcMain, shell } from "electron";
import { Settings } from "main/settings";
import { makeLinksOpenExternally } from "main/utils/makeLinksOpenExternally";
import { githubGet, ReleaseData } from "main/utils/vencordLoader";
import { join } from "path";
import { SplashProps } from "shared/browserWinProperties";
import { IpcEvents } from "shared/IpcEvents";
import { VIEW_DIR } from "shared/paths";
@@ -74,18 +74,18 @@ function isOutdated(oldVersion: string, newVersion: string) {
export async function checkUpdates() {
// if (IS_DEV) return;
try {
const raw = await githubGet("/repos/Vencord/Desktop/releases/latest");
const raw = await githubGet("/repos/Vencord/Vesktop/releases/latest");
const data = JSON.parse(raw.toString("utf-8")) as ReleaseData;
const oldVersion = app.getVersion();
const newVersion = data.tag_name.replace(/^v/, "");
if (Settings.store.skippedUpdate !== newVersion && isOutdated(oldVersion, newVersion)) {
updateData = {
currentVersion: oldVersion,
latestVersion: newVersion,
release: data
};
updateData = {
currentVersion: oldVersion,
latestVersion: newVersion,
release: data
};
if (Settings.store.skippedUpdate !== newVersion && isOutdated(oldVersion, newVersion)) {
openNewUpdateWindow();
}
} catch (e) {
@@ -95,11 +95,18 @@ export async function checkUpdates() {
function openNewUpdateWindow() {
const win = new BrowserWindow({
...SplashProps,
width: 500,
autoHideMenuBar: true,
alwaysOnTop: true,
webPreferences: {
preload: join(__dirname, "updaterPreload.js")
preload: join(__dirname, "updaterPreload.js"),
nodeIntegration: false,
contextIsolation: true,
sandbox: true
}
});
makeLinksOpenExternally(win);
win.loadFile(join(VIEW_DIR, "updater.html"));
}

View File

@@ -1,11 +1,11 @@
/*
* SPDX-License-Identifier: GPL-3.0
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2023 Vendicated and Vencord contributors
*/
import { contextBridge } from "electron";
import { invoke } from "preload/typedIpcs";
import { invoke } from "preload/typedIpc";
import { IpcEvents } from "shared/IpcEvents";
import type { UpdateData } from "./main";

View File

@@ -1,9 +1,9 @@
<head>
<link rel="stylesheet" href="./style.css" type="text/css" />
<style>
body {
padding: 2em;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Open Sans", "Helvetica Neue", sans-serif;
}
h1 {
@@ -13,10 +13,10 @@
</head>
<body>
<h1>Vencord Desktop %VERSION%</h1>
<h1 id="title">Vesktop</h1>
<p>
Vencord Desktop is a free/libre cross platform desktop app aiming to give you a snappier Discord experience with
Vencord pre-installed
Vesktop is a free/libre cross platform desktop app aiming to give you a snappier Discord experience with Vencord
pre-installed
</p>
<section>
@@ -26,17 +26,17 @@
<a href="https://vencord.dev" target="_blank">Vencord Website</a>
</li>
<li>
<a href="https://github.com/Vencord/Desktop" target="_blank">Source Code</a>
<a href="https://github.com/Vencord/Vesktop" target="_blank">Source Code</a>
</li>
<li>
<a href="https://github.com/Vencord/Desktop/issues" target="_blank">Report bugs / Request features</a>
<a href="https://github.com/Vencord/Vesktop/issues" target="_blank">Report bugs / Request features</a>
</li>
</ul>
</section>
<section>
<h2>Acknowledgements</h2>
<p>These awesome libraries empower Vencord Desktop</p>
<p>These awesome libraries empower Vesktop</p>
<ul>
<li>
<a href="https://github.com/electron/electron" target="_blank">Electron</a>
@@ -53,10 +53,19 @@
</li>
<li>
And many
<a href="https://github.com/Vencord/Desktop/blob/main/pnpm-lock.yaml" target="_blank"
<a href="https://github.com/Vencord/Vesktop/blob/main/pnpm-lock.yaml" target="_blank"
>more awesome open source libraries</a
>
</li>
</ul>
</section>
</body>
<script type="module">
const data = await Updater.getData();
if (data.currentVersion) {
const title = document.getElementById("title");
title.textContent += ` v${data.currentVersion}`;
}
</script>

View File

@@ -1,29 +1,10 @@
<head>
<link rel="stylesheet" href="./style.css" type="text/css" />
<style>
:root {
--bg: white;
--fg: black;
--fg-secondary: #313338;
--fg-semi-trans: rgb(0 0 0 / 0.2);
--link: #006ce7;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: hsl(223 6.7% 20.6%);
--fg: white;
--fg-secondary: #b5bac1;
--fg-semi-trans: rgb(255 255 255 / 0.2);
--link: #00a8fc;
}
}
body {
height: 100vh;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Open Sans", "Helvetica Neue", sans-serif;
margin: 0;
padding: 1.5em;
padding-bottom: 1em;
@@ -34,13 +15,9 @@
box-sizing: border-box;
}
body,
select {
background: var(--bg);
color: var(--fg);
}
select {
padding: 0.3em;
margin: -0.3em;
border-radius: 6px;
@@ -54,10 +31,6 @@
margin: 1em 0 2em;
}
a {
color: var(--link);
}
form {
display: grid;
gap: 1em;
@@ -131,7 +104,7 @@
</head>
<body>
<h1>Welcome to Vencord Desktop</h1>
<h1>Welcome to Vesktop</h1>
<p>Let's customise your experience!</p>
<form>
@@ -147,7 +120,7 @@
<label>
<div>
<h2>Start with System</h2>
<span>Automatically open Vencord Desktop when your computer starts</span>
<span>Automatically open Vesktop when your computer starts</span>
</div>
<input type="checkbox" name="autoStart" />
</label>
@@ -155,7 +128,10 @@
<label>
<div>
<h2>Rich Presence</h2>
<span>Enable Rich presence (game activity) via arRPC</span>
<span
>Enable Rich presence (game activity) via
<a href="https://github.com/OpenAsar/arrpc" target="_blank">arRPC</a></span
>
</div>
<input type="checkbox" name="richPresence" checked />
</label>

View File

@@ -1,16 +1,11 @@
<head>
<link rel="stylesheet" href="./style.css" type="text/css" />
<style>
* {
user-select: none;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Open Sans", "Helvetica Neue", sans-serif;
margin: 0;
padding: 0;
}
.wrapper {
box-sizing: border-box;
height: 100%;
@@ -18,13 +13,11 @@
flex-direction: column;
justify-content: center;
align-items: center;
background-color: hsl(223 6.7% 20.6%);
border-radius: 8px;
border: 1px solid hsl(220 6.5% 18%);
border: 1px solid var(--fg-semi-trans);
}
p {
color: rgb(219, 222, 225);
text-align: center;
}
@@ -43,6 +36,6 @@
alt="shiggy"
role="presentation"
/>
<p>Loading Vencord Desktop...</p>
<p>Loading Vesktop...</p>
</div>
</body>

30
static/views/style.css Normal file
View File

@@ -0,0 +1,30 @@
:root {
--bg: white;
--fg: black;
--fg-secondary: #313338;
--fg-semi-trans: rgb(0 0 0 / 0.2);
--link: #006ce7;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: hsl(223 6.7% 20.6%);
--fg: white;
--fg-secondary: #b5bac1;
--fg-semi-trans: rgb(255 255 255 / 0.2);
--link: #00a8fc;
}
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Open Sans", "Helvetica Neue", sans-serif;
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
}
a {
color: var(--link);
}

View File

@@ -1,22 +1,13 @@
<head>
<style>
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Open Sans", "Helvetica Neue", sans-serif;
margin: 0;
padding: 0;
color: rgb(219, 222, 225);
}
<link rel="stylesheet" href="./style.css" type="text/css" />
<style>
.wrapper {
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
height: 100%;
background-color: #313338;
border-radius: 8px;
border: 1px solid #248046;
min-height: 100%;
padding: 1em;
}
@@ -34,7 +25,7 @@
button {
cursor: pointer;
padding: 0.5em;
color: white;
color: var(--fg);
border: none;
border-radius: 3px;
font-weight: bold;
@@ -60,12 +51,15 @@
<div class="wrapper">
<section>
<h1>Update Available</h1>
<p>There's a new update for Vencord Desktop! Update now to get new fixes and features!</p>
<p>There's a new update for Vesktop! Update now to get new fixes and features!</p>
<p>
Current: <span id="current"></span>
<br />
Latest: <span id="latest"></span>
</p>
<h2>Changelog</h2>
<p id="changelog">Loading...</p>
</section>
<section>
@@ -113,3 +107,17 @@
});
}
</script>
<script type="module">
import { micromark } from "https://esm.sh/micromark@3?bundle";
import { gfm, gfmHtml } from "https://esm.sh/micromark-extension-gfm@2?bundle";
const changelog = (await Updater.getData()).release.body;
if (changelog)
document.getElementById("changelog").innerHTML = micromark(changelog, {
extensions: [gfm()],
htmlExtensions: [gfmHtml()]
})
.replace(/h1>/g, "h3>")
.replace(/<a /g, '<a target="_blank" ');
</script>