[Update] Add VRCT Availability Status that if the status set to false, that is when ai models has not been detected by backend, can't use VRCT.

This commit is contained in:
Sakamoto Shiina
2025-02-08 21:58:29 +09:00
parent a36dc93522
commit 9daa50294e
8 changed files with 45 additions and 16 deletions

View File

@@ -10,4 +10,5 @@ export { useOpenFolder } from "./useOpenFolder";
export { useMessage } from "./useMessage";
export { useUpdateSoftware } from "./useUpdateSoftware";
export { useVolume } from "./useVolume";
export { useHandleNetworkConnection } from "./useHandleNetworkConnection";
export { useHandleNetworkConnection } from "./useHandleNetworkConnection";
export { useIsVrctAvailable } from "./useIsVrctAvailable";

View File

@@ -6,7 +6,9 @@ export const useHandleNetworkConnection = () => {
const handleNetworkConnection = (is_network_connected) => {
if (!is_network_connected) {
showNotification_Error("Network is not connected. Some of the function will not work.");
showNotification_Error("Network is not connected. Some of the function will not work.", {
hide_duration: 8000,
});
}
};

View File

@@ -0,0 +1,10 @@
import { useStore_IsVrctAvailable } from "@store";
export const useIsVrctAvailable = () => {
const { currentIsVrctAvailable, updateIsVrctAvailable } = useStore_IsVrctAvailable();
return {
currentIsVrctAvailable,
updateIsVrctAvailable,
};
};

View File

@@ -5,12 +5,13 @@ export const useNotificationStatus = () => {
const generateRandomKey = () => Math.random();
const showNotification_Error = (message) => {
const showNotification_Error = (message, options = {}) => {
updateNotificationStatus({
status: "error",
is_open: true,
key: generateRandomKey(),
message: message,
options: options,
});
};
@@ -20,6 +21,7 @@ export const useNotificationStatus = () => {
is_open: true,
key: generateRandomKey(),
message: message,
options: options,
});
};