mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
push bug fixes
This commit is contained in:
5
assets/icons/ac_lock.svg
Normal file
5
assets/icons/ac_lock.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="25" height="35" viewBox="0 0 25 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.3952 0C7.16271 0.00642578 2.92244 4.24662 2.91602 9.47919V15.3125C2.91602 15.7152 3.2425 16.0417 3.64521 16.0417H6.5619C6.9646 16.0417 7.29109 15.7152 7.29109 15.3125V9.47919C7.29102 6.66019 9.57627 4.375 12.3952 4.375C15.2141 4.375 17.4994 6.66019 17.4994 9.47919V15.3125C17.4994 15.7152 17.8259 16.0417 18.2286 16.0417H21.1452C21.5479 16.0417 21.8744 15.7152 21.8744 15.3125V9.47919C21.868 4.24662 17.6277 0.00642578 12.3952 0Z" fill="#455A64"/>
|
||||
<path d="M3.64581 14.5833H21.1458C23.1593 14.5833 24.7916 16.2155 24.7916 18.2291V31.3541C24.7916 33.3677 23.1593 34.9999 21.1458 34.9999H3.64581C1.63229 34.9999 0 33.3677 0 31.3541V18.2291C0 16.2155 1.63229 14.5833 3.64581 14.5833Z" fill="#2F66D3"/>
|
||||
<path d="M16.0417 22.6041C16.0501 20.5906 14.4248 18.9514 12.4112 18.9429C10.3977 18.9344 8.75851 20.5598 8.75003 22.5733C8.74415 23.9651 9.53118 25.2388 10.7785 25.8562L10.2156 29.7937C10.1592 30.1924 10.4367 30.5613 10.8355 30.6177C10.8692 30.6225 10.9034 30.6249 10.9375 30.6249H13.8542C14.2569 30.629 14.5866 30.3059 14.5907 29.9032C14.591 29.8661 14.5886 29.8289 14.5833 29.7922L14.0203 25.8547C15.2524 25.2381 16.0337 23.9817 16.0417 22.6041Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
@ -46,7 +46,7 @@ class AcDeviceBatchControlView extends StatelessWidget
|
||||
),
|
||||
children: [
|
||||
ToggleWidget(
|
||||
icon: Assets.ac,
|
||||
icon: Assets.acLock,
|
||||
deviceId: devicesIds.first,
|
||||
code: 'switch',
|
||||
value: state.status.acSwitch,
|
||||
@ -80,8 +80,7 @@ class AcDeviceBatchControlView extends StatelessWidget
|
||||
code: 'child_lock',
|
||||
value: state.status.childLock,
|
||||
label: 'Child Lock',
|
||||
icon:
|
||||
state.status.childLock ? Assets.childLock : Assets.unlock,
|
||||
icon: state.status.childLock ? Assets.unlock : Assets.acLock,
|
||||
onChange: (value) {
|
||||
context.read<AcBloc>().add(AcBatchControlEvent(
|
||||
devicesIds: devicesIds,
|
||||
|
@ -46,6 +46,7 @@ class AcDeviceControlsView extends StatelessWidget with HelperResponsiveLayout {
|
||||
value: state.status.acSwitch,
|
||||
code: 'switch',
|
||||
deviceId: device.uuid!,
|
||||
icon: Assets.ac,
|
||||
),
|
||||
CurrentTemp(
|
||||
currentTemp: state.status.currentTemp,
|
||||
@ -68,8 +69,7 @@ class AcDeviceControlsView extends StatelessWidget with HelperResponsiveLayout {
|
||||
code: 'child_lock',
|
||||
deviceId: device.uuid!,
|
||||
description: 'Child Lock',
|
||||
icon:
|
||||
state.status.childLock ? Assets.childLock : Assets.unlock,
|
||||
icon: state.status.childLock ? Assets.unlock : Assets.acLock,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -39,16 +39,21 @@ class AcToggle extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
child: SvgPicture.asset(
|
||||
icon ?? Assets.lightPulp,
|
||||
width: 60,
|
||||
height: 60,
|
||||
fit: BoxFit.cover,
|
||||
Container(
|
||||
width: 60,
|
||||
height: 60,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: ColorsManager.whiteColors,
|
||||
),
|
||||
)),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: ClipOval(
|
||||
child: SvgPicture.asset(
|
||||
icon ?? Assets.lightPulp,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
width: 35,
|
||||
|
@ -5,6 +5,7 @@ import 'package:syncrow_web/pages/device_managment/all_devices/helper/route_cont
|
||||
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/format_date_time.dart';
|
||||
|
||||
class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
|
||||
final AllDevicesModel device;
|
||||
@ -91,8 +92,7 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
|
||||
],
|
||||
),
|
||||
TableRow(children: [
|
||||
_buildInfoRow('Virtual Address:',
|
||||
'Area - Street 1 - Building 1 - First Floor'),
|
||||
_buildInfoRow('Virtual Address:', '${device.ip}'),
|
||||
const SizedBox.shrink(),
|
||||
]),
|
||||
TableRow(
|
||||
@ -103,7 +103,14 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
_buildInfoRow('Installation Date and Time:', '09/08/2024 13:30'),
|
||||
_buildInfoRow(
|
||||
'Installation Date and Time:',
|
||||
formatDateTime(
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
((device.createTime ?? 0) * 1000),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
|
@ -11,7 +11,14 @@ class ScheduleDialogHelper {
|
||||
{ScheduleModel? schedule, int? index, bool? isEdit}) {
|
||||
final bloc = context.read<WaterHeaterBloc>();
|
||||
|
||||
if (schedule != null) {
|
||||
if (schedule == null) {
|
||||
bloc.add(InitializeAddScheduleEvent(
|
||||
selectedTime: null,
|
||||
selectedDays: List.filled(7, false),
|
||||
functionOn: false,
|
||||
isEditing: false,
|
||||
));
|
||||
} else {
|
||||
final time = _convertStringToTimeOfDay(schedule.time);
|
||||
final selectedDays = _convertDaysStringToBooleans(schedule.days);
|
||||
|
||||
@ -22,16 +29,6 @@ class ScheduleDialogHelper {
|
||||
isEditing: true,
|
||||
index: index,
|
||||
));
|
||||
} else {
|
||||
bloc.add(
|
||||
const InitializeAddScheduleEvent(
|
||||
selectedDays: [false, false, false, false, false, false, false],
|
||||
functionOn: false,
|
||||
isEditing: false,
|
||||
index: null,
|
||||
selectedTime: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
showDialog(
|
||||
@ -98,7 +95,7 @@ class ScheduleDialogHelper {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
state.selectedTime == null
|
||||
state.selectedTime == null || schedule == null
|
||||
? 'Time'
|
||||
: state.selectedTime!.format(context),
|
||||
style: context.textTheme.bodySmall!.copyWith(
|
||||
|
@ -24,6 +24,7 @@ class _BuildScheduleViewState extends State<BuildScheduleView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bloc = BlocProvider.of<WaterHeaterBloc>(context);
|
||||
|
||||
return BlocProvider.value(
|
||||
value: bloc,
|
||||
child: Dialog(
|
||||
|
@ -166,4 +166,7 @@ class Assets {
|
||||
|
||||
//assets/icons/water_heater.svg
|
||||
static const String waterHeater = 'assets/icons/water_heater.svg';
|
||||
|
||||
//assets/icons/ac_lock.svg
|
||||
static const String acLock = 'assets/icons/ac_lock.svg';
|
||||
}
|
||||
|
Reference in New Issue
Block a user