[Update] UI: VRC ChatBoxの通知音のON/OFF 設定項目追加

This commit is contained in:
Sakamoto Shiina
2025-02-18 15:36:08 +09:00
parent 4b61178b0e
commit fd0069cb6b
7 changed files with 62 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ export { useEnableSendMessageToVrc } from "./others/useEnableSendMessageToVrc";
export { useEnableSendReceivedMessageToVrc } from "./others/useEnableSendReceivedMessageToVrc";
export { useEnableSendOnlyTranslatedMessages } from "./others/useEnableSendOnlyTranslatedMessages";
export { useEnableVrcMicMuteSync } from "./others/useEnableVrcMicMuteSync";
export { useEnableNotificationVrcSfx } from "./others/useEnableNotificationVrcSfx";
export { useMicRecordTimeout } from "./transcription/useMicRecordTimeout";
export { useMicPhraseTimeout } from "./transcription/useMicPhraseTimeout";

View File

@@ -0,0 +1,28 @@
import { useStore_EnableNotificationVrcSfx } from "@store";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useEnableNotificationVrcSfx = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentEnableNotificationVrcSfx, updateEnableNotificationVrcSfx, pendingEnableNotificationVrcSfx } = useStore_EnableNotificationVrcSfx();
const getEnableNotificationVrcSfx = () => {
pendingEnableNotificationVrcSfx();
asyncStdoutToPython("/get/data/notification_vrc_sfx");
};
const toggleEnableNotificationVrcSfx = () => {
pendingEnableNotificationVrcSfx();
if (currentEnableNotificationVrcSfx.data) {
asyncStdoutToPython("/set/disable/notification_vrc_sfx");
} else {
asyncStdoutToPython("/set/enable/notification_vrc_sfx");
}
};
return {
currentEnableNotificationVrcSfx,
getEnableNotificationVrcSfx,
toggleEnableNotificationVrcSfx,
updateEnableNotificationVrcSfx,
};
};