An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
- UI display: display_name first (#14358)
RustDesk6c3515588f8e
diff --git a/flutter/lib/common/hbbs/hbbs.dart b/flutter/lib/common/hbbs/hbbs.dartindex aab8ba597..f3b210184 100644--- a/flutter/lib/common/hbbs/hbbs.dart+++ b/flutter/lib/common/hbbs/hbbs.dart@@ -25,6 +25,7 @@ enum UserStatus { kDisabled, kNormal, kUnverified }// Is all the fields of the user needed?class UserPayload {String name = '';+ String displayName = '';String email = '';String note = '';String? verifier;@@ -33,6 +34,7 @@ class UserPayload {UserPayload.fromJson(Map<String, dynamic> json): name = json['name'] ?? '',+ displayName = json['display_name'] ?? '',email = json['email'] ?? '',note = json['note'] ?? '',verifier = json['verifier'],@@ -46,6 +48,7 @@ class UserPayload {Map<String, dynamic> toJson() {final Map<String, dynamic> map = {'name': name,+ 'display_name': displayName,'status': status == UserStatus.kDisabled? 0: status == UserStatus.kUnverified@@ -58,9 +61,14 @@ class UserPayload {Map<String, dynamic> toGroupCacheJson() {final Map<String, dynamic> map = {'name': name,+ 'display_name': displayName,};return map;}++ String get displayNameOrName {+ return displayName.trim().isEmpty ? name : displayName;+ }}class PeerPayload {diff --git a/flutter/lib/common/widgets/my_group.dart b/flutter/lib/common/widgets/my_group.dartindex 6207a7363..74ce34e71 100644--- a/flutter/lib/common/widgets/my_group.dart+++ b/flutter/lib/common/widgets/my_group.dart@@ -158,12 +158,18 @@ class _MyGroupState extends State<MyGroup> {return Obx(() {final userItems = gFFI.groupModel.users.where((p0) {if (searchAccessibleItemNameText.isNotEmpty) {- return p0.name- .toLowerCase()- .contains(searchAccessibleItemNameText.value.toLowerCase());+ final search = searchAccessibleItemNameText.value.toLowerCase();+ return p0.name.toLowerCase().contains(search) ||+ p0.displayNameOrName.toLowerCase().contains(search);}return true;}).toList();+ // Count occurrences of each displayNameOrName to detect duplicates+ final displayNameCount = <String, int>{};+ for (final u in userItems) {+ final dn = u.displayNameOrName;+ displayNameCount[dn] = (displayNameCount[dn] ?? 0) + 1;+ }final deviceGroupItems = gFFI.groupModel.deviceGroups.where((p0) {if (searchAccessibleItemNameText.isNotEmpty) {return p0.name@@ -177,7 +183,8 @@ class _MyGroupState extends State<MyGroup> {itemCount: deviceGroupItems.length + userItems.length,itemBuilder: (context, index) => index < deviceGroupItems.length? _buildDeviceGroupItem(deviceGroupItems[index])- : _buildUserItem(userItems[index - deviceGroupItems.length]));+ : _buildUserItem(userItems[index - deviceGroupItems.length],+ displayNameCount));var maxHeight = max(MediaQuery.of(context).size.height / 6, 100.0);return Obx(() => stateGlobal.isPortrait.isFalse? listView(false)@@ -185,8 +192,14 @@ class _MyGroupState extends State<MyGroup> {});}- Widget _buildUserItem(UserPayload user) {+ Widget _buildUserItem(UserPayload user, Map<String, int> displayNameCount) {final username = user.name;+ final dn = user.displayNameOrName;+ final isDuplicate = (displayNameCount[dn] ?? 0) > 1;+ final displayName =+ isDuplicate && user.displayName.trim().isNotEmpty+ ? '${user.displayName} (@$username)'+ : dn;return InkWell(onTap: () {isSelectedDeviceGroup.value = false;if (selectedAccessibleItemName.value != username) {@@ -222,14 +235,14 @@ class _MyGroupState extends State<MyGroup> {alignment: Alignment.center,child: Center(child: Text(- username.characters.first.toUpperCase(),+ displayName.characters.first.toUpperCase(),style: TextStyle(color: Colors.white),textAlign: TextAlign.center,),),),).marginOnly(right: 4),- if (isMe) Flexible(child: Text(username)),+ if (isMe) Flexible(child: Text(displayName)),if (isMe)Flexible(child: Container(@@ -246,7 +259,7 @@ class _MyGroupState extends State<MyGroup> {),),),- if (!isMe) Expanded(child: Text(username)),+ if (!isMe) Expanded(child: Text(displayName)),],).paddingSymmetric(vertical: 4),),diff --git a/flutter/lib/common/widgets/peers_view.dart b/flutter/lib/common/widgets/peers_view.dartindex d81a095ca..5be5af272 100644--- a/flutter/lib/common/widgets/peers_view.dart+++ b/flutter/lib/common/widgets/peers_view.dart@@ -570,11 +570,14 @@ class MyGroupPeerView extends BasePeersView {static bool filter(Peer peer) {final model = gFFI.groupModel;if (model.searchAccessibleItemNameText.isNotEmpty) {- final text = model.searchAccessibleItemNameText.value;- final searchPeersOfUser = peer.loginName.contains(text) &&- model.users.any((user) => user.name == peer.loginName);- final searchPeersOfDeviceGroup = peer.device_group_name.contains(text) &&- model.deviceGroups.any((g) => g.name == peer.device_group_name);+ final text = model.searchAccessibleItemNameText.value.toLowerCase();+ final searchPeersOfUser = model.users.any((user) =>+ user.name == peer.loginName &&+ (user.name.toLowerCase().contains(text) ||+ user.displayNameOrName.toLowerCase().contains(text)));+ final searchPeersOfDeviceGroup =+ peer.device_group_name.toLowerCase().contains(text) &&+ model.deviceGroups.any((g) => g.name == peer.device_group_name);if (!searchPeersOfUser && !searchPeersOfDeviceGroup) {return false;}diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dartindex b26d909cb..3314d82ab 100644--- a/flutter/lib/desktop/pages/desktop_setting_page.dart+++ b/flutter/lib/desktop/pages/desktop_setting_page.dart@@ -2016,7 +2016,9 @@ class _AccountState extends State<_Account> {Widget accountAction() {return Obx(() => _Button(- gFFI.userModel.userName.value.isEmpty ? 'Login' : 'Logout',+ gFFI.userModel.userName.value.isEmpty+ ? 'Login'+ : '${translate('Logout')} (${gFFI.userModel.accountLabelWithHandle})',() => {gFFI.userModel.userName.value.isEmpty? loginDialog()@@ -2037,6 +2039,10 @@ class _AccountState extends State<_Account> {offstage: gFFI.userModel.userName.value.isEmpty,child: Column(children: [+ if (gFFI.userModel.displayName.value.trim().isNotEmpty &&+ gFFI.userModel.displayName.value.trim() !=+ gFFI.userModel.userName.value.trim())+ text('Display Name', gFFI.userModel.displayName.value.trim()),text('Username', gFFI.userModel.userName.value),// text('Group', gFFI.groupModel.groupName.value),],@@ -2130,7 +2136,9 @@ class _PluginState extends State<_Plugin> {Widget accountAction() {return Obx(() => _Button(- gFFI.userModel.userName.value.isEmpty ? 'Login' : 'Logout',+ gFFI.userModel.userName.value.isEmpty+ ? 'Login'+ : '${translate('Logout')} (${gFFI.userModel.accountLabelWithHandle})',() => {gFFI.userModel.userName.value.isEmpty? loginDialog()diff --git a/flutter/lib/mobile/pages/settings_page.dart b/flutter/lib/mobile/pages/settings_page.dartindex c2e2ef57d..afd3422d7 100644--- a/flutter/lib/mobile/pages/settings_page.dart+++ b/flutter/lib/mobile/pages/settings_page.dart@@ -688,7 +688,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {SettingsTile(title: Obx(() => Text(gFFI.userModel.userName.value.isEmpty? translate('Login')- : '${translate('Logout')} (${gFFI.userModel.userName.value})')),+ : '${translate('Logout')} (${gFFI.userModel.accountLabelWithHandle})')),leading: Icon(Icons.person),onPressed: (context) {if (gFFI.userModel.userName.value.isEmpty) {diff --git a/flutter/lib/models/user_model.dart b/flutter/lib/models/user_model.dartindex 217d74aee..c850c4cf6 100644--- a/flutter/lib/models/user_model.dart+++ b/flutter/lib/models/user_model.dart@@ -16,9 +16,23 @@ bool refreshingUser = false;class UserModel {final RxString userName = ''.obs;+ final RxString displayName = ''.obs;final RxBool isAdmin = false.obs;final RxString networkError = ''.obs;bool get isLogin => userName.isNotEmpty;+ String get displayNameOrUserName =>+ displayName.value.trim().isEmpty ? userName.value : displayName.value;+ String get accountLabelWithHandle {+ final username = userName.value.trim();+ if (username.isEmpty) {+ return '';+ }+ final preferred = displayName.value.trim();+ if (preferred.isEmpty || preferred == username) {+ return username;+ }+ return '$preferred (@$username)';+ }WeakReference<FFI> parent;UserModel(this.parent) {@@ -98,7 +112,8 @@ class UserModel {_updateLocalUserInfo() {final userInfo = getLocalUserInfo();if (userInfo != null) {- userName.value = userInfo['name'];+ userName.value = (userInfo['name'] ?? '').toString();+ displayName.value = (userInfo['display_name'] ?? '').toString();}}@@ -110,10 +125,12 @@ class UserModel {await gFFI.groupModel.reset();}userName.value = '';+ displayName.value = '';}_parseAndUpdateUser(UserPayload user) {userName.value = user.name;+ displayName.value = user.displayName;isAdmin.value = user.isAdmin;bind.mainSetLocalOption(key: 'user_info', value: jsonEncode(user));if (isWeb) {diff --git a/libs/hbb_common b/libs/hbb_commonindex da339dca6..0b60b9ffa 160000--- a/libs/hbb_common+++ b/libs/hbb_common@@ -1 +1 @@-Subproject commit da339dca64ecae3273838c0a1395c7fe2f1a1016+Subproject commit 0b60b9ffa05259f72cd33e79010ef8e15d42b851diff --git a/res/msi/preprocess.py b/res/msi/preprocess.pyindex cb2140d21..c590549f4 100644--- a/res/msi/preprocess.py+++ b/res/msi/preprocess.py@@ -336,7 +336,9 @@ def gen_custom_ARPSYSTEMCOMPONENT_True(args, dist_dir):f'{indent}<RegistryValue Type="integer" Name="Language" Value="[ProductLanguage]" />\n')- estimated_size = get_folder_size(dist_dir)+ # EstimatedSize in uninstall registry must be in KB.+ estimated_size_bytes = get_folder_size(dist_dir)+ estimated_size = max(1, (estimated_size_bytes + 1023) // 1024)lines_new.append(f'{indent}<RegistryValue Type="integer" Name="EstimatedSize" Value="{estimated_size}" />\n')diff --git a/src/client.rs b/src/client.rsindex a7b681ee1..cb4ed3a24 100644--- a/src/client.rs+++ b/src/client.rs@@ -2630,10 +2630,13 @@ impl LoginConfigHandler {display_name =serde_json::from_str::<serde_json::Value>(&LocalConfig::get_option("user_info")).map(|x| {- x.get("name")- .map(|x| x.as_str().unwrap_or_default())+ x.get("display_name")+ .and_then(|x| x.as_str())+ .map(|x| x.trim())+ .filter(|x| !x.is_empty())+ .or_else(|| x.get("name").and_then(|x| x.as_str()))+ .map(|x| x.to_owned()).unwrap_or_default()- .to_owned()}).unwrap_or_default();}diff --git a/src/hbbs_http/account.rs b/src/hbbs_http/account.rsindex 6bdef6f06..6644aee28 100644--- a/src/hbbs_http/account.rs+++ b/src/hbbs_http/account.rs@@ -80,6 +80,8 @@ pub enum UserStatus {pub struct UserPayload {pub name: String,#[serde(default)]+ pub display_name: Option<String>,+ #[serde(default)]pub email: Option<String>,#[serde(default)]pub note: Option<String>,@@ -268,7 +270,12 @@ impl OidcSession {);LocalConfig::set_option("user_info".to_owned(),- serde_json::json!({ "name": auth_body.user.name, "status": auth_body.user.status }).to_string(),+ serde_json::json!({+ "name": auth_body.user.name,+ "display_name": auth_body.user.display_name,+ "status": auth_body.user.status+ })+ .to_string(),);}}diff --git a/src/lang/ar.rs b/src/lang/ar.rsindex 65853847a..fc1f79c38 100644--- a/src/lang/ar.rs+++ b/src/lang/ar.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "متابعة مع {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/be.rs b/src/lang/be.rsindex 0b8492e9c..a7656782d 100644--- a/src/lang/be.rs+++ b/src/lang/be.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Працягнуць з {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/bg.rs b/src/lang/bg.rsindex 986b7b1fb..3036e31b2 100644--- a/src/lang/bg.rs+++ b/src/lang/bg.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Продължи с {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ca.rs b/src/lang/ca.rsindex 3a7d5498e..05a7e7899 100644--- a/src/lang/ca.rs+++ b/src/lang/ca.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Continua amb {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/cn.rs b/src/lang/cn.rsindex 516015390..5cb228a6e 100644--- a/src/lang/cn.rs+++ b/src/lang/cn.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "使用 {} 登录"),+ ("Display Name", "显示名称"),].iter().cloned().collect();}diff --git a/src/lang/cs.rs b/src/lang/cs.rsindex 497af5cf1..944ee4b95 100644--- a/src/lang/cs.rs+++ b/src/lang/cs.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Pokračovat s {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/da.rs b/src/lang/da.rsindex 6505f2bdf..8140fcaec 100644--- a/src/lang/da.rs+++ b/src/lang/da.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Fortsæt med {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/de.rs b/src/lang/de.rsindex 5ada5b270..a518dd3c3 100644--- a/src/lang/de.rs+++ b/src/lang/de.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Bildschirm während ausgehender Sitzungen aktiv halten"),("keep-awake-during-incoming-sessions-label", "Bildschirm während eingehender Sitzungen aktiv halten"),("Continue with {}", "Fortfahren mit {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/el.rs b/src/lang/el.rsindex 1542a8ee1..8b02c3c89 100644--- a/src/lang/el.rs+++ b/src/lang/el.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Συνέχεια με {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/eo.rs b/src/lang/eo.rsindex 303fc45a8..3d6b6924f 100644--- a/src/lang/eo.rs+++ b/src/lang/eo.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", ""),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/es.rs b/src/lang/es.rsindex bceff6a56..8ad0c4cab 100644--- a/src/lang/es.rs+++ b/src/lang/es.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Continuar con {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/et.rs b/src/lang/et.rsindex 4d87490ac..def665ec5 100644--- a/src/lang/et.rs+++ b/src/lang/et.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Jätka koos {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/eu.rs b/src/lang/eu.rsindex ba0979fe7..2454dcb8a 100644--- a/src/lang/eu.rs+++ b/src/lang/eu.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "{} honekin jarraitu"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/fa.rs b/src/lang/fa.rsindex 5fe019444..52be56c81 100644--- a/src/lang/fa.rs+++ b/src/lang/fa.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "ادامه با {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/fi.rs b/src/lang/fi.rsindex 59f25538b..0d9b42ddd 100644--- a/src/lang/fi.rs+++ b/src/lang/fi.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Jatka käyttäen {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/fr.rs b/src/lang/fr.rsindex 9637233aa..1d54448c9 100644--- a/src/lang/fr.rs+++ b/src/lang/fr.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Maintenir l’écran allumé lors des sessions sortantes"),("keep-awake-during-incoming-sessions-label", "Maintenir l’écran allumé lors des sessions entrantes"),("Continue with {}", "Continuer avec {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ge.rs b/src/lang/ge.rsindex ffb9e351d..10b5e7f27 100644--- a/src/lang/ge.rs+++ b/src/lang/ge.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "{}-ით გაგრძელება"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/he.rs b/src/lang/he.rsindex 74b93c155..00999708f 100644--- a/src/lang/he.rs+++ b/src/lang/he.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "המשך עם {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/hr.rs b/src/lang/hr.rsindex 8232b8635..d00fc56b9 100644--- a/src/lang/hr.rs+++ b/src/lang/hr.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Nastavi sa {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/hu.rs b/src/lang/hu.rsindex c9f5453b9..174cdb28b 100644--- a/src/lang/hu.rs+++ b/src/lang/hu.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Képernyő aktív állapotban tartása a kimenő munkamenetek során"),("keep-awake-during-incoming-sessions-label", "Képernyő aktív állapotban tartása a bejövő munkamenetek során"),("Continue with {}", "Folytatás a következővel: {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/id.rs b/src/lang/id.rsindex f7498dd99..f898c8bc4 100644--- a/src/lang/id.rs+++ b/src/lang/id.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Lanjutkan dengan {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/it.rs b/src/lang/it.rsindex eabfac559..28edb0e8a 100644--- a/src/lang/it.rs+++ b/src/lang/it.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Mantieni lo schermo attivo durante le sessioni in uscita"),("keep-awake-during-incoming-sessions-label", "Mantieni lo schermo attivo durante le sessioni in ingresso"),("Continue with {}", "Continua con {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ja.rs b/src/lang/ja.rsindex c89899469..e033de3b3 100644--- a/src/lang/ja.rs+++ b/src/lang/ja.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "{} で続行"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ko.rs b/src/lang/ko.rsindex d860af5ab..1e3d4f9b8 100644--- a/src/lang/ko.rs+++ b/src/lang/ko.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "발신 세션 중 화면 켜짐 유지"),("keep-awake-during-incoming-sessions-label", "수신 세션 중 화면 켜짐 유지"),("Continue with {}", "{}(으)로 계속"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/kz.rs b/src/lang/kz.rsindex eaa0bb34d..c3715672d 100644--- a/src/lang/kz.rs+++ b/src/lang/kz.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", ""),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/lt.rs b/src/lang/lt.rsindex 18080ee77..91c76291a 100644--- a/src/lang/lt.rs+++ b/src/lang/lt.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Tęsti su {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/lv.rs b/src/lang/lv.rsindex 12b90d8f1..0c8ba694e 100644--- a/src/lang/lv.rs+++ b/src/lang/lv.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Turpināt ar {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/nb.rs b/src/lang/nb.rsindex b118a4b7c..9c38fcbb8 100644--- a/src/lang/nb.rs+++ b/src/lang/nb.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Fortsett med {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/nl.rs b/src/lang/nl.rsindex f952a844e..577f7487f 100644--- a/src/lang/nl.rs+++ b/src/lang/nl.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Houd het scherm open tijdens de uitgaande sessies."),("keep-awake-during-incoming-sessions-label", "Houd het scherm open tijdens de inkomende sessies."),("Continue with {}", "Ga verder met {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/pl.rs b/src/lang/pl.rsindex 6d2185e47..000c05921 100644--- a/src/lang/pl.rs+++ b/src/lang/pl.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Utrzymuj urządzenie w stanie aktywnym podczas sesji wychodzących"),("keep-awake-during-incoming-sessions-label", "Utrzymuj urządzenie w stanie aktywnym podczas sesji przychodzących"),("Continue with {}", "Kontynuuj z {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rsindex 6a3e49817..ccbdd574e 100644--- a/src/lang/pt_PT.rs+++ b/src/lang/pt_PT.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", ""),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rsindex e16f7ba61..a7a2f7db6 100644--- a/src/lang/ptbr.rs+++ b/src/lang/ptbr.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Manter tela ativa durante sessões de saída"),("keep-awake-during-incoming-sessions-label", "Manter tela ativa durante sessões de entrada"),("Continue with {}", "Continuar com {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ro.rs b/src/lang/ro.rsindex 9c21617d7..8917b2a46 100644--- a/src/lang/ro.rs+++ b/src/lang/ro.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Continuă cu {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ru.rs b/src/lang/ru.rsindex f4ae05e99..344260d34 100644--- a/src/lang/ru.rs+++ b/src/lang/ru.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Не отключать экран во время исходящих сеансов"),("keep-awake-during-incoming-sessions-label", "Не отключать экран во время входящих сеансов"),("Continue with {}", "Продолжить с {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/sc.rs b/src/lang/sc.rsindex 46c4c582e..2eef86908 100644--- a/src/lang/sc.rs+++ b/src/lang/sc.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Sighi cun {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/sk.rs b/src/lang/sk.rsindex 85cd17594..0b45d7e12 100644--- a/src/lang/sk.rs+++ b/src/lang/sk.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Pokračovať s {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/sl.rs b/src/lang/sl.rsindex 9c7dead43..d8e22a3c4 100755--- a/src/lang/sl.rs+++ b/src/lang/sl.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Nadaljuj z {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/sq.rs b/src/lang/sq.rsindex b4f4fb694..b7b7321ab 100644--- a/src/lang/sq.rs+++ b/src/lang/sq.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Vazhdo me {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/sr.rs b/src/lang/sr.rsindex a12fc3311..46cb14cdd 100644--- a/src/lang/sr.rs+++ b/src/lang/sr.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Nastavi sa {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/sv.rs b/src/lang/sv.rsindex f85e88853..d2d1a3911 100644--- a/src/lang/sv.rs+++ b/src/lang/sv.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Fortsätt med {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/ta.rs b/src/lang/ta.rsindex 4f545f055..7e3ae5cd0 100644--- a/src/lang/ta.rs+++ b/src/lang/ta.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "{} உடன் தொடர்"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/template.rs b/src/lang/template.rsindex c9aec1a3e..b21f64f14 100644--- a/src/lang/template.rs+++ b/src/lang/template.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", ""),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/th.rs b/src/lang/th.rsindex 6d66b44fd..dbfc1096c 100644--- a/src/lang/th.rs+++ b/src/lang/th.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "ทำต่อด้วย {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/tr.rs b/src/lang/tr.rsindex 319b631cd..ac8b3d368 100644--- a/src/lang/tr.rs+++ b/src/lang/tr.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "Giden oturumlar süresince ekranı açık tutun"),("keep-awake-during-incoming-sessions-label", "Gelen oturumlar süresince ekranı açık tutun"),("Continue with {}", "{} ile devam et"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/tw.rs b/src/lang/tw.rsindex b66567e43..0e01fcde5 100644--- a/src/lang/tw.rs+++ b/src/lang/tw.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", "在連出工作階段期間保持螢幕喚醒"),("keep-awake-during-incoming-sessions-label", "在連入工作階段期間保持螢幕喚醒"),("Continue with {}", "使用 {} 登入"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/uk.rs b/src/lang/uk.rsindex bf95a02f7..b49b2e5ae 100644--- a/src/lang/uk.rs+++ b/src/lang/uk.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Продовжити з {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/lang/vi.rs b/src/lang/vi.rsindex 1e64c6234..8f5888509 100644--- a/src/lang/vi.rs+++ b/src/lang/vi.rs@@ -739,5 +739,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("keep-awake-during-outgoing-sessions-label", ""),("keep-awake-during-incoming-sessions-label", ""),("Continue with {}", "Tiếp tục với {}"),+ ("Display Name", ""),].iter().cloned().collect();}diff --git a/src/ui/index.tis b/src/ui/index.tisindex 09aa0c306..d4934ba0b 100644--- a/src/ui/index.tis+++ b/src/ui/index.tis@@ -358,6 +358,22 @@ function getUserName() {return '';}+function getAccountLabelWithHandle() {+ try {+ var user = JSON.parse(handler.get_local_option("user_info"));+ var username = (user.name || '').trim();+ if (!username) {+ return '';+ }+ var displayName = (user.display_name || '').trim();+ if (!displayName || displayName == username) {+ return username;+ }+ return displayName + " (@" + username + ")";+ } catch(e) {}+ return '';+}+// Shared dialog functionsfunction open_custom_server_dialog() {var configOptions = handler.get_options();@@ -493,7 +509,7 @@ class MyIdMenu: Reactor.Component {}function renderPop() {- var username = handler.get_local_option("access_token") ? getUserName() : '';+ var accountLabel = handler.get_local_option("access_token") ? getAccountLabelWithHandle() : '';return <popup><menu.context #config-options>{!disable_settings && <li #enable-keyboard><span>{svg_checkmark}</span>{translate('Enable keyboard/mouse')}</li>}@@ -521,8 +537,8 @@ class MyIdMenu: Reactor.Component {{!disable_settings && <DirectServer />}{!disable_settings && false && handler.using_public_server() && <li #allow-always-relay><span>{svg_checkmark}</span>{translate('Always connect via relay')}</li>}{!disable_change_id && handler.is_ok_change_id() ? <div .separator /> : ""}- {!disable_account && (username ?- <li #logout>{translate('Logout')} ({username})</li> :+ {!disable_account && (accountLabel ?+ <li #logout>{translate('Logout')} ({accountLabel})</li> :<li #login>{translate('Login')}</li>)}{!disable_change_id && !disable_settings && handler.is_ok_change_id() && key_confirmed && connect_status > 0 ? <li #change-id>{translate('Change ID')}</li> : ""}<div .separator />@@ -1430,6 +1446,9 @@ checkConnectStatus();function set_local_user_info(user) {var user_info = {name: user.name};+ if (user.display_name) {+ user_info.display_name = user.display_name;+ }if (user.status) {user_info.status = user.status;}