[Update] Main Page: Message Input Box Ratio. saveable the ratio.
This commit is contained in:
1 parent
14470e5217
commit
b3d7d3f87e
6 files changed
+113
-20
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { useStore_MessageInputBoxRatio } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useMessageInputBoxRatio = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentMessageInputBoxRatio, updateMessageInputBoxRatio } = useStore_MessageInputBoxRatio();
|
||||
|
||||
const getMessageInputBoxRatio = () => {
|
||||
asyncStdoutToPython("/get/data/message_box_ratio");
|
||||
};
|
||||
|
||||
const setMessageInputBoxRatio = (ratio) => {
|
||||
asyncStdoutToPython("/set/data/message_box_ratio", parseFloat(ratio.toFixed(2)));
|
||||
};
|
||||
|
||||
return {
|
||||
currentMessageInputBoxRatio,
|
||||
getMessageInputBoxRatio,
|
||||
updateMessageInputBoxRatio,
|
||||
setMessageInputBoxRatio,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user