mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-25 18:49:40 +00:00
Compare commits
11 Commits
SP-519-del
...
99852464c7
Author | SHA1 | Date | |
---|---|---|---|
99852464c7 | |||
4ac6077011 | |||
d5321a9ca0 | |||
9d507f30eb | |||
029e36ee3d | |||
dd55d5c082 | |||
09dc8cc330 | |||
76da7debfd | |||
f7245e5de9 | |||
fe472f0ca0 | |||
d9b68a11e5 |
@ -479,7 +479,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
// onPressed: () {},
|
||||
// ),
|
||||
],
|
||||
'Routine': [
|
||||
'Automation': [
|
||||
// IconButton(
|
||||
// icon: Image.asset(
|
||||
// Assets.assetsIconsFilter,
|
||||
@ -553,7 +553,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
static Map<String, Widget?> appBarLeading = {
|
||||
// 'Dashboard': const AppBarHomeDropdown(),
|
||||
'Devices': const AppBarHomeDropdown(),
|
||||
'Routine': const AppBarHomeDropdown(),
|
||||
'Automation': const AppBarHomeDropdown(),
|
||||
'Menu': Padding(
|
||||
padding: const EdgeInsets.only(left: 15),
|
||||
child: Image.asset(
|
||||
@ -569,7 +569,8 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
// defaultBottomNavBarItem(icon: Assets.assetsIconsDashboard, label: 'Dashboard'),
|
||||
// defaultBottomNavBarItem(icon: Assets.assetsIconslayout, label: 'Layout'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsDevices, label: 'Devices'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsRoutines, label: 'Routine'),
|
||||
defaultBottomNavBarItem(
|
||||
icon: Assets.assetsIconsRoutines, label: 'Automation'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsMenu, label: 'Menu'),
|
||||
];
|
||||
|
||||
@ -616,7 +617,6 @@ BottomNavigationBarItem defaultBottomNavBarItem(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// class PermissionUtils {
|
||||
// // Check if the "VIEW" permission exists in "MANAGE_SUBSPACE"
|
||||
// static bool hasViewPermission(List<dynamic> permissions) {
|
||||
|
@ -354,6 +354,7 @@ class SmartDoorBloc extends Bloc<SmartDoorEvent, SmartDoorState> {
|
||||
|
||||
Future<void> selectTimeOnlinePassword(
|
||||
SelectTimeOnlinePasswordEvent event, Emitter<SmartDoorState> emit) async {
|
||||
effectiveTimeTimeStamp ??= DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||
emit(ChangeTimeState());
|
||||
final DateTime? picked = await showDatePicker(
|
||||
context: event.context,
|
||||
@ -398,7 +399,13 @@ class SmartDoorBloc extends Bloc<SmartDoorEvent, SmartDoorState> {
|
||||
selectedDateTime.minute,
|
||||
).millisecondsSinceEpoch ~/
|
||||
1000; // Divide by 1000 to remove milliseconds
|
||||
final currentTimestamp = DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||
if (event.isEffective) {
|
||||
if (selectedTimestamp < currentTimestamp) {
|
||||
CustomSnackBar.displaySnackBar(
|
||||
'Effective Time cannot be later than Expiration Time.');
|
||||
return;
|
||||
}
|
||||
if (expirationTimeTimeStamp != null &&
|
||||
selectedTimestamp > expirationTimeTimeStamp!) {
|
||||
CustomSnackBar.displaySnackBar(
|
||||
|
@ -11,6 +11,9 @@ class NameTimeWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
DateTime now = DateTime.now();
|
||||
DateTime cleaned =
|
||||
DateTime(now.year, now.month, now.day, now.hour, now.minute);
|
||||
return DefaultContainer(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
@ -59,19 +62,22 @@ class NameTimeWidget extends StatelessWidget {
|
||||
width: MediaQuery.of(context).size.width / 3.5,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
|
||||
BlocProvider.of<SmartDoorBloc>(context).add(SelectTimeOnlinePasswordEvent(context: context, isEffective: true));
|
||||
BlocProvider.of<SmartDoorBloc>(context).add(
|
||||
SelectTimeOnlinePasswordEvent(
|
||||
context: context, isEffective: true));
|
||||
},
|
||||
child: Text(
|
||||
BlocProvider.of<SmartDoorBloc>(context).effectiveTime,
|
||||
style: TextStyle(fontSize: 14,
|
||||
color: BlocProvider.of<SmartDoorBloc>(context).effectiveTime ==
|
||||
BlocProvider.of<SmartDoorBloc>(context)
|
||||
.effectiveTime ==
|
||||
'Select Time'
|
||||
? ColorsManager.textGray
|
||||
: null),
|
||||
? cleaned.toString()
|
||||
: BlocProvider.of<SmartDoorBloc>(context)
|
||||
.effectiveTime,
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
)),
|
||||
],),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
@ -96,10 +102,13 @@ class NameTimeWidget extends StatelessWidget {
|
||||
context: context, isEffective: false));
|
||||
},
|
||||
child: Text(
|
||||
BlocProvider.of<SmartDoorBloc>(context).expirationTime,
|
||||
BlocProvider.of<SmartDoorBloc>(context)
|
||||
.expirationTime,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: BlocProvider.of<SmartDoorBloc>(context).expirationTime == 'Select Time'
|
||||
color: BlocProvider.of<SmartDoorBloc>(context)
|
||||
.expirationTime ==
|
||||
'Select Time'
|
||||
? ColorsManager.textGray
|
||||
: null),
|
||||
),
|
||||
|
@ -18,7 +18,8 @@ import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
||||
class CreateOfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
final String? deviceId;
|
||||
final String? type;
|
||||
const CreateOfflineTimeLimitPasswordPage({super.key, this.deviceId, this.type});
|
||||
const CreateOfflineTimeLimitPasswordPage(
|
||||
{super.key, this.deviceId, this.type});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool isRepeat = false;
|
||||
@ -28,9 +29,7 @@ class CreateOfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
child: BlocConsumer<SmartDoorBloc, SmartDoorState>(
|
||||
listener: (context, state) {
|
||||
if (state is FailedState) {
|
||||
CustomSnackBar.displaySnackBar(
|
||||
state.errorMessage
|
||||
);
|
||||
CustomSnackBar.displaySnackBar(state.errorMessage);
|
||||
}
|
||||
if (state is IsRepeatState) {
|
||||
isRepeat = state.repeat;
|
||||
@ -39,6 +38,10 @@ class CreateOfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
generated = state.generated;
|
||||
}
|
||||
}, builder: (context, state) {
|
||||
DateTime now = DateTime.now();
|
||||
DateTime cleaned =
|
||||
DateTime(now.year, now.month, now.day, now.hour, now.minute);
|
||||
|
||||
final smartDoorBloc = BlocProvider.of<SmartDoorBloc>(context);
|
||||
return DefaultScaffold(
|
||||
appBar: AppBar(
|
||||
@ -85,46 +88,56 @@ class CreateOfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
Flexible(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: smartDoorBloc.passwordController.text.isEmpty ?
|
||||
List.generate(10, (index) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 4.0,
|
||||
vertical: 15),
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
size: 20.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
);
|
||||
}) : [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
children: smartDoorBloc
|
||||
.passwordController.text.isEmpty
|
||||
? List.generate(10, (index) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 4.0,
|
||||
vertical: 15),
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
size: 20.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
);
|
||||
})
|
||||
: [
|
||||
Expanded(
|
||||
child: BodyLarge(
|
||||
style: const TextStyle(
|
||||
color: ColorsManager.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 8.0,
|
||||
fontSize: 25,
|
||||
wordSpacing: 2),
|
||||
textAlign: TextAlign.center,
|
||||
text: smartDoorBloc.passwordController.text,
|
||||
fontSize: 25,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: BodyLarge(
|
||||
style: const TextStyle(
|
||||
color: ColorsManager
|
||||
.primaryColor,
|
||||
fontWeight:
|
||||
FontWeight.bold,
|
||||
letterSpacing: 8.0,
|
||||
fontSize: 25,
|
||||
wordSpacing: 2),
|
||||
textAlign:
|
||||
TextAlign.center,
|
||||
text: smartDoorBloc
|
||||
.passwordController
|
||||
.text,
|
||||
fontSize: 25,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await Clipboard.setData(
|
||||
ClipboardData(
|
||||
text: smartDoorBloc
|
||||
.passwordController
|
||||
.text));
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.copy)),
|
||||
],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await Clipboard.setData(
|
||||
ClipboardData(text: smartDoorBloc.passwordController.text)
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.copy)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
@ -135,91 +148,142 @@ class CreateOfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: const BodyMedium(
|
||||
text: 'Password Name',
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width / 2.6,
|
||||
child: TextFormField(
|
||||
controller: BlocProvider.of<SmartDoorBloc>(context).passwordNameController,
|
||||
decoration:
|
||||
const InputDecoration(
|
||||
hintText: 'Enter The Name',
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 14,
|
||||
color: ColorsManager.textGray)
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Divider(color: ColorsManager.graysColor,),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Expanded(
|
||||
child: BodyMedium(
|
||||
text: 'Effective Time',
|
||||
fontWeight: FontWeight.normal,
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding:
|
||||
const EdgeInsets.all(10.0),
|
||||
child: const BodyMedium(
|
||||
text: 'Password Name',
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width / 3.5,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
BlocProvider.of<SmartDoorBloc>(context).add(SelectTimeEvent(context: context, isEffective: true));
|
||||
},
|
||||
child: Text(
|
||||
BlocProvider.of<SmartDoorBloc>(context).effectiveTime,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: BlocProvider.of<SmartDoorBloc>(context).effectiveTime ==
|
||||
'Select Time' ? ColorsManager.textGray : null),
|
||||
),
|
||||
)),],
|
||||
),
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Expanded(
|
||||
child: BodyMedium(
|
||||
text: 'Expiration Time',
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width / 3.5,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
BlocProvider.of<SmartDoorBloc>(context).add(SelectTimeEvent(
|
||||
context: context,
|
||||
isEffective: false));
|
||||
},
|
||||
child: Text(
|
||||
BlocProvider.of<SmartDoorBloc>(context).expirationTime,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: BlocProvider.of<SmartDoorBloc>(context)
|
||||
.expirationTime == 'Select Time' ? ColorsManager
|
||||
.textGray : null),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context)
|
||||
.size
|
||||
.width /
|
||||
2.6,
|
||||
child: TextFormField(
|
||||
controller: BlocProvider.of<
|
||||
SmartDoorBloc>(context)
|
||||
.passwordNameController,
|
||||
decoration:
|
||||
const InputDecoration(
|
||||
hintText:
|
||||
'Enter The Name',
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 14,
|
||||
color: ColorsManager
|
||||
.textGray)),
|
||||
)),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceBetween,
|
||||
children: [
|
||||
const Expanded(
|
||||
child: BodyMedium(
|
||||
text: 'Effective Time',
|
||||
fontWeight:
|
||||
FontWeight.normal,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width:
|
||||
MediaQuery.of(context)
|
||||
.size
|
||||
.width /
|
||||
3.5,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
BlocProvider.of<
|
||||
SmartDoorBloc>(
|
||||
context)
|
||||
.add(
|
||||
SelectTimeEvent(
|
||||
context:
|
||||
context,
|
||||
isEffective:
|
||||
true));
|
||||
},
|
||||
child: Text(
|
||||
BlocProvider.of<SmartDoorBloc>(
|
||||
context)
|
||||
.effectiveTime ==
|
||||
'Select Time'
|
||||
? cleaned.toString()
|
||||
: BlocProvider.of<
|
||||
SmartDoorBloc>(
|
||||
context)
|
||||
.effectiveTime,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(
|
||||
color: ColorsManager.graysColor,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceBetween,
|
||||
children: [
|
||||
const Expanded(
|
||||
child: BodyMedium(
|
||||
text: 'Expiration Time',
|
||||
fontWeight:
|
||||
FontWeight.normal,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context)
|
||||
.size
|
||||
.width /
|
||||
3.5,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
BlocProvider.of<
|
||||
SmartDoorBloc>(
|
||||
context)
|
||||
.add(SelectTimeEvent(
|
||||
context: context,
|
||||
isEffective:
|
||||
false));
|
||||
},
|
||||
child: Text(
|
||||
BlocProvider.of<
|
||||
SmartDoorBloc>(
|
||||
context)
|
||||
.expirationTime,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: BlocProvider.of<
|
||||
SmartDoorBloc>(
|
||||
context)
|
||||
.expirationTime ==
|
||||
'Select Time'
|
||||
? ColorsManager
|
||||
.textGray
|
||||
: null),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -238,7 +302,8 @@ class CreateOfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
),
|
||||
const BodyMedium(
|
||||
textAlign: TextAlign.center,
|
||||
text: 'Use the time-limited password at least once within 24 hours after the password takes effect. Otherwise, the password becomes invalid.',
|
||||
text:
|
||||
'Use the time-limited password at least once within 24 hours after the password takes effect. Otherwise, the password becomes invalid.',
|
||||
fontWeight: FontWeight.normal,
|
||||
fontColor: ColorsManager.grayColor,
|
||||
),
|
||||
@ -256,10 +321,13 @@ class CreateOfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
backgroundColor: ColorsManager.primaryColor,
|
||||
onPressed: () async {
|
||||
if (generated == false) {
|
||||
smartDoorBloc.add(GenerateAndSavePasswordTimeLimitEvent(context: context));
|
||||
smartDoorBloc.add(
|
||||
GenerateAndSavePasswordTimeLimitEvent(
|
||||
context: context));
|
||||
} else {
|
||||
if(smartDoorBloc.passwordNameController.text.isNotEmpty){
|
||||
smartDoorBloc.add(RenamePasswordEvent());
|
||||
if (smartDoorBloc
|
||||
.passwordNameController.text.isNotEmpty) {
|
||||
smartDoorBloc.add(RenamePasswordEvent());
|
||||
}
|
||||
Navigator.of(context).pop(true);
|
||||
}
|
||||
|
@ -262,6 +262,17 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||
if (parts.any((part) => part.length < 2 || part.length > 30)) {
|
||||
return 'Full name parts must be between 2 and 30 characters long';
|
||||
}
|
||||
if (RegExp(r"\s{2,}").hasMatch(value)) {
|
||||
return 'Only one space is allowed between first and last names';
|
||||
}
|
||||
// Check for leading or trailing spaces
|
||||
if (value != value.trim()) {
|
||||
return 'No leading or trailing spaces allowed';
|
||||
}
|
||||
// Check if only alphabetic characters and one space are used
|
||||
if (!RegExp(r'^[A-Za-z]+(?: [A-Za-z]+)?$').hasMatch(value)) {
|
||||
return 'Only alphabetic characters and a single space are allowed';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -27,12 +27,15 @@ class RoutinesView extends StatelessWidget {
|
||||
builder: (context, state) {
|
||||
final selectedSpace = HomeCubit.getInstance().selectedSpace;
|
||||
if (state is DeleteSceneSuccess) {
|
||||
if (state.success) _loadScenesAndAutomations(context, selectedSpace);
|
||||
if (state.success)
|
||||
_loadScenesAndAutomations(context, selectedSpace);
|
||||
}
|
||||
if (state is CreateSceneWithTasks) {
|
||||
if (state.success) {
|
||||
_loadScenesAndAutomations(context, selectedSpace);
|
||||
context.read<SmartSceneSelectBloc>().add(const SmartSceneClearEvent());
|
||||
context
|
||||
.read<SmartSceneSelectBloc>()
|
||||
.add(const SmartSceneClearEvent());
|
||||
}
|
||||
}
|
||||
return BlocListener<SceneBloc, SceneState>(
|
||||
@ -72,30 +75,28 @@ class RoutinesView extends StatelessWidget {
|
||||
data: Theme.of(context).copyWith(
|
||||
dividerColor: Colors.transparent,
|
||||
),
|
||||
child: Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
RoutinesExpansionTile(
|
||||
title: 'Tap to run routines',
|
||||
emptyRoutinesMessage:
|
||||
'No scenes have been added yet',
|
||||
routines: state.scenes,
|
||||
loadingStates: state.loadingStates,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
disablePlayButton: false,
|
||||
),
|
||||
RoutinesExpansionTile(
|
||||
title: 'Automation',
|
||||
emptyRoutinesMessage:
|
||||
'No automations have been added yet',
|
||||
routines: state.automationList,
|
||||
loadingStates: state.loadingStates,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
disablePlayButton: true,
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
],
|
||||
),
|
||||
child: ListView(
|
||||
children: [
|
||||
RoutinesExpansionTile(
|
||||
title: 'Tap to run automations',
|
||||
emptyRoutinesMessage:
|
||||
'No scenes have been added yet',
|
||||
routines: state.scenes,
|
||||
loadingStates: state.loadingStates,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
disablePlayButton: false,
|
||||
),
|
||||
RoutinesExpansionTile(
|
||||
title: 'Automation',
|
||||
emptyRoutinesMessage:
|
||||
'No automations have been added yet',
|
||||
routines: state.automationList,
|
||||
loadingStates: state.loadingStates,
|
||||
loadingSceneId: state.loadingSceneId,
|
||||
disablePlayButton: true,
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -111,7 +112,8 @@ class RoutinesView extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
void _loadScenesAndAutomations(BuildContext context, SpaceModel? selectedSpace) {
|
||||
void _loadScenesAndAutomations(
|
||||
BuildContext context, SpaceModel? selectedSpace) {
|
||||
context.read<SceneBloc>()
|
||||
..add(LoadScenes(selectedSpace!.id, selectedSpace, showInDevice: false))
|
||||
..add(LoadAutomation(selectedSpace.id, selectedSpace.community.uuid));
|
||||
|
@ -100,7 +100,7 @@ class SceneView extends StatelessWidget {
|
||||
initiallyExpanded: true,
|
||||
iconColor: ColorsManager.grayColor,
|
||||
title: const BodyMedium(
|
||||
text: 'Tap to run routines',
|
||||
text: 'Tap to run automations',
|
||||
),
|
||||
children: [
|
||||
if (scenes.isNotEmpty)
|
||||
|
@ -23,7 +23,7 @@ class DeleteRoutineDialog extends StatelessWidget {
|
||||
height: 10,
|
||||
),
|
||||
const BodyLarge(
|
||||
text: 'Delete Routine',
|
||||
text: 'Delete Automation',
|
||||
fontWeight: FontWeight.w700,
|
||||
fontColor: ColorsManager.red,
|
||||
fontSize: 16,
|
||||
@ -39,7 +39,7 @@ class DeleteRoutineDialog extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
Center(child: const Text('Are you sure you want to ')),
|
||||
Center(child: const Text('delete the routine?'))
|
||||
Center(child: const Text('delete the automation?'))
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -52,7 +52,7 @@ class DeleteRoutineButton extends StatelessWidget {
|
||||
},
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Remove Routine',
|
||||
'Remove Automation',
|
||||
style: TextStyle(color: ColorsManager.red),
|
||||
))
|
||||
// : SceneListTile(
|
||||
|
@ -9,7 +9,7 @@ class EmptyDevicesWidget extends StatelessWidget {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 48),
|
||||
child: Text(
|
||||
"No routines.\nEnable 'Show on Home Screen' to add routines",
|
||||
"No automations.\nEnable 'Show on Home Screen' to add automations",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: ColorsManager.grayColor,
|
||||
|
@ -23,7 +23,7 @@ class EmptyRoutinesWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
BodyMedium(
|
||||
text: 'No Routines yet',
|
||||
text: 'No automations yet',
|
||||
fontColor: ColorsManager.textGray,
|
||||
),
|
||||
],
|
||||
|
@ -4,8 +4,8 @@ class StringsManager {
|
||||
|
||||
static const String dashboard = 'Dashboard';
|
||||
static const String devices = 'Devices';
|
||||
static const String routine = 'Routines';
|
||||
static const String tapToRunRoutine = 'Tap to run routine';
|
||||
static const String routine = 'Automation';
|
||||
static const String tapToRunRoutine = 'Tap to run automation';
|
||||
static const String wizard = 'Wizard';
|
||||
static const String active = 'Active';
|
||||
static const String current = 'Current';
|
||||
@ -39,6 +39,6 @@ class StringsManager {
|
||||
'Example: when an unusual activity is detected.';
|
||||
static const String functions = "Functions";
|
||||
static const String firstLaunch = "firstLaunch";
|
||||
static const String deleteScene = 'Remove Routine';
|
||||
static const String deleteScene = 'Remove Automation';
|
||||
static const String deleteAutomation = 'Delete Automation';
|
||||
}
|
||||
|
Reference in New Issue
Block a user