Merge remote-tracking branch 'upstream/main'
This commit is contained in:
		
						commit
						0451ddf33a
					
				
					 18 changed files with 1272 additions and 902 deletions
				
			
		
							
								
								
									
										18
									
								
								.github/ISSUE_TEMPLATE/blank.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								.github/ISSUE_TEMPLATE/blank.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| name: Blank Issue | ||||
| description: Reserved for developers. Use the bug report or feature request templates instead. | ||||
| 
 | ||||
| body: | ||||
|     - type: markdown | ||||
|       attributes: | ||||
|           value: | | ||||
|               # READ THIS BEFORE OPENING AN ISSUE | ||||
| 
 | ||||
|               This form is only meant for Vesktop developers. If you don't know what you're doing, | ||||
|               please use the bug report or feature request templates instead. | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: content | ||||
|       attributes: | ||||
|           label: Content | ||||
|       validations: | ||||
|           required: true | ||||
							
								
								
									
										32
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
								
							|  | @ -1,32 +0,0 @@ | |||
| --- | ||||
| name: Bug report | ||||
| about: Create a report to help us improve | ||||
| title: '' | ||||
| labels: bug | ||||
| assignees: '' | ||||
| 
 | ||||
| --- | ||||
| 
 | ||||
| **Describe the bug** | ||||
| A clear and concise description of what the bug is. | ||||
| 
 | ||||
| **To Reproduce** | ||||
| Steps to reproduce the behavior: | ||||
| 1. Go to '...' | ||||
| 2. Click on '....' | ||||
| 3. Scroll down to '....' | ||||
| 4. See error | ||||
| 
 | ||||
| **Expected behavior** | ||||
| A clear and concise description of what you expected to happen. | ||||
| 
 | ||||
| **Screenshots** | ||||
| If applicable, add screenshots to help explain your problem. | ||||
| 
 | ||||
| **Desktop (please complete the following information):** | ||||
|  - OS/Distro: [e.g. Windows / Fedora Linux / MacOs] | ||||
|  - Desktop Environment (linux only): [e.g. gnome, kde, sway] | ||||
|  - Version: [e.g. 22] | ||||
| 
 | ||||
| **Additional context** | ||||
| Add any other context about the problem here. | ||||
							
								
								
									
										106
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,106 @@ | |||
| name: 🐛 Bug / Crash Report | ||||
| description: Create a bug or crash report for Vesktop | ||||
| labels: [bug] | ||||
| title: "[Bug] <title>" | ||||
| 
 | ||||
| body: | ||||
|     - type: markdown | ||||
|       attributes: | ||||
|           value: | | ||||
|               **Thanks 🩷 for taking the time to fill out this bug report! Before proceeding, please read the following** | ||||
| 
 | ||||
|               Make sure a similar issue doesn't already exist by [searching the existing issues](https://github.com/Vencord/Vesktop/issues?q=is%3Aissue) for keywords! | ||||
| 
 | ||||
|               Make sure both Vesktop and Vencord are fully up to date. You can update Vencord by right-clicking the Vesktop tray icon and pressing "Update Vencord" | ||||
| 
 | ||||
|               Do not report any of the following issues: | ||||
|               - Purely graphical glitches like flickering, scaling issues, etc: Issue with your gpu. Nothing we can do, update drivers or disable hardware acceleration | ||||
|               - Vencord related issues: This is the Vesktop repo, not Vencord | ||||
|               - Screenshare not starting / black screening on Linux: Issue with your desktop environment, specifically its xdg-desktop-portal | ||||
| 
 | ||||
|               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, | ||||
|               like [our Flatpak](https://flathub.org/apps/dev.vencord.Vesktop) or [AppImage](https://vencord.dev/download/vesktop/amd64/appimage) | ||||
| 
 | ||||
|     - type: input | ||||
|       id: discord | ||||
|       attributes: | ||||
|           label: Discord Account | ||||
|           description: Who on Discord is making this request? Not required but encouraged for easier follow-up | ||||
|           placeholder: username#0000 | ||||
|       validations: | ||||
|           required: false | ||||
| 
 | ||||
|     - type: input | ||||
|       id: os | ||||
|       attributes: | ||||
|           label: Operating System | ||||
|           description: What operating system are you using (eg Windows 10, macOS Big Sur, Ubuntu 20.04)? | ||||
|           placeholder: Windows 10 | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: input | ||||
|       id: linux-de | ||||
|       attributes: | ||||
|           label: Linux Only ~ Desktop Environment | ||||
|           description: If you are on Linux, what Desktop environment are you using (eg GNOME, KDE, XFCE)? Are you using Wayland or Xorg? | ||||
|           placeholder: Gnome on Wayland | ||||
|       validations: | ||||
|           required: false | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: bug-description | ||||
|       attributes: | ||||
|           label: What happens when the bug or crash occurs? | ||||
|           description: Where does this bug or crash occur, when does it occur, etc. | ||||
|           placeholder: The bug/crash happens sometimes when I do ..., causing this to not work/the app to crash. I think it happens because of ... | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: expected-behaviour | ||||
|       attributes: | ||||
|           label: What is the expected behaviour? | ||||
|           description: Simply detail what the expected behaviour is. | ||||
|           placeholder: I expect Vencord/Discord to open the ... page instead of ..., it prevents me from doing ... | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: steps-to-take | ||||
|       attributes: | ||||
|           label: How do you recreate this bug or crash? | ||||
|           description: Give us a list of steps in order to recreate the bug or crash. | ||||
|           placeholder: | | ||||
|               1. Do ... | ||||
|               2. Then ... | ||||
|               3. Do this ..., ... and then ... | ||||
|               4. Observe "the bug" or "the crash" | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: debug-logs | ||||
|       attributes: | ||||
|           label: Debug Logs | ||||
|           description: Run vesktop from the command line. Include the relevant command line output here | ||||
|           value: | | ||||
|               ``` | ||||
|               Replace this text with your crash-log. Do not remove the backticks | ||||
|               ``` | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: checkboxes | ||||
|       id: agreement-check | ||||
|       attributes: | ||||
|           label: Request Agreement | ||||
|           description: We only accept reports for bugs that happen on supported and up to date Vesktop releases | ||||
|           options: | ||||
|               - label: I have searched the existing issues and found no similar issue | ||||
|                 required: true | ||||
|               - label: I am using the latest Vesktop and Vencord versions | ||||
|                 required: true | ||||
|               - label: This issue occurs on an official release (not just the AUR or Nix packages) | ||||
|                 required: true | ||||
							
								
								
									
										5
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| blank_issues_enabled: false | ||||
| contact_links: | ||||
|     - name: Vencord Support Server | ||||
|       url: https://discord.gg/D9uwnFnqmd | ||||
|       about: If you need help regarding Vesktop or Vencord, please join our support server! | ||||
							
								
								
									
										10
									
								
								.github/ISSUE_TEMPLATE/custom.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/ISSUE_TEMPLATE/custom.md
									
									
									
									
										vendored
									
									
								
							|  | @ -1,10 +0,0 @@ | |||
| --- | ||||
| name: Custom issue template | ||||
| about: Describe this issue template's purpose here. | ||||
| title: '' | ||||
| labels: '' | ||||
| assignees: '' | ||||
| 
 | ||||
| --- | ||||
| 
 | ||||
| 
 | ||||
							
								
								
									
										72
									
								
								.github/ISSUE_TEMPLATE/feature-request.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								.github/ISSUE_TEMPLATE/feature-request.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,72 @@ | |||
| name: 🛠️ Feature Request | ||||
| description: Create a feature request for Vesktop | ||||
| labels: [bug] | ||||
| title: "[Bug] <title>" | ||||
| 
 | ||||
| body: | ||||
|     - type: markdown | ||||
|       attributes: | ||||
|           value: | | ||||
|               **Thanks 🩷 for taking the time to fill out this request! Before proceeding, please read the following** | ||||
| 
 | ||||
|               Make sure a similar request doesn't already exist by [searching the existing issues](https://github.com/Vencord/Vesktop/issues?q=is%3Aissue) for keywords! | ||||
| 
 | ||||
|               This form is only meant for **Vesktop feature requests**. | ||||
|               For plugin requests or Vencord feature requests, go [here](https://github.com/Vencord/plugin-requests/issues/new?template=request.yml) instead! | ||||
| 
 | ||||
|     - type: input | ||||
|       id: discord | ||||
|       attributes: | ||||
|           label: Discord Account | ||||
|           description: Who on Discord is making this request? Not required but encouraged for easier follow-up | ||||
|           placeholder: username#0000 | ||||
|       validations: | ||||
|           required: false | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: motivation | ||||
|       attributes: | ||||
|           label: Motivation | ||||
|           description: If your feature request related to a problem? Please describe | ||||
|           placeholder: I'm always frustrated when ..., I think it would be better if ... | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: solution | ||||
|       attributes: | ||||
|           label: Solution | ||||
|           description: Describe the solution you'd like | ||||
|           placeholder: A clear and concise description of what you want to happen. | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: alternatives | ||||
|       attributes: | ||||
|           label: Alternatives | ||||
|           description: Describe alternatives you've considered | ||||
|           placeholder: A clear and concise description of any alternative solutions or features you've considered. | ||||
|       validations: | ||||
|           required: true | ||||
| 
 | ||||
|     - type: textarea | ||||
|       id: additional-context | ||||
|       attributes: | ||||
|           label: Additional context | ||||
|           description: Add any other context here. Screenshots or mockups could help greatly | ||||
|       validations: | ||||
|           required: false | ||||
| 
 | ||||
|     - type: checkboxes | ||||
|       id: agreement-check | ||||
|       attributes: | ||||
|           label: Request Agreement | ||||
|           description: This form is only for Vesktop feature requests. If the following don't apply, re-read the introduction text | ||||
|           options: | ||||
|               - label: I have searched the existing issues and found no similar issue | ||||
|                 required: true | ||||
|               - label: This is not a plugin request | ||||
|                 required: true | ||||
|               - label: This is not a Vencord feature request | ||||
|                 required: true | ||||
							
								
								
									
										20
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
								
							|  | @ -1,20 +0,0 @@ | |||
| --- | ||||
| name: Feature request | ||||
| about: Suggest an idea for this project | ||||
| title: '' | ||||
| labels: enhancement | ||||
| assignees: '' | ||||
| 
 | ||||
| --- | ||||
| 
 | ||||
| **Is your feature request related to a problem? Please describe.** | ||||
| A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||||
| 
 | ||||
| **Describe the solution you'd like** | ||||
| A clear and concise description of what you want to happen. | ||||
| 
 | ||||
| **Describe alternatives you've considered** | ||||
| A clear and concise description of any alternative solutions or features you've considered. | ||||
| 
 | ||||
| **Additional context** | ||||
| Add any other context or screenshots about the feature request here. | ||||
							
								
								
									
										1
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							|  | @ -4,6 +4,7 @@ on: | |||
|     push: | ||||
|         tags: | ||||
|             - v* | ||||
|     workflow_dispatch: | ||||
| 
 | ||||
| jobs: | ||||
|     release: | ||||
|  |  | |||
							
								
								
									
										
											BIN
										
									
								
								build/background.tiff
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								build/background.tiff
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										21
									
								
								build/entitlements.mac.plist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								build/entitlements.mac.plist
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||
| <plist version="1.0"> | ||||
|   <dict> | ||||
| 	<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||||
| 	<true/> | ||||
| 	<key>com.apple.security.cs.allow-jit</key> | ||||
| 	<true/> | ||||
| 	<key>com.apple.security.network.client</key> | ||||
| 	<true/> | ||||
| 	<key>com.apple.security.device.audio-input</key> | ||||
| 	<true/> | ||||
| 	<key>com.apple.security.device.camera</key> | ||||
| 	<true/> | ||||
| 	<key>com.apple.security.device.bluetooth</key> | ||||
| 	<true/> | ||||
| 	<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||||
| 	<true/> | ||||
| 	<key>com.apple.security.cs.disable-library-validation</key> | ||||
| 	<true/> | ||||
|   </dict> | ||||
| </plist> | ||||
|  | @ -28,6 +28,38 @@ | |||
|     </screenshot> | ||||
|   </screenshots> | ||||
|   <releases> | ||||
|     <release version="1.5.2" date="2024-05-01" type="stable"> | ||||
|       <url>https://github.com/Vencord/Vesktop/releases/tag/v1.5.2</url> | ||||
|       <description> | ||||
|         <p>What's Changed</p> | ||||
|         <ul> | ||||
|           <li>Fixed scrollbars looking wrong (actually Discord's fault)</li> | ||||
|           <li>Tray: Added left click hide/show feature by @0bCdian</li> | ||||
|           <li>MacOS: Fixed the app not properly requesting microphone permissions by @ssalggnikool</li> | ||||
|           <li>Linux: Various fixed related to audio screenshare by @Curve</li> | ||||
|           <li>Linux: Overhauled & improved screenshare with better framerate by @kaitlynkittyy</li> | ||||
|           <li>Users can now pass --enable/disable-features command line flags by @takase1121</li> | ||||
|         </ul> | ||||
|       </description> | ||||
|     </release> | ||||
|     <release version="1.5.1" date="2024-03-12" type="stable"> | ||||
|       <url>https://github.com/Vencord/Vesktop/releases/tag/v1.5.1</url> | ||||
|       <description> | ||||
|         <p>New Features</p> | ||||
|         <ul> | ||||
|           <li>Added categories to Vesktop settings to reduce visual clutter by @justin13888</li> | ||||
|           <li>Added support for Vencord's transparent window options</li> | ||||
|         </ul> | ||||
|         <p>Fixes</p> | ||||
|         <ul> | ||||
|           <li>Fixed ugly error popups when starting Vesktop without working internet connection</li> | ||||
|           <li>Fixed popout title bars on Windows</li> | ||||
|           <li>Fixed spellcheck entries</li> | ||||
|           <li>Fixed screenshare audio using microphone on debian, by @Curve</li> | ||||
|           <li>Fixed a bug where autostart on Linux won't preserve command line flags</li> | ||||
|         </ul> | ||||
|       </description> | ||||
|     </release> | ||||
|     <release version="1.5.0" date="2024-01-16" type="stable"> | ||||
|       <url>https://github.com/Vencord/Vesktop/releases/tag/v1.5.0</url> | ||||
|       <description> | ||||
|  | @ -162,11 +194,7 @@ | |||
|     <control>voice</control> | ||||
|     <display_length compare="ge">760</display_length> | ||||
|     <display_length compare="le">1200</display_length> | ||||
|     <internet>always</internet> | ||||
|   </recommends> | ||||
|   <supports> | ||||
|     <internet>always</internet> | ||||
|   </supports> | ||||
|   <content_rating type="oars-1.1"> | ||||
|     <content_attribute id="social-chat">intense</content_attribute> | ||||
|     <content_attribute id="social-audio">intense</content_attribute> | ||||
|  |  | |||
|  | @ -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" | ||||
|  |  | |||
							
								
								
									
										1555
									
								
								pnpm-lock.yaml
									
									
									
									
									
								
							
							
						
						
									
										1555
									
								
								pnpm-lock.yaml
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -1,242 +0,0 @@ | |||
| /* | ||||
|  * 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 "./settings.css"; | ||||
| 
 | ||||
| import { Margins } from "@vencord/types/utils"; | ||||
| import { Button, Forms, Select, Switch, Text, Toasts, useState } from "@vencord/types/webpack/common"; | ||||
| import { setBadge } from "renderer/appBadge"; | ||||
| import { useSettings } from "renderer/settings"; | ||||
| import { isMac } from "renderer/utils"; | ||||
| import { isTruthy } from "shared/utils/guards"; | ||||
| 
 | ||||
| export default function SettingsUi() { | ||||
|     const Settings = useSettings(); | ||||
|     const supportsWindowsTransparency = VesktopNative.app.supportsWindowsTransparency(); | ||||
| 
 | ||||
|     const { autostart } = VesktopNative; | ||||
|     const [autoStartEnabled, setAutoStartEnabled] = useState(autostart.isEnabled()); | ||||
| 
 | ||||
|     const allSwitches: Array<false | [keyof typeof Settings, string, string, boolean?, (() => boolean)?]> = [ | ||||
|         [ | ||||
|             "customTitleBar", | ||||
|             "Discord Titlebar", | ||||
|             "Use Discord's custom title bar instead of the native system one. Requires a full restart." | ||||
|         ], | ||||
|         !isMac && ["tray", "Tray Icon", "Add a tray icon for Vesktop", true], | ||||
|         !isMac && [ | ||||
|             "minimizeToTray", | ||||
|             "Minimize to tray", | ||||
|             "Hitting X will make Vesktop minimize to the tray instead of closing", | ||||
|             true, | ||||
|             () => Settings.tray ?? true | ||||
|         ], | ||||
|         ["arRPC", "Rich Presence", "Enables Rich Presence via arRPC", false], | ||||
|         [ | ||||
|             "disableMinSize", | ||||
|             "Disable minimum window size", | ||||
|             "Allows you to make the window as small as your heart desires" | ||||
|         ], | ||||
|         ["staticTitle", "Static Title", 'Makes the window title "Vesktop" instead of changing to the current page'], | ||||
|         [ | ||||
|             "enableMenu", | ||||
|             "Enable Menu Bar", | ||||
|             "Enables the application menu bar. Press ALT to toggle visibility. Incompatible with 'Discord Titlebar'" | ||||
|         ], | ||||
|         ["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false], | ||||
|         ["hardwareAcceleration", "Hardware Acceleration", "Enable hardware acceleration", true], | ||||
|         ["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false], | ||||
|         [ | ||||
|             "openLinksWithElectron", | ||||
|             "Open Links in app (experimental)", | ||||
|             "Opens links in a new Vesktop window instead of your web browser" | ||||
|         ], | ||||
|         ["checkUpdates", "Check for updates", "Automatically check for Vesktop updates", true] | ||||
|     ]; | ||||
| 
 | ||||
|     const switches = allSwitches.filter(isTruthy); | ||||
| 
 | ||||
|     return ( | ||||
|         <Forms.FormSection> | ||||
|             <Text variant="heading-lg/semibold" style={{ color: "var(--header-primary)" }} tag="h2"> | ||||
|                 Vesktop Settings | ||||
|             </Text> | ||||
| 
 | ||||
|             <Forms.FormTitle className={Margins.top16 + " " + Margins.bottom8}>Discord Branch</Forms.FormTitle> | ||||
|             <Select | ||||
|                 placeholder="Stable" | ||||
|                 options={[ | ||||
|                     { label: "Stable", value: "stable", default: true }, | ||||
|                     { label: "Canary", value: "canary" }, | ||||
|                     { label: "PTB", value: "ptb" } | ||||
|                 ]} | ||||
|                 closeOnSelect={true} | ||||
|                 select={v => (Settings.discordBranch = v)} | ||||
|                 isSelected={v => v === Settings.discordBranch} | ||||
|                 serialize={s => s} | ||||
|             /> | ||||
| 
 | ||||
|             <Forms.FormDivider className={Margins.top16 + " " + Margins.bottom16} /> | ||||
| 
 | ||||
|             <Switch | ||||
|                 value={autoStartEnabled} | ||||
|                 onChange={async v => { | ||||
|                     await autostart[v ? "enable" : "disable"](); | ||||
|                     setAutoStartEnabled(v); | ||||
|                 }} | ||||
|                 note="Automatically start Vesktop on computer start-up" | ||||
|             > | ||||
|                 Start With System | ||||
|             </Switch> | ||||
| 
 | ||||
|             <Switch | ||||
|                 value={Settings.appBadge ?? true} | ||||
|                 onChange={v => { | ||||
|                     Settings.appBadge = v; | ||||
|                     if (v) setBadge(); | ||||
|                     else VesktopNative.app.setBadgeCount(0); | ||||
|                 }} | ||||
|                 note="Show mention badge on the app icon" | ||||
|             > | ||||
|                 Notification Badge | ||||
|             </Switch> | ||||
| 
 | ||||
|             {switches.map(([key, text, note, def, predicate]) => ( | ||||
|                 <Switch | ||||
|                     value={(Settings[key as any] ?? def ?? false) && predicate?.() !== false} | ||||
|                     disabled={predicate && !predicate()} | ||||
|                     onChange={v => (Settings[key as any] = v)} | ||||
|                     note={note} | ||||
|                     key={key} | ||||
|                 > | ||||
|                     {text} | ||||
|                 </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>Custom Spash Animation</Forms.FormTitle> | ||||
|             <Forms.FormText> | ||||
|                 The animation on the splash window is loaded from{" "} | ||||
|                 {Settings.splashAnimationPath ? ( | ||||
|                     <a | ||||
|                         href="about:blank" | ||||
|                         onClick={e => { | ||||
|                             e.preventDefault(); | ||||
|                             VesktopNative.fileManager.showItemInFolder(Settings.splashAnimationPath!); | ||||
|                         }} | ||||
|                     > | ||||
|                         {Settings.splashAnimationPath} | ||||
|                     </a> | ||||
|                 ) : ( | ||||
|                     "the default location" | ||||
|                 )} | ||||
|             </Forms.FormText> | ||||
|             <div className="vcd-location-btns" style={{marginBottom: 20}}> | ||||
|                 <Button | ||||
|                     size={Button.Sizes.SMALL} | ||||
|                     onClick={async () => { | ||||
|                         const choice = await VesktopNative.fileManager.selectImagePath(); | ||||
|                         if (choice === "cancelled") return; | ||||
|                         Settings.splashAnimationPath = choice; | ||||
|                     }} | ||||
|                 > | ||||
|                     Change | ||||
|                 </Button> | ||||
|                 <Button | ||||
|                     size={Button.Sizes.SMALL} | ||||
|                     color={Button.Colors.RED} | ||||
|                     onClick={() => (Settings.splashAnimationPath = void 0)} | ||||
|                 > | ||||
|                     Reset | ||||
|                 </Button> | ||||
|             </div> | ||||
| 
 | ||||
|             <Forms.FormTitle>Vencord Location</Forms.FormTitle> | ||||
|             <Forms.FormText> | ||||
|                 Vencord files are loaded from{" "} | ||||
|                 {Settings.vencordDir ? ( | ||||
|                     <a | ||||
|                         href="about:blank" | ||||
|                         onClick={e => { | ||||
|                             e.preventDefault(); | ||||
|                             VesktopNative.fileManager.showItemInFolder(Settings.vencordDir!); | ||||
|                         }} | ||||
|                     > | ||||
|                         {Settings.vencordDir} | ||||
|                     </a> | ||||
|                 ) : ( | ||||
|                     "the default location" | ||||
|                 )} | ||||
|             </Forms.FormText> | ||||
|             <div className="vcd-location-btns"> | ||||
|                 <Button | ||||
|                     size={Button.Sizes.SMALL} | ||||
|                     onClick={async () => { | ||||
|                         const choice = await VesktopNative.fileManager.selectVencordDir(); | ||||
|                         switch (choice) { | ||||
|                             case "cancelled": | ||||
|                                 return; | ||||
|                             case "invalid": | ||||
|                                 Toasts.show({ | ||||
|                                     message: | ||||
|                                         "You did not choose a valid Vencord install. Make sure you're selecting the dist dir!", | ||||
|                                     id: Toasts.genId(), | ||||
|                                     type: Toasts.Type.FAILURE | ||||
|                                 }); | ||||
|                                 return; | ||||
|                         } | ||||
|                         Settings.vencordDir = choice; | ||||
|                     }} | ||||
|                 > | ||||
|                     Change | ||||
|                 </Button> | ||||
|                 <Button | ||||
|                     size={Button.Sizes.SMALL} | ||||
|                     color={Button.Colors.RED} | ||||
|                     onClick={() => (Settings.vencordDir = void 0)} | ||||
|                 > | ||||
|                     Reset | ||||
|                 </Button> | ||||
|             </div> | ||||
|         </Forms.FormSection> | ||||
|     ); | ||||
| } | ||||
|  | @ -1,6 +0,0 @@ | |||
| .vcd-location-btns { | ||||
|     display: grid; | ||||
|     grid-template-columns: 1fr 1fr; | ||||
|     gap: 0.5em; | ||||
|     margin-top: 0.5em; | ||||
| } | ||||
|  | @ -11,7 +11,6 @@ import { SettingsComponent } from "./Settings"; | |||
| export const VencordLocationPicker: SettingsComponent = ({ settings }) => { | ||||
|     return ( | ||||
|         <> | ||||
|          | ||||
|             <Forms.FormText> | ||||
|                 Vencord files are loaded from{" "} | ||||
|                 {settings.vencordDir ? ( | ||||
|  |  | |||
|  | @ -1,5 +0,0 @@ | |||
| /* Download Desktop button in guilds list */ | ||||
| [class^=listItem_]:has([data-list-item-id=guildsnav___app-download-button]), | ||||
| [class^=listItem_]:has(+ [class^=listItem_] [data-list-item-id=guildsnav___app-download-button]) { | ||||
|     display: none; | ||||
| } | ||||
|  | @ -1,42 +0,0 @@ | |||
| /* | ||||
|  * 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 { isLinux } from "renderer/utils"; | ||||
| 
 | ||||
| if (isLinux) { | ||||
|     const original = navigator.mediaDevices.getDisplayMedia; | ||||
| 
 | ||||
|     async function getVirtmic() { | ||||
|         try { | ||||
|             const devices = await navigator.mediaDevices.enumerateDevices(); | ||||
|             const audioDevice = devices.find(({ label }) => label === "vencord-screen-share"); | ||||
|             return audioDevice?.deviceId; | ||||
|         } catch (error) { | ||||
|             return null; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     navigator.mediaDevices.getDisplayMedia = async function (opts) { | ||||
|         const stream = await original.call(this, opts); | ||||
|         const id = await getVirtmic(); | ||||
| 
 | ||||
|         if (id) { | ||||
|             const audio = await navigator.mediaDevices.getUserMedia({ | ||||
|                 audio: { | ||||
|                     deviceId: { | ||||
|                         exact: id | ||||
|                     }, | ||||
|                     autoGainControl: false, | ||||
|                     echoCancellation: false, | ||||
|                     noiseSuppression: false | ||||
|                 } | ||||
|             }); | ||||
|             audio.getAudioTracks().forEach(t => stream.addTrack(t)); | ||||
|         } | ||||
| 
 | ||||
|         return stream; | ||||
|     }; | ||||
| } | ||||
		Loading…
	
		Reference in a new issue
	
	 ading2210
						ading2210