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;
|
final peerCardUiType = PeerUiType.grid.obs;
|
||||||
|
|
||||||
|
bool? hideUsernameOnCard;
|
||||||
|
|
||||||
class _PeerCard extends StatefulWidget {
|
class _PeerCard extends StatefulWidget {
|
||||||
final Peer peer;
|
final Peer peer;
|
||||||
final PeerTabIndex tab;
|
final PeerTabIndex tab;
|
||||||
@ -130,8 +132,11 @@ class _PeerCardState extends State<_PeerCard>
|
|||||||
|
|
||||||
Widget _buildPeerTile(
|
Widget _buildPeerTile(
|
||||||
BuildContext context, Peer peer, Rx<BoxDecoration?>? deco) {
|
BuildContext context, Peer peer, Rx<BoxDecoration?>? deco) {
|
||||||
final name =
|
hideUsernameOnCard ??=
|
||||||
'${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
bind.mainGetLocalOption(key: kHideUsernameOnCard) == 'Y';
|
||||||
|
final name = hideUsernameOnCard == true
|
||||||
|
? peer.hostname
|
||||||
|
: '${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
||||||
final greyStyle = TextStyle(
|
final greyStyle = TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
color: Theme.of(context).textTheme.titleLarge?.color?.withOpacity(0.6));
|
color: Theme.of(context).textTheme.titleLarge?.color?.withOpacity(0.6));
|
||||||
@ -239,8 +244,11 @@ class _PeerCardState extends State<_PeerCard>
|
|||||||
|
|
||||||
Widget _buildPeerCard(
|
Widget _buildPeerCard(
|
||||||
BuildContext context, Peer peer, Rx<BoxDecoration?> deco) {
|
BuildContext context, Peer peer, Rx<BoxDecoration?> deco) {
|
||||||
final name =
|
hideUsernameOnCard ??=
|
||||||
'${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
bind.mainGetLocalOption(key: kHideUsernameOnCard) == 'Y';
|
||||||
|
final name = hideUsernameOnCard == true
|
||||||
|
? peer.hostname
|
||||||
|
: '${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
|
||||||
final child = Card(
|
final child = Card(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
@ -303,6 +303,8 @@ const kRequestIgnoreBatteryOptimizations =
|
|||||||
const kSystemAlertWindow = "android.permission.SYSTEM_ALERT_WINDOW";
|
const kSystemAlertWindow = "android.permission.SYSTEM_ALERT_WINDOW";
|
||||||
const kAndroid13Notification = "android.permission.POST_NOTIFICATIONS";
|
const kAndroid13Notification = "android.permission.POST_NOTIFICATIONS";
|
||||||
|
|
||||||
|
const kHideUsernameOnCard = "hide-username-on-card";
|
||||||
|
|
||||||
/// Android channel invoke type key
|
/// Android channel invoke type key
|
||||||
class AndroidChannel {
|
class AndroidChannel {
|
||||||
static final kStartAction = "start_action";
|
static final kStartAction = "start_action";
|
||||||
|
@ -2194,6 +2194,7 @@ pub mod keys {
|
|||||||
"hide-network-settings",
|
"hide-network-settings",
|
||||||
"hide-server-settings",
|
"hide-server-settings",
|
||||||
"hide-proxy-settings",
|
"hide-proxy-settings",
|
||||||
|
"hide-username-on-card",
|
||||||
];
|
];
|
||||||
// DEFAULT_SETTINGS, OVERWRITE_SETTINGS
|
// DEFAULT_SETTINGS, OVERWRITE_SETTINGS
|
||||||
pub const KEYS_SETTINGS: &[&str] = &[
|
pub const KEYS_SETTINGS: &[&str] = &[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user