[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:
@@ -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";
|
||||
@@ -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,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
10
src-ui/logics/common/useIsVrctAvailable.js
Normal file
10
src-ui/logics/common/useIsVrctAvailable.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useStore_IsVrctAvailable } from "@store";
|
||||
|
||||
export const useIsVrctAvailable = () => {
|
||||
const { currentIsVrctAvailable, updateIsVrctAvailable } = useStore_IsVrctAvailable();
|
||||
|
||||
return {
|
||||
currentIsVrctAvailable,
|
||||
updateIsVrctAvailable,
|
||||
};
|
||||
};
|
||||
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user