diff --git a/.gitignore b/.gitignore index dbb1a6e..ed26911 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ C/rpn_function_hybrid.wasm calculator_frontend/public/wasm/*.js calculator_frontend/public/wasm/*.wasm !calculator_frontend/public/wasm/worker.js +!calculator_frontend/public/wasm/worker_function.js # ==== CUDA Build Artifacts ==== cuda/*.o diff --git a/calculator_frontend/app/calculator/components/InputBar.tsx b/calculator_frontend/app/calculator/components/InputBar.tsx index 113c097..c13905d 100644 --- a/calculator_frontend/app/calculator/components/InputBar.tsx +++ b/calculator_frontend/app/calculator/components/InputBar.tsx @@ -7,6 +7,11 @@ interface InputBarProps { onCalculate: () => void; onReset: () => void; onAbort: () => void; + onFileSelected: (file: File) => void; + onClearFile: () => void; + canCalculate: boolean; + fileName?: string; + filePointCount?: number; } export function InputBar({ @@ -15,7 +20,12 @@ export function InputBar({ isCalculating, onCalculate, onReset, - onAbort + onAbort, + onFileSelected, + onClearFile, + canCalculate, + fileName, + filePointCount }: InputBarProps) { return (
@@ -30,11 +40,42 @@ export function InputBar({ className="w-full px-4 py-3 rounded-lg bg-gray-50 dark:bg-[#111113] border border-gray-200 dark:border-[#2a2a2e] text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-600 focus:border-[#0066cc] focus:outline-none focus:ring-1 focus:ring-[#0066cc] font-mono text-lg" onKeyDown={(e) => e.key === 'Enter' && onCalculate()} /> + {fileName && ( +
+ Loaded data: {fileName} + {typeof filePointCount === 'number' && ( + ({filePointCount} points) + )} + +
+ )}
+