Files
WebUITest-RealProjecT/FrontEnd/types.ts
arDTDev 3c4c8ded53 feat: Add detailed recipe preview in list items
- Extended Recipe interface with additional fields (Motion, Barcode types, flags)
- Recipe list items now show detailed information when selected:
  - Motion model name in green
  - Barcode type badges (1D/QR/DM) with color coding
  - Feature flags (No Cam, No Print, Auto Out) as compact badges
  - Last modified date at bottom
- Selected recipes load full data and update preview automatically
- Enhanced visual hierarchy with borders, spacing, and color coding

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 21:28:22 +09:00

87 lines
2.1 KiB
TypeScript

export enum SystemState {
IDLE = 'IDLE',
RUNNING = 'RUNNING',
ERROR = 'ERROR',
PAUSED = 'PAUSED',
}
export interface AxisPosition {
id: string;
name: string;
axis: 'X' | 'Y' | 'Z';
value: number;
speed: number;
acc: number;
dec: number;
}
export interface Recipe {
id: string;
name: string;
lastModified: string;
Motion?: string;
BCD_1D?: boolean;
BCD_QR?: boolean;
BCD_DM?: boolean;
DisableCamera?: boolean;
DisablePrinter?: boolean;
AutoOutConveyor?: number;
[key: string]: any;
}
export interface IOPoint {
id: number;
name: string;
type: 'input' | 'output';
state: boolean;
}
export interface LogEntry {
id: number;
timestamp: string;
message: string;
type: 'info' | 'warning' | 'error';
}
export interface RobotTarget {
x: number;
y: number;
z: number;
}
// WebView2 Native Bridge Types
export interface ConfigItem {
Key: string;
Value: string;
Group: string;
Type: 'String' | 'Number' | 'Boolean';
Description: string;
}
declare global {
interface Window {
chrome?: {
webview?: {
hostObjects: {
machine: {
MoveAxis(axis: string, value: number): Promise<void>;
SetIO(id: number, isInput: boolean, state: boolean): Promise<void>;
SystemControl(command: string): Promise<void>;
SelectRecipe(recipeId: string): Promise<string>;
CopyRecipe(recipeId: string, newName: string): Promise<string>;
DeleteRecipe(recipeId: string): Promise<string>;
GetConfig(): Promise<string>;
GetIOList(): Promise<string>;
GetRecipeList(): Promise<string>;
GetRecipe(recipeTitle: string): Promise<string>;
SaveRecipe(recipeTitle: string, recipeData: string): Promise<string>;
SaveConfig(configJson: string): Promise<void>;
}
};
addEventListener(type: string, listener: (event: any) => void): void;
removeEventListener(type: string, listener: (event: any) => void): void;
postMessage(message: any): void;
}
}
}
}