Changes to be committed:

modified:   src/renderer/components/settings/VencordLocationPicker.tsx
This commit is contained in:
Sammie Zhang 2024-05-07 00:44:10 -07:00
parent 16bd46cbc9
commit 55ffbf7774
No known key found for this signature in database
GPG key ID: 94E117FC99C11E1A

View file

@ -11,6 +11,45 @@ import { SettingsComponent } from "./Settings";
export const VencordLocationPicker: SettingsComponent = ({ settings }) => {
return (
<>
<Forms.FormTitle>Custom Splash 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.FormText>
Vencord files are loaded from{" "}
{settings.vencordDir ? (