767643d991
Phone and browser notifications that carry an artifact open it full screen in the artifact viewer, with an Open run action and the preview as expanded text; pipelines://artifact deep links route to the viewer.
20 lines
799 B
Dart
20 lines
799 B
Dart
import '../shell/destination.dart';
|
|
import 'app_route.dart';
|
|
|
|
/// The destination that owns [route]. Settings and its sub-pages (Templates,
|
|
/// Schedules) belong to Settings itself, never to Pipelines.
|
|
AppDestination tabForRoute(AppRoute route) => switch (route.kind) {
|
|
AppRouteKind.pipelines => AppDestination.pipelines,
|
|
AppRouteKind.settings ||
|
|
AppRouteKind.templates ||
|
|
AppRouteKind.schedules => AppDestination.settings,
|
|
AppRouteKind.runs => AppDestination.runs,
|
|
AppRouteKind.chat => AppDestination.chat,
|
|
AppRouteKind.search => AppDestination.search,
|
|
AppRouteKind.artifact => AppDestination.runs,
|
|
};
|
|
|
|
/// Remembers navigation without retaining modal actions such as run decisions.
|
|
AppRoute durableTabRoute(AppRoute route) =>
|
|
route.decide ? AppRoute.run(route.runId!) : route;
|