diff --git a/src/plugins/customVoiceFilter/ConfirmModal.tsx b/src/plugins/customVoiceFilter/ConfirmModal.tsx
index d95ef411e..2a9580f93 100644
--- a/src/plugins/customVoiceFilter/ConfirmModal.tsx
+++ b/src/plugins/customVoiceFilter/ConfirmModal.tsx
@@ -37,7 +37,7 @@ function ConfirmModal({ modalProps, message, accept, close }: ConfirmModalProps)
-
+ {message}
diff --git a/src/plugins/customVoiceFilter/CreateVoiceFilterModal.tsx b/src/plugins/customVoiceFilter/CreateVoiceFilterModal.tsx
index 9a98f083d..a6488a0c6 100644
--- a/src/plugins/customVoiceFilter/CreateVoiceFilterModal.tsx
+++ b/src/plugins/customVoiceFilter/CreateVoiceFilterModal.tsx
@@ -57,7 +57,7 @@ function CreateVoiceFilterModal({ modalProps, close, defaultValue }: CreateVoice
}, [voiceFilter]);
const keyOptions: SelectOption[] = useMemo(() =>
- [{ value: "", label: "(empty)" }, ...Object.keys(voices).map(name => ({ value: name, label: name }))],
+ [{ value: "", label: "(empty)" }, ...(voices ? Object.keys(voices).map(name => ({ value: name, label: name })) : [])],
[]);
return (
@@ -68,7 +68,7 @@ function CreateVoiceFilterModal({ modalProps, close, defaultValue }: CreateVoice
-
+ Name*
diff --git a/src/plugins/customVoiceFilter/ErrorModal.tsx b/src/plugins/customVoiceFilter/ErrorModal.tsx
index 836b4c33d..aeb22d80f 100644
--- a/src/plugins/customVoiceFilter/ErrorModal.tsx
+++ b/src/plugins/customVoiceFilter/ErrorModal.tsx
@@ -36,7 +36,7 @@ function ErrorModal({ modalProps, close, message }: ErrorModalProps): JSX.Elemen
-
+ {message}
diff --git a/src/plugins/customVoiceFilter/HelpModal.tsx b/src/plugins/customVoiceFilter/HelpModal.tsx
index 2eb16388a..7c90c3edd 100644
--- a/src/plugins/customVoiceFilter/HelpModal.tsx
+++ b/src/plugins/customVoiceFilter/HelpModal.tsx
@@ -4,14 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
-import { CodeBlock } from "@components/CodeBlock";
import { closeModal, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
-import { Button, Flex, Forms, Text } from "@webpack/common";
+import { Button, Flex, Forms } from "@webpack/common";
import { JSX } from "react";
-import { templateVoicepack } from ".";
+import { templateVoicepack, voices } from ".";
+import { Markdown } from "./Markdown";
import { downloadFile } from "./utils";
-import { openVoiceFiltersModal } from "./VoiceFiltersModal";
export function openHelpModal(): string {
const key = openModal(modalProps => (
@@ -29,6 +28,16 @@ interface HelpModalProps {
}
function HelpModal({ modalProps, close }: HelpModalProps): JSX.Element {
+ const description = `To build your own voicepack, you need to have a voicepack file. You can download one from the template or look at this tutorial.
+
+The voicepack file is a json file that contains the voicepack data.
+A voicepack may have one or multiple voices. Each voice is an object with the following properties:
+\`\`\`json
+${templateVoicepack}
+\`\`\`*Style Key must be "" or one of the following: ${voices ? [...new Set(Object.values(voices).map(({ styleKey }) => styleKey))].join(", ") : ""}*
+
+Once you have the voicepack file, you can use the to manage your voicepacks.`;
+
return (
@@ -37,20 +46,16 @@ function HelpModal({ modalProps, close }: HelpModalProps): JSX.Element {
-
-
- To build your own voicepack, you need to have a voicepack file. You can download one from the template or look at this tutorial.
- The voicepack file is a json file that contains the voicepack data. You can find the template {
- downloadFile("voicepack-template.json", templateVoicepack);
- }}>here
- Once you have the voicepack file, you can use the Voice Filters Management Menu to manage your voicepacks.
- A voicepack may have one or multiple voices. Each voice is an object with the following properties:
-
- Style Key must be "" or one of the following: skye, quinn, axel, sebastien, megaphone, robot, tunes, ghost, spacebunny, justus, harper, villain, solara, cave, deepfried
-
+
+
-
+
+
+
+
);
diff --git a/src/plugins/customVoiceFilter/Icons.tsx b/src/plugins/customVoiceFilter/Icons.tsx
index 939c1099e..60f5a2ca7 100644
--- a/src/plugins/customVoiceFilter/Icons.tsx
+++ b/src/plugins/customVoiceFilter/Icons.tsx
@@ -5,55 +5,89 @@
*/
import { ChatBarButton, ChatBarButtonFactory } from "@api/ChatButtons";
-import { JSX } from "react";
+import { JSX, SVGProps } from "react";
-import { VoiceFilterStyles } from "./index";
import { openVoiceFiltersModal } from "./VoiceFiltersModal";
-export function DownloadIcon(): JSX.Element {
+
+
+interface IconProps extends SVGProps { }
+
+export function DownloadIcon(props: IconProps): JSX.Element {
return (
-