refactor(scenario): remove step type and simplify scheduler to exec-only
- remove StepType, type column, and type field from step entity and DTOs - remove executeLoginStep, executeSignStep, executeExecStep from scheduler - inline exec logic directly in executeStepRun; all steps run execCode - remove AuthService, EnvironmentService, runEnvironments from scheduler - remove type selector from CreateStepPage and EditStepPage - remove type badge column from ScenarioDetailPage - fix useEffect dependency arrays in RunDetailPage (FINAL, id, runId, polling) - fix duplicate /snippets proxy key in vite.config.ts - remove unused escapeHtml export from hljs.ts
This commit is contained in:
@@ -6,7 +6,11 @@ export interface AutoRefreshIndicatorProps {
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export function AutoRefreshIndicator({ active, pulseKey, label = 'Live' }: AutoRefreshIndicatorProps) {
|
||||
export function AutoRefreshIndicator({
|
||||
active,
|
||||
pulseKey,
|
||||
label = 'Live',
|
||||
}: AutoRefreshIndicatorProps) {
|
||||
return (
|
||||
<div
|
||||
className={[styles.root, active ? styles.active : styles.inactive].join(' ')}
|
||||
@@ -15,9 +19,7 @@ export function AutoRefreshIndicator({ active, pulseKey, label = 'Live' }: AutoR
|
||||
aria-live="polite"
|
||||
>
|
||||
<span className={styles.dot}>
|
||||
{pulseKey !== undefined && pulseKey > 0 && (
|
||||
<span key={pulseKey} className={styles.ring} />
|
||||
)}
|
||||
{pulseKey !== undefined && pulseKey > 0 && <span key={pulseKey} className={styles.ring} />}
|
||||
</span>
|
||||
<span className={styles.label}>{label}</span>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react';
|
||||
import hljs, { escapeHtml } from '../../lib/hljs';
|
||||
import hljs from '../../lib/hljs';
|
||||
import styles from './CodeBlock.module.css';
|
||||
|
||||
export interface CodeBlockProps {
|
||||
|
||||
@@ -12,13 +12,13 @@ export interface CodeEditorProps {
|
||||
|
||||
function useMonacoTheme() {
|
||||
const [theme, setTheme] = useState(() =>
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ? 'vs-dark' : 'vs-light'
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ? 'vs-dark' : 'vs-light',
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const observer = new MutationObserver(() => {
|
||||
setTheme(
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ? 'vs-dark' : 'vs-light'
|
||||
document.documentElement.getAttribute('data-theme') === 'dark' ? 'vs-dark' : 'vs-light',
|
||||
);
|
||||
});
|
||||
observer.observe(document.documentElement, {
|
||||
@@ -49,11 +49,7 @@ export function CodeEditor({
|
||||
|
||||
return (
|
||||
<div
|
||||
className={[
|
||||
styles.wrapper,
|
||||
focused ? styles.focused : '',
|
||||
error ? styles.hasError : '',
|
||||
]
|
||||
className={[styles.wrapper, focused ? styles.focused : '', error ? styles.hasError : '']
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
style={{ height }}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import React, { useId } from 'react';
|
||||
import styles from './Textarea.module.css';
|
||||
|
||||
export interface TextareaProps
|
||||
extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'id'> {
|
||||
export interface TextareaProps extends Omit<
|
||||
React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
||||
'id'
|
||||
> {
|
||||
label?: string;
|
||||
hint?: string;
|
||||
error?: string;
|
||||
|
||||
Reference in New Issue
Block a user