mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 08:23:01 +08:00
add hide-username-on-card, https://github.com/rustdesk/rustdesk-server-pro/issues/284#issuecomment-2216521407
This commit is contained in:
parent
d007408061
commit
8a370e640a
@ -22,6 +22,8 @@ enum PeerUiType { grid, tile, list }
|
||||
|
||||
final peerCardUiType = PeerUiType.grid.obs;
|
||||
|
||||
bool? hideUsernameOnCard;
|
||||
|
||||
class _PeerCard extends StatefulWidget {
|
||||
final Peer peer;
|
||||
final PeerTabIndex tab;
|
||||
@ -130,8 +132,11 @@ class _PeerCardState extends State<_PeerCard>
|
||||
|
||||
Widget _buildPeerTile(
|
||||
BuildContext context, Peer peer, Rx<BoxDecoration?>? deco) {
|
||||
final name =
|
||||
'${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
||||
hideUsernameOnCard ??=
|
||||
bind.mainGetLocalOption(key: kHideUsernameOnCard) == 'Y';
|
||||
final name = hideUsernameOnCard == true
|
||||
? peer.hostname
|
||||
: '${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
||||
final greyStyle = TextStyle(
|
||||
fontSize: 11,
|
||||
color: Theme.of(context).textTheme.titleLarge?.color?.withOpacity(0.6));
|
||||
@ -239,8 +244,11 @@ class _PeerCardState extends State<_PeerCard>
|
||||
|
||||
Widget _buildPeerCard(
|
||||
BuildContext context, Peer peer, Rx<BoxDecoration?> deco) {
|
||||
final name =
|
||||
'${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
||||
hideUsernameOnCard ??=
|
||||
bind.mainGetLocalOption(key: kHideUsernameOnCard) == 'Y';
|
||||
final name = hideUsernameOnCard == true
|
||||
? peer.hostname
|
||||
: '${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
||||
final child = Card(
|
||||
color: Colors.transparent,
|
||||
elevation: 0,
|
||||
|
@ -303,6 +303,8 @@ const kRequestIgnoreBatteryOptimizations =
|
||||
const kSystemAlertWindow = "android.permission.SYSTEM_ALERT_WINDOW";
|
||||
const kAndroid13Notification = "android.permission.POST_NOTIFICATIONS";
|
||||
|
||||
const kHideUsernameOnCard = "hide-username-on-card";
|
||||
|
||||
/// Android channel invoke type key
|
||||
class AndroidChannel {
|
||||
static final kStartAction = "start_action";
|
||||
|
@ -2194,6 +2194,7 @@ pub mod keys {
|
||||
"hide-network-settings",
|
||||
"hide-server-settings",
|
||||
"hide-proxy-settings",
|
||||
"hide-username-on-card",
|
||||
];
|
||||
// DEFAULT_SETTINGS, OVERWRITE_SETTINGS
|
||||
pub const KEYS_SETTINGS: &[&str] = &[
|
||||
|
Loading…
Reference in New Issue
Block a user