Files
pipelines/app/lib/features/runs/ui/run_detail_actions.dart
T

48 lines
1.3 KiB
Dart

import 'package:flutter/widgets.dart';
import '../../../core/api_gateway.dart';
import '../../artifacts/ui/artifact_gallery_action.dart';
import '../actions/cancel_run_action.dart';
import '../actions/title_action.dart';
import 'run_decision_notice.dart';
/// Native actions on the loaded run, all using the app's one gateway and
/// applying only accepted server detail through the same controller callback.
class RunDetailActions extends StatelessWidget {
const RunDetailActions({
super.key,
required this.run,
required this.gateway,
required this.onRunChanged,
});
final JsonMap run;
final ApiGateway gateway;
final ValueChanged<JsonMap> onRunChanged;
@override
Widget build(BuildContext context) => Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Wrap(
children: [
RunTitleAction(
run: run,
gateway: gateway,
onRunChanged: onRunChanged,
),
CancelRunAction(
run: run,
gateway: gateway,
onRunChanged: onRunChanged,
),
if (showRunArtifactsAction(run))
RunArtifactsButton(run: run, gateway: gateway),
],
),
RunDecisionNotice(run: run, gateway: gateway, onRunChanged: onRunChanged),
],
);
}