Files
pipelines/app/lib/shell/destination.dart
T
alan a1c4c1c402 feat(app): icon-only tab bars, Settings from the Pipelines bar, main bar bottom right with detail bars above it
Settings leaves the tab bar (Pipelines, Runs, Chat, Search) and opens as a
page from a gear in the Pipelines bar, keeping /settings, its keys and a Back
to Pipelines (also the system Back). Every floating tab bar shows icons only,
named for assistive technology. On wide windows the shell's tab bar stays at
the bottom right; a split detail learns its height plus a 12px gap, so its
tabs or the chat composer float above it, and pages the detail opens (the
stage page) stay in its pane through its own navigator.
2026-10-31 14:57:56 +00:00

52 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
enum AppDestination { pipelines, runs, chat, search, settings }
/// The destinations the shell's tab bar offers, in order. Settings is a
/// destination the shell can show (its route is `/settings`), but it opens
/// as a page from the Pipelines bar's gear instead of being a tab.
const List<AppDestination> shellTabDestinations = [
AppDestination.pipelines,
AppDestination.runs,
AppDestination.chat,
AppDestination.search,
];
/// The tab that owns [destination] in the tab bar: itself, or Pipelines for
/// Settings (reached from the Pipelines bar).
AppDestination shellTabFor(AppDestination destination) =>
shellTabDestinations.contains(destination)
? destination
: AppDestination.pipelines;
({String label, IconData icon, IconData cupertinoIcon}) destinationDetails(
AppDestination value,
) => switch (value) {
AppDestination.pipelines => (
label: 'Pipelines',
icon: Icons.account_tree_outlined,
cupertinoIcon: CupertinoIcons.arrow_branch,
),
AppDestination.runs => (
label: 'Runs',
icon: Icons.play_circle_outline,
cupertinoIcon: CupertinoIcons.play_circle,
),
AppDestination.chat => (
label: 'Chat',
icon: Icons.chat_bubble_outline,
cupertinoIcon: CupertinoIcons.chat_bubble_2,
),
AppDestination.search => (
label: 'Search',
icon: Icons.search,
cupertinoIcon: CupertinoIcons.search,
),
AppDestination.settings => (
label: 'Settings',
icon: Icons.settings_outlined,
cupertinoIcon: CupertinoIcons.gear,
),
};