[Update] Resend Message Button: To be store-able the status.

Move to Appearance settings.
This commit is contained in:
Sakamoto Shiina
2025-06-15 17:49:42 +09:00
parent d454c9b13a
commit 3f38bfbba8
17 changed files with 90 additions and 42 deletions

View File

@@ -0,0 +1,28 @@
import { useStore_ShowResendButton } from "@store";
import { useStdoutToPython } from "@useStdoutToPython";
export const useShowResendButton = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentShowResendButton, updateShowResendButton, pendingShowResendButton } = useStore_ShowResendButton();
const getShowResendButton = () => {
pendingShowResendButton();
asyncStdoutToPython("/get/data/show_resend_button");
};
const toggleShowResendButton = () => {
pendingShowResendButton();
if (currentShowResendButton.data) {
asyncStdoutToPython("/set/disable/show_resend_button");
} else {
asyncStdoutToPython("/set/enable/show_resend_button");
}
};
return {
currentShowResendButton,
getShowResendButton,
updateShowResendButton,
toggleShowResendButton,
};
};