wip
This commit is contained in:
@@ -4,7 +4,7 @@ type LoginStatus = 'idle' | 'waiting' | 'success' | 'error';
|
||||
|
||||
interface LoginPromptProps {
|
||||
authState: string;
|
||||
errorMessage?: string;
|
||||
errorMessage: string | undefined;
|
||||
onLogin: () => void;
|
||||
onRetry: () => void;
|
||||
loginStatus?: LoginStatus;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import type { HostedSessionConfig } from '../../../../packages/domain/entities/HostedSessionConfig';
|
||||
import type { HostedSessionConfig } from '../../../../packages/automation/domain/types/HostedSessionConfig';
|
||||
|
||||
interface SessionCreationFormProps {
|
||||
onSubmit: (config: HostedSessionConfig) => void;
|
||||
@@ -112,7 +112,14 @@ export function SessionCreationForm({ onSubmit, disabled }: SessionCreationFormP
|
||||
<label style={labelStyle}>Weather Type</label>
|
||||
<select
|
||||
value={config.weatherType}
|
||||
onChange={(e) => setConfig({ ...config, weatherType: e.target.value as any })}
|
||||
onChange={(e) =>
|
||||
setConfig(prev =>
|
||||
({
|
||||
...prev,
|
||||
weatherType: e.target.value as HostedSessionConfig['weatherType'],
|
||||
} as HostedSessionConfig)
|
||||
)
|
||||
}
|
||||
style={inputStyle}
|
||||
disabled={disabled}
|
||||
>
|
||||
@@ -125,7 +132,14 @@ export function SessionCreationForm({ onSubmit, disabled }: SessionCreationFormP
|
||||
<label style={labelStyle}>Time of Day</label>
|
||||
<select
|
||||
value={config.timeOfDay}
|
||||
onChange={(e) => setConfig({ ...config, timeOfDay: e.target.value as any })}
|
||||
onChange={(e) =>
|
||||
setConfig(prev =>
|
||||
({
|
||||
...prev,
|
||||
timeOfDay: e.target.value as HostedSessionConfig['timeOfDay'],
|
||||
} as HostedSessionConfig)
|
||||
)
|
||||
}
|
||||
style={inputStyle}
|
||||
disabled={disabled}
|
||||
>
|
||||
|
||||
@@ -73,8 +73,8 @@ export function SessionProgressMonitor({ sessionId, progress, isRunning }: Sessi
|
||||
(async () => {
|
||||
try {
|
||||
// Use electronAPI overlayActionRequest to obtain ack
|
||||
if ((window as any).electronAPI?.overlayActionRequest) {
|
||||
const ack = await (window as any).electronAPI.overlayActionRequest(action);
|
||||
if (window.electronAPI?.overlayActionRequest) {
|
||||
const ack = await window.electronAPI.overlayActionRequest(action);
|
||||
if (!mounted) return;
|
||||
setAckStatusByStep(prev => ({ ...prev, [currentStep]: ack.status }));
|
||||
} else {
|
||||
@@ -91,8 +91,8 @@ export function SessionProgressMonitor({ sessionId, progress, isRunning }: Sessi
|
||||
|
||||
// Subscribe to automation events for optional live updates
|
||||
useEffect(() => {
|
||||
if ((window as any).electronAPI?.onAutomationEvent) {
|
||||
const off = (window as any).electronAPI.onAutomationEvent((ev: any) => {
|
||||
if (window.electronAPI?.onAutomationEvent) {
|
||||
const off = window.electronAPI.onAutomationEvent((ev) => {
|
||||
if (ev && ev.payload && ev.payload.actionId && ev.type) {
|
||||
setAutomationEventMsg(`${ev.type} ${ev.payload.actionId}`);
|
||||
} else if (ev && ev.type) {
|
||||
|
||||
Reference in New Issue
Block a user