mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
Show alias if set, on remote tab
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:flutter/material.dart' hide TabBarTheme;
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/main.dart';
|
||||
import 'package:flutter_hbb/common/shared_state.dart';
|
||||
import 'package:flutter_hbb/models/platform_model.dart';
|
||||
import 'package:flutter_hbb/models/state_model.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -252,6 +253,15 @@ class DesktopTab extends StatelessWidget {
|
||||
tabType == DesktopTabType.main || tabType == DesktopTabType.cm;
|
||||
}
|
||||
|
||||
static RxString labelGetterAlias(String peerId) {
|
||||
final opt = 'alias';
|
||||
PeerStringOption.init(peerId, opt, () {
|
||||
final alias = bind.mainGetPeerOptionSync(id: peerId, key: opt);
|
||||
return alias.isEmpty ? peerId : alias;
|
||||
});
|
||||
return PeerStringOption.find(peerId, opt);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(children: [
|
||||
|
||||
Reference in New Issue
Block a user