feat: add frontend app, improve static file serving with lazy loading and root redirect

This commit is contained in:
2026-07-20 21:03:48 +03:00
parent 799e939037
commit d1e96d35aa
27 changed files with 2053 additions and 14 deletions
+49
View File
@@ -0,0 +1,49 @@
import 'package:flutter/material.dart';
import '../api/models.dart';
class PipelineCard extends StatelessWidget {
final Pipeline pipeline;
final VoidCallback onTap;
final VoidCallback onDelete;
const PipelineCard({
super.key,
required this.pipeline,
required this.onTap,
required this.onDelete,
});
@override
Widget build(BuildContext context) {
return Card(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
child: ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
leading: const Icon(Icons.api, size: 32),
title: Text(
pipeline.name,
style: const TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'${pipeline.prompts.length} prompt${pipeline.prompts.length != 1 ? 's' : ''}',
),
if (pipeline.workingDir.isNotEmpty)
Text(
'📁 ${pipeline.workingDir}',
style: const TextStyle(fontSize: 12, color: Colors.grey),
),
],
),
trailing: IconButton(
icon: const Icon(Icons.delete_outline, color: Colors.red),
onPressed: onDelete,
tooltip: 'Delete',
),
onTap: onTap,
),
);
}
}