Place terminal action in phone chat bar
Keep the Chats header clear at narrow widths by moving the phone terminal entry into the chat action bar and disabling the duplicate floating shortcut. Add focused widget coverage for the single terminal entry and header layout.
This commit is contained in:
@@ -52,8 +52,8 @@ class AppTerminals {
|
||||
|
||||
/// [shell] with the terminal panel, window or page around it, and the
|
||||
/// app's floating [windows] above both.
|
||||
/// [onChat]: the phone shortcut that reopens the terminal shows on the
|
||||
/// Chat tab only.
|
||||
/// [onChat]: whether the phone shortcut that reopens the terminal shows on
|
||||
/// this page. Pages whose own bar carries Terminal pass false.
|
||||
Widget surround(Widget shell, {bool onChat = true, Widget? windows}) =>
|
||||
TerminalSurface(
|
||||
hub: hub,
|
||||
|
||||
@@ -818,7 +818,11 @@ class _PipelinesAppState extends State<PipelinesApp>
|
||||
valueListenable: _attentionCount,
|
||||
builder: (context, count, _) => _terminals.surround(
|
||||
_shellFor(route, count),
|
||||
onChat: route.kind == AppRouteKind.chat,
|
||||
// Every narrow Chat bar carries Terminal itself (the list's top bar
|
||||
// and an open chat's bar, see terminalChatBarAction), so the floating
|
||||
// bubble is off on every route. It otherwise covered the list's
|
||||
// header and duplicated the open chat's Terminal entry.
|
||||
onChat: false,
|
||||
windows: WindowHost(manager: _windows, reservesRail: true),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user