From 2f40cfebbe439a7f195d6132baee5cd5f98286c2 Mon Sep 17 00:00:00 2001
From: Sammie Zhang <101011086+sz6084@users.noreply.github.com>
Date: Tue, 7 May 2024 17:24:39 -0700
Subject: [PATCH] Final edits - Made submenu in Vesktop Settings work
---
.../settings/CustomSplashAnimation.tsx | 53 +++++++++++++++++++
src/renderer/components/settings/Settings.tsx | 5 +-
2 files changed, 56 insertions(+), 2 deletions(-)
create mode 100644 src/renderer/components/settings/CustomSplashAnimation.tsx
diff --git a/src/renderer/components/settings/CustomSplashAnimation.tsx b/src/renderer/components/settings/CustomSplashAnimation.tsx
new file mode 100644
index 0000000..df196da
--- /dev/null
+++ b/src/renderer/components/settings/CustomSplashAnimation.tsx
@@ -0,0 +1,53 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0
+ * Vesktop, a desktop app aiming to give you a snappier Discord Experience
+ * Copyright (c) 2024 Vendicated and Vencord contributors
+ */
+
+import { Button, Forms, Toasts } from "@vencord/types/webpack/common";
+
+import { SettingsComponent } from "./Settings";
+
+export const CustomSplashAnimation: SettingsComponent = ({ settings }) => {
+ return (
+ <>
+
+
+ The animation on the splash window is loaded from{" "}
+ {settings.splashAnimationPath ? (
+ {
+ e.preventDefault();
+ VesktopNative.fileManager.showItemInFolder(settings.splashAnimationPath!);
+ }}
+ >
+ {settings.splashAnimationPath}
+
+ ) : (
+ "the default location"
+ )}
+
+
+
+
+
+
+ >
+ );
+};
diff --git a/src/renderer/components/settings/Settings.tsx b/src/renderer/components/settings/Settings.tsx
index ec35252..7ac43bb 100644
--- a/src/renderer/components/settings/Settings.tsx
+++ b/src/renderer/components/settings/Settings.tsx
@@ -16,6 +16,7 @@ import { DiscordBranchPicker } from "./DiscordBranchPicker";
import { NotificationBadgeToggle } from "./NotificationBadgeToggle";
import { VencordLocationPicker } from "./VencordLocationPicker";
import { WindowsTransparencyControls } from "./WindowsTransparencyControls";
+import { CustomSplashAnimation } from "./CustomSplashAnimation";
interface BooleanSetting {
key: keyof typeof Settings.store;
@@ -126,8 +127,8 @@ const SettingsOptions: Record>
defaultValue: false
}
],
- "Vencord Location": [VencordLocationPicker],
- "Custom Splash Animation":[]
+ "Custom Splash Animation":[CustomSplashAnimation],
+ "Vencord Location": [VencordLocationPicker]
};
function SettingsSections() {