feat(ui): show alias instead of peerId in terminal tab label (#13332)

This commit is contained in:
alonginwind
2025-10-29 16:11:20 +08:00
committed by GitHub
parent e3fcc6cce3
commit d4410e78e2

View File

@@ -61,9 +61,11 @@ class _TerminalTabPageState extends State<TerminalTabPage> {
String? connToken,
}) {
final tabKey = '${peerId}_$terminalId';
final alias = bind.mainGetPeerOptionSync(id: peerId, key: 'alias');
final tabLabel = alias.isNotEmpty ? '$alias #$terminalId' : '$peerId #$terminalId';
return TabInfo(
key: tabKey,
label: '$peerId #$terminalId',
label: tabLabel,
selectedIcon: selectedIcon,
unselectedIcon: unselectedIcon,
onTabCloseButton: () async {