Fixed some UI things and nightly

This commit is contained in:
Alessandro Autiero
2022-09-22 21:53:47 +02:00
parent c3a2456e5c
commit 2355b5eecd
20 changed files with 234 additions and 173 deletions

View File

@@ -11,17 +11,25 @@ class PortInput extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Obx(() => SmartInput(
return Obx(() => Tooltip(
message: _serverController.embedded.value
? "The remote lawin port cannot be set when running on embedded"
: "The remote port of the lawin server to use for authentication",
child: _buildInput(context)));
}
SmartInput _buildInput(BuildContext context) {
return SmartInput(
label: "Port",
placeholder: "Type the host port",
controller: _serverController.port,
enabled: !_serverController.embedded.value,
onTap: () => _serverController.embedded.value
? showSnackbar(
context,
const Snackbar(
content: Text("The port is locked when embedded is on")))
context,
const Snackbar(
content: Text("The port is locked when embedded is on")))
: {},
));
);
}
}