Mobile. Share Screen. Connection card button align right
This commit is contained in:
parent
772ce658cf
commit
90cc95b1d0
@ -349,65 +349,72 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
? Icon(Icons.folder_outlined)
|
? Icon(Icons.folder_outlined)
|
||||||
: Icon(Icons.mobile_screen_share),
|
: Icon(Icons.mobile_screen_share),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: ClientInfo(client)),
|
Expanded(child: ClientInfo(client)),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: -1,
|
flex: -1,
|
||||||
child: client.isFileTransfer || !client.authorized
|
child: client.isFileTransfer || !client.authorized
|
||||||
? const SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: IconButton(
|
: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
gFFI.chatModel.changeCurrentID(client.id);
|
gFFI.chatModel
|
||||||
final bar =
|
.changeCurrentID(client.id);
|
||||||
navigationBarKey.currentWidget;
|
final bar =
|
||||||
if (bar != null) {
|
navigationBarKey.currentWidget;
|
||||||
bar as BottomNavigationBar;
|
if (bar != null) {
|
||||||
bar.onTap!(1);
|
bar as BottomNavigationBar;
|
||||||
}
|
bar.onTap!(1);
|
||||||
},
|
}
|
||||||
icon: const Icon(Icons.chat)))
|
},
|
||||||
],
|
icon: const Icon(Icons.chat)))
|
||||||
),
|
],
|
||||||
client.authorized
|
),
|
||||||
? const SizedBox.shrink()
|
client.authorized
|
||||||
: Text(
|
? const SizedBox.shrink()
|
||||||
translate("android_new_connection_tip"),
|
: Text(
|
||||||
style: Theme.of(globalKey.currentContext!)
|
translate("android_new_connection_tip"),
|
||||||
.textTheme
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
.bodyMedium,
|
).marginOnly(bottom: 5),
|
||||||
),
|
client.authorized
|
||||||
client.authorized
|
? Row(
|
||||||
? ElevatedButton.icon(
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
style: ButtonStyle(
|
children: [
|
||||||
backgroundColor:
|
ElevatedButton.icon(
|
||||||
MaterialStatePropertyAll(Colors.red)),
|
style: ButtonStyle(
|
||||||
icon: const Icon(Icons.close),
|
backgroundColor:
|
||||||
onPressed: () {
|
MaterialStatePropertyAll(
|
||||||
bind.cmCloseConnection(connId: client.id);
|
Colors.red)),
|
||||||
gFFI.invokeMethod(
|
icon: const Icon(Icons.close),
|
||||||
"cancel_notification", client.id);
|
onPressed: () {
|
||||||
},
|
bind.cmCloseConnection(
|
||||||
label: Text(translate("Disconnect")))
|
connId: client.id);
|
||||||
: Row(children: [
|
gFFI.invokeMethod(
|
||||||
TextButton(
|
"cancel_notification", client.id);
|
||||||
child: Text(translate("Dismiss")),
|
},
|
||||||
onPressed: () {
|
label: Text(translate("Disconnect")))
|
||||||
serverModel.sendLoginResponse(client, false);
|
])
|
||||||
}),
|
: Row(
|
||||||
const SizedBox(width: 20),
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
ElevatedButton.icon(
|
children: [
|
||||||
icon: const Icon(Icons.check),
|
TextButton(
|
||||||
label: Text(translate("Accept")),
|
child: Text(translate("Dismiss")),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
serverModel.sendLoginResponse(client, true);
|
serverModel.sendLoginResponse(
|
||||||
}),
|
client, false);
|
||||||
]),
|
}).marginOnly(right: 15),
|
||||||
],
|
ElevatedButton.icon(
|
||||||
)))
|
icon: const Icon(Icons.check),
|
||||||
|
label: Text(translate("Accept")),
|
||||||
|
onPressed: () {
|
||||||
|
serverModel.sendLoginResponse(
|
||||||
|
client, true);
|
||||||
|
}),
|
||||||
|
]),
|
||||||
|
])))
|
||||||
.toList());
|
.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user