[Update] Config Page: Add Advanced Settings Tab.

This commit is contained in:
Sakamoto Shiina
2024-10-17 01:58:49 +09:00
parent 2f6a9d4f2b
commit ec64b64535
10 changed files with 204 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
import { useStore_OscIpAddress } from "@store";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useOscIpAddress = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentOscIpAddress, updateOscIpAddress, pendingOscIpAddress } = useStore_OscIpAddress();
const getOscIpAddress = () => {
pendingOscIpAddress();
asyncStdoutToPython("/get/data/osc_ip_address");
};
const setOscIpAddress = (osc_ip_address) => {
pendingOscIpAddress();
asyncStdoutToPython("/set/data/osc_ip_address", osc_ip_address);
};
return {
currentOscIpAddress,
getOscIpAddress,
updateOscIpAddress,
setOscIpAddress,
};
};

View File

@@ -0,0 +1,24 @@
import { useStore_OscPort } from "@store";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useOscPort = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentOscPort, updateOscPort, pendingOscPort } = useStore_OscPort();
const getOscPort = () => {
pendingOscPort();
asyncStdoutToPython("/get/data/osc_port");
};
const setOscPort = (osc_port) => {
pendingOscPort();
asyncStdoutToPython("/set/data/osc_port", osc_port);
};
return {
currentOscPort,
getOscPort,
updateOscPort,
setOscPort,
};
};