refresh on all
This commit is contained in:
parent
e881f6ca29
commit
7662ab0a0f
@ -168,6 +168,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
|
|
||||||
void handlePeerInfo(Map<String, dynamic> evt, BuildContext context) {
|
void handlePeerInfo(Map<String, dynamic> evt, BuildContext context) {
|
||||||
dismissLoading();
|
dismissLoading();
|
||||||
|
_pi.version = evt['version'];
|
||||||
_pi.username = evt['username'];
|
_pi.username = evt['username'];
|
||||||
_pi.hostname = evt['hostname'];
|
_pi.hostname = evt['hostname'];
|
||||||
_pi.platform = evt['platform'];
|
_pi.platform = evt['platform'];
|
||||||
@ -620,6 +621,7 @@ class Display {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class PeerInfo {
|
class PeerInfo {
|
||||||
|
String version;
|
||||||
String username;
|
String username;
|
||||||
String hostname;
|
String hostname;
|
||||||
String platform;
|
String platform;
|
||||||
|
@ -721,10 +721,16 @@ void showActions(BuildContext context) {
|
|||||||
context: context,
|
context: context,
|
||||||
position: RelativeRect.fromLTRB(x, y, x, y),
|
position: RelativeRect.fromLTRB(x, y, x, y),
|
||||||
items: [
|
items: [
|
||||||
PopupMenuItem<String>(
|
PopupMenuItem<String>(
|
||||||
child: Text('Insert Ctrl + Alt + Del'), value: 'cad'),
|
child: Text('Insert Ctrl + Alt + Del'), value: 'cad'),
|
||||||
PopupMenuItem<String>(child: Text('Insert Lock'), value: 'lock'),
|
PopupMenuItem<String>(
|
||||||
],
|
child: Text('Insert Lock'), value: 'lock'),
|
||||||
|
] +
|
||||||
|
FFI.ffiModel.pi.version.isEmpty
|
||||||
|
? []
|
||||||
|
: [
|
||||||
|
PopupMenuItem<String>(child: Text('Refresh'), value: 'refresh'),
|
||||||
|
],
|
||||||
elevation: 8,
|
elevation: 8,
|
||||||
);
|
);
|
||||||
if (value == 'cad') {
|
if (value == 'cad') {
|
||||||
@ -733,5 +739,8 @@ void showActions(BuildContext context) {
|
|||||||
if (value == 'lock') {
|
if (value == 'lock') {
|
||||||
FFI.setByName('lock_screen');
|
FFI.setByName('lock_screen');
|
||||||
}
|
}
|
||||||
|
if (value == 'refresh') {
|
||||||
|
FFI.setByName('refresh');
|
||||||
|
}
|
||||||
}();
|
}();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user