[Update] UI: VRC ChatBoxの通知音のON/OFF 設定項目追加
This commit is contained in:
@@ -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";
|
||||
|
||||
28
src-ui/logics/configs/others/useEnableNotificationVrcSfx.js
Normal file
28
src-ui/logics/configs/others/useEnableNotificationVrcSfx.js
Normal 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,
|
||||
};
|
||||
};
|
||||
@@ -69,6 +69,7 @@ import {
|
||||
useIsEnabledOverlayLargeLog,
|
||||
useOverlayLargeLogSettings,
|
||||
useOverlayShowOnlyTranslatedMessages,
|
||||
useEnableNotificationVrcSfx,
|
||||
useHotkeys,
|
||||
useOscIpAddress,
|
||||
useOscPort,
|
||||
@@ -170,6 +171,7 @@ export const useReceiveRoutes = () => {
|
||||
const { updateOverlayLargeLogSettings } = useOverlayLargeLogSettings();
|
||||
const { updateIsEnabledOverlayLargeLog } = useIsEnabledOverlayLargeLog();
|
||||
const { updateOverlayShowOnlyTranslatedMessages } = useOverlayShowOnlyTranslatedMessages();
|
||||
const { updateEnableNotificationVrcSfx } = useEnableNotificationVrcSfx();
|
||||
|
||||
const { updateHotkeys } = useHotkeys();
|
||||
|
||||
@@ -472,6 +474,10 @@ export const useReceiveRoutes = () => {
|
||||
"/set/enable/send_received_message_to_vrc": updateEnableSendReceivedMessageToVrc,
|
||||
"/set/disable/send_received_message_to_vrc": updateEnableSendReceivedMessageToVrc,
|
||||
|
||||
"/get/data/notification_vrc_sfx": updateEnableNotificationVrcSfx,
|
||||
"/set/enable/notification_vrc_sfx": updateEnableNotificationVrcSfx,
|
||||
"/set/disable/notification_vrc_sfx": updateEnableNotificationVrcSfx,
|
||||
|
||||
// Hotkeys
|
||||
"/get/data/hotkeys": updateHotkeys,
|
||||
"/set/data/hotkeys": updateHotkeys,
|
||||
|
||||
Reference in New Issue
Block a user