mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Compare commits
10 Commits
fix-bugs-c
...
SP-1683-FE
Author | SHA1 | Date | |
---|---|---|---|
d10df2ffb8 | |||
5b3152e833 | |||
c1d3296b59 | |||
b3069ab749 | |||
8d408867bb | |||
13360fe6f3 | |||
3e5b501167 | |||
4d9f08af31 | |||
28aa3bc406 | |||
51ad74b2be |
@ -38,7 +38,7 @@ abstract final class EnergyManagementChartsHelper {
|
||||
sideTitles: SideTitles(
|
||||
showTitles: true,
|
||||
maxIncluded: false,
|
||||
minIncluded: true,
|
||||
minIncluded: false,
|
||||
interval: leftTitlesInterval,
|
||||
reservedSize: 110,
|
||||
getTitlesWidget: (value, meta) => Padding(
|
||||
|
@ -78,7 +78,7 @@ class CustomWebTextField extends StatelessWidget {
|
||||
controller: controller,
|
||||
style: const TextStyle(color: Colors.black),
|
||||
decoration: textBoxDecoration()!.copyWith(
|
||||
errorStyle: const TextStyle(height: 0),
|
||||
errorStyle: const TextStyle(height: 0.01),
|
||||
hintStyle: context.textTheme.titleSmall!
|
||||
.copyWith(color: Colors.grey, fontSize: 12),
|
||||
hintText: hintText ?? 'Please enter'),
|
||||
|
@ -40,7 +40,7 @@ class HomeCard extends StatelessWidget {
|
||||
child: Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontSize: 30,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
|
@ -97,7 +97,7 @@ class _HomeWebPageState extends State<HomeWebPage> {
|
||||
itemCount: homeBloc.homeItems.length,
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3, // Adjust as needed.
|
||||
crossAxisCount: 4, // Adjust as needed.
|
||||
crossAxisSpacing: 20.0,
|
||||
mainAxisSpacing: 20.0,
|
||||
childAspectRatio: 1.5,
|
||||
|
@ -118,6 +118,7 @@ class DeviceDialogHelper {
|
||||
uniqueCustomId: data['uniqueCustomId'],
|
||||
deviceSelectedFunctions: deviceSelectedFunctions,
|
||||
device: data['device'],
|
||||
dialogType: dialogType,
|
||||
);
|
||||
case 'NCPS':
|
||||
return FlushPresenceSensor.showFlushFunctionsDialog(
|
||||
|
@ -65,7 +65,9 @@ class ACHelper {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('AC Functions'),
|
||||
DialogHeader(dialogType == 'THEN'
|
||||
? 'AC Functions'
|
||||
: 'AC Conditions'),
|
||||
Expanded(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
@ -96,7 +96,9 @@ class _WallPresenceSensorState extends State<FlushPresenceSensor> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('Presence Sensor Condition'),
|
||||
DialogHeader(widget.dialogType == 'THEN'
|
||||
? 'Presence Sensor Functions'
|
||||
: 'Presence Sensor Condition'),
|
||||
Expanded(child: _buildMainContent(context, state)),
|
||||
_buildDialogFooter(context, state),
|
||||
],
|
||||
|
@ -16,9 +16,10 @@ class GatewayDialog extends StatefulWidget {
|
||||
required this.functions,
|
||||
required this.deviceSelectedFunctions,
|
||||
required this.device,
|
||||
required this.dialogType,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final String dialogType;
|
||||
final String? uniqueCustomId;
|
||||
final List<DeviceFunction> functions;
|
||||
final List<DeviceFunctionData> deviceSelectedFunctions;
|
||||
@ -55,7 +56,9 @@ class _GatewayDialogState extends State<GatewayDialog> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('Gateway Conditions'),
|
||||
DialogHeader(widget.dialogType == 'THEN'
|
||||
? 'Gateway Functions'
|
||||
: 'Gateway Conditions'),
|
||||
Expanded(child: _buildMainContent(context, state)),
|
||||
_buildDialogFooter(context, state),
|
||||
],
|
||||
|
@ -14,6 +14,7 @@ abstract final class GatewayHelper {
|
||||
required String? uniqueCustomId,
|
||||
required List<DeviceFunctionData> deviceSelectedFunctions,
|
||||
required AllDevicesModel? device,
|
||||
required String dialogType,
|
||||
}) async {
|
||||
return showDialog(
|
||||
context: context,
|
||||
@ -27,6 +28,7 @@ abstract final class GatewayHelper {
|
||||
functions: functions,
|
||||
deviceSelectedFunctions: deviceSelectedFunctions,
|
||||
device: device,
|
||||
dialogType:dialogType,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -59,7 +59,9 @@ class OneGangSwitchHelper {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('1 Gang Light Switch Condition'),
|
||||
DialogHeader(dialogType == 'THEN'
|
||||
? '1 Gang Light Switch Functions'
|
||||
: '1 Gang Light Switch Condition'),
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
|
@ -98,7 +98,9 @@ class _EnergyClampDialogState extends State<EnergyClampDialog> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('Energy Clamp Conditions'),
|
||||
DialogHeader(widget.dialogType == 'THEN'
|
||||
? 'Energy Clamp Functions'
|
||||
: 'Energy Clamp Conditions'),
|
||||
Expanded(
|
||||
child: Visibility(
|
||||
visible: _functions.isNotEmpty,
|
||||
|
@ -58,7 +58,9 @@ class ThreeGangSwitchHelper {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('3 Gangs Light Switch Condition'),
|
||||
DialogHeader(dialogType == 'THEN'
|
||||
? '3 Gangs Light Switch Functions'
|
||||
: '3 Gangs Light Switch Condition'),
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
|
@ -59,7 +59,9 @@ class TwoGangSwitchHelper {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('2 Gangs Light Switch Condition'),
|
||||
DialogHeader(dialogType == 'THEN'
|
||||
? '2 Gangs Light Switch Functions'
|
||||
: '2 Gangs Light Switch Condition'),
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
|
@ -63,7 +63,8 @@ class _WallPresenceSensorState extends State<WallPresenceSensor> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_wpsFunctions = widget.functions.whereType<WpsFunctions>().where((function) {
|
||||
_wpsFunctions =
|
||||
widget.functions.whereType<WpsFunctions>().where((function) {
|
||||
if (widget.dialogType == 'THEN') {
|
||||
return function.type == 'THEN' || function.type == 'BOTH';
|
||||
}
|
||||
@ -97,7 +98,9 @@ class _WallPresenceSensorState extends State<WallPresenceSensor> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('Presence Sensor Condition'),
|
||||
DialogHeader(widget.dialogType == 'THEN'
|
||||
? 'Presence Sensor Functions'
|
||||
: 'Presence Sensor Condition'),
|
||||
Expanded(child: _buildMainContent(context, state)),
|
||||
_buildDialogFooter(context, state),
|
||||
],
|
||||
|
@ -93,7 +93,9 @@ class _WaterHeaterDialogRoutinesState extends State<WaterHeaterDialogRoutines> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const DialogHeader('Water Heater Condition'),
|
||||
DialogHeader(widget.dialogType == 'THEN'
|
||||
? 'Water Heater Funtions'
|
||||
: 'Water Heater Condition'),
|
||||
Expanded(child: _buildMainContent(context, state)),
|
||||
_buildDialogFooter(context, state),
|
||||
],
|
||||
|
Reference in New Issue
Block a user