Mobile. Share Screen. Clean up
This commit is contained in:
parent
2a5d379c60
commit
7db1440191
@ -242,7 +242,6 @@ class ServerInfo extends StatelessWidget {
|
|||||||
return PaddingCard(
|
return PaddingCard(
|
||||||
title: translate('Your Device'),
|
title: translate('Your Device'),
|
||||||
child: Column(
|
child: Column(
|
||||||
// mainAxisSize: MainAxisSize.min,
|
|
||||||
// ID
|
// ID
|
||||||
children: [
|
children: [
|
||||||
Row(children: [
|
Row(children: [
|
||||||
@ -384,9 +383,7 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
titleIcon: client.isFileTransfer
|
titleIcon: client.isFileTransfer
|
||||||
? Icon(Icons.folder_outlined)
|
? Icon(Icons.folder_outlined)
|
||||||
: Icon(Icons.mobile_screen_share),
|
: Icon(Icons.mobile_screen_share),
|
||||||
child: Column(
|
child: Column(children: [
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -397,10 +394,8 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
? const SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: IconButton(
|
: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
gFFI.chatModel
|
gFFI.chatModel.changeCurrentID(client.id);
|
||||||
.changeCurrentID(client.id);
|
final bar = navigationBarKey.currentWidget;
|
||||||
final bar =
|
|
||||||
navigationBarKey.currentWidget;
|
|
||||||
if (bar != null) {
|
if (bar != null) {
|
||||||
bar as BottomNavigationBar;
|
bar as BottomNavigationBar;
|
||||||
bar.onTap!(1);
|
bar.onTap!(1);
|
||||||
@ -416,23 +411,19 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
).marginOnly(bottom: 5),
|
).marginOnly(bottom: 5),
|
||||||
client.authorized
|
client.authorized
|
||||||
? Row(
|
? Container(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
alignment: Alignment.centerRight,
|
||||||
children: [
|
child: ElevatedButton.icon(
|
||||||
ElevatedButton.icon(
|
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
MaterialStatePropertyAll(
|
MaterialStatePropertyAll(Colors.red)),
|
||||||
Colors.red)),
|
|
||||||
icon: const Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
bind.cmCloseConnection(
|
bind.cmCloseConnection(connId: client.id);
|
||||||
connId: client.id);
|
|
||||||
gFFI.invokeMethod(
|
gFFI.invokeMethod(
|
||||||
"cancel_notification", client.id);
|
"cancel_notification", client.id);
|
||||||
},
|
},
|
||||||
label: Text(translate("Disconnect")))
|
label: Text(translate("Disconnect"))))
|
||||||
])
|
|
||||||
: Row(
|
: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
@ -446,8 +437,7 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
icon: const Icon(Icons.check),
|
icon: const Icon(Icons.check),
|
||||||
label: Text(translate("Accept")),
|
label: Text(translate("Accept")),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
serverModel.sendLoginResponse(
|
serverModel.sendLoginResponse(client, true);
|
||||||
client, true);
|
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
])))
|
])))
|
||||||
@ -473,17 +463,12 @@ class PaddingCard extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.fromLTRB(0, 5, 0, 8),
|
padding: const EdgeInsets.fromLTRB(0, 5, 0, 8),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
titleIcon != null
|
titleIcon?.marginOnly(right: 10) ?? const SizedBox.shrink(),
|
||||||
? Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 10),
|
|
||||||
child: titleIcon)
|
|
||||||
: const SizedBox.shrink(),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(title!,
|
child: Text(title!,
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.titleLarge
|
.titleLarge
|
||||||
// @todo once the font weight is defined in theme, remove it here to be equal insted of individual
|
|
||||||
?.merge(TextStyle(fontWeight: FontWeight.bold))),
|
?.merge(TextStyle(fontWeight: FontWeight.bold))),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -498,9 +483,8 @@ class PaddingCard extends StatelessWidget {
|
|||||||
margin: const EdgeInsets.fromLTRB(12.0, 10.0, 12.0, 0),
|
margin: const EdgeInsets.fromLTRB(12.0, 10.0, 12.0, 0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.symmetric(vertical: 15.0, horizontal: 30.0),
|
const EdgeInsets.symmetric(vertical: 15.0, horizontal: 20.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: children,
|
children: children,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -516,7 +500,7 @@ class ClientInfo extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
child: Column(children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -533,7 +517,6 @@ class ClientInfo extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Text(client.name, style: const TextStyle(fontSize: 18)),
|
Text(client.name, style: const TextStyle(fontSize: 18)),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user