mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -160,8 +160,22 @@ class ConnectionManagerState extends State<ConnectionManager> {
|
||||
child: label),
|
||||
Obx(() => Offstage(
|
||||
offstage:
|
||||
!(client?.hasUnreadChatMessage.value ?? false),
|
||||
child: Icon(Icons.circle, color: Colors.red, size: 10)))
|
||||
!((client?.unreadChatMessageCount.value ?? 0) > 0),
|
||||
child: Container(
|
||||
width: 16,
|
||||
height: 16,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"${client?.unreadChatMessageCount.value ?? 0}",
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 10)),
|
||||
),
|
||||
).marginOnly(left: 4)))
|
||||
],
|
||||
);
|
||||
},
|
||||
@@ -170,7 +184,9 @@ class ConnectionManagerState extends State<ConnectionManager> {
|
||||
Consumer<ChatModel>(
|
||||
builder: (_, model, child) => model.isShowCMChatPage
|
||||
? Expanded(
|
||||
child: ChatPage(),
|
||||
child: buildRemoteBlock(
|
||||
child: ChatPage(),
|
||||
),
|
||||
flex: (kConnectionManagerWindowSizeOpenChat.width -
|
||||
kConnectionManagerWindowSizeClosedChat
|
||||
.width)
|
||||
|
||||
@@ -295,37 +295,16 @@ class DesktopTab extends StatelessWidget {
|
||||
if (tabType != DesktopTabType.main) {
|
||||
return child;
|
||||
}
|
||||
var block = false.obs;
|
||||
return Obx(() => MouseRegion(
|
||||
onEnter: (_) async {
|
||||
var access_mode = await bind.mainGetOption(key: 'access-mode');
|
||||
var option = option2bool(
|
||||
'allow-remote-config-modification',
|
||||
await bind.mainGetOption(
|
||||
key: 'allow-remote-config-modification'));
|
||||
if (access_mode == 'view' || (access_mode.isEmpty && !option)) {
|
||||
var time0 = DateTime.now().millisecondsSinceEpoch;
|
||||
await bind.mainCheckMouseTime();
|
||||
Timer(const Duration(milliseconds: 120), () async {
|
||||
var d = time0 - await bind.mainGetMouseTime();
|
||||
if (d < 120) {
|
||||
block.value = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onExit: (_) => block.value = false,
|
||||
child: Stack(
|
||||
children: [
|
||||
child,
|
||||
Offstage(
|
||||
offstage: !block.value,
|
||||
child: Container(
|
||||
color: Colors.black.withOpacity(0.5),
|
||||
)),
|
||||
],
|
||||
),
|
||||
));
|
||||
return buildRemoteBlock(
|
||||
child: child,
|
||||
use: () async {
|
||||
var access_mode = await bind.mainGetOption(key: 'access-mode');
|
||||
var option = option2bool(
|
||||
'allow-remote-config-modification',
|
||||
await bind.mainGetOption(
|
||||
key: 'allow-remote-config-modification'));
|
||||
return access_mode == 'view' || (access_mode.isEmpty && !option);
|
||||
});
|
||||
}
|
||||
|
||||
List<Widget> _tabWidgets = [];
|
||||
|
||||
Reference in New Issue
Block a user