mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-12-25 14:09:46 +00:00
fix: dry run (#566)
This commit is contained in:
parent
3793e91899
commit
258dba3011
@ -1,5 +1,7 @@
|
||||
import { overrideAIConfig } from '@midscene/core/env';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import type React from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import { EnvConfig } from '../env-config';
|
||||
import { iconForStatus } from '../misc';
|
||||
import { useEnvConfig } from '../store/store';
|
||||
@ -24,7 +26,7 @@ const SWITCH_BUTTON_TEXT = {
|
||||
export const ServiceModeControl: React.FC<ServiceModeControlProps> = ({
|
||||
serviceMode,
|
||||
}) => {
|
||||
const { setServiceMode } = useEnvConfig();
|
||||
const { setServiceMode, config } = useEnvConfig();
|
||||
const serverValid = useServerValid(serviceMode === 'Server');
|
||||
|
||||
// Render server tip based on connection status
|
||||
@ -69,6 +71,10 @@ export const ServiceModeControl: React.FC<ServiceModeControlProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
overrideAIConfig(config);
|
||||
}, [config]);
|
||||
|
||||
// Determine content based on service mode
|
||||
const statusContent =
|
||||
serviceMode === 'Server' ? renderServerTip() : <EnvConfig />;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user