App: chat colours, Ctrl+1-9 opens the Nth list item, starred chats alphabetical
A chat's colour is picked from its row menu (Colour...), a long-press or the chat information sheet. The list shows it as a leading bar, a faint row tint and a coloured avatar; the open chat shows a faint wash under its top bar. Shades are Cupertino's dynamic system colours and Material swatches tuned per brightness. Changes from other devices apply live. Ctrl+1...Ctrl+9 open the Nth item of the open tab's list (chats, runs, pipelines) in on-screen order, also while typing. Starred chats are sorted by name, case-insensitively, as one alphabetical group.
This commit is contained in:
@@ -3,6 +3,7 @@ import '../../../ui/layout/app_list_row.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../shell/shell_list_shortcuts.dart';
|
||||
import '../../../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../../../ui/status/run_status_icon.dart';
|
||||
import '../pipeline_format.dart';
|
||||
@@ -53,7 +54,18 @@ class PipelineListPanel extends StatelessWidget {
|
||||
child: PipelineProgress(label: 'Refreshing pipelines'),
|
||||
),
|
||||
];
|
||||
return _content(context, header);
|
||||
// Ctrl+1…Ctrl+9 open the Nth pipeline shown, filtered and sorted.
|
||||
return ShellListShortcut(
|
||||
onOpenIndex: (index) {
|
||||
if (!controller.pipelinesLoaded) return false;
|
||||
final items = controller.visiblePipelines;
|
||||
if (index >= items.length) return false;
|
||||
final pipeline = items[index];
|
||||
controller.openPipeline(pipeline.id, version: pipeline.version);
|
||||
return true;
|
||||
},
|
||||
child: _content(context, header),
|
||||
);
|
||||
}
|
||||
|
||||
/// A state without rows: the controls stay at the top, below the bar.
|
||||
|
||||
Reference in New Issue
Block a user