Merge remote-tracking branch 'origin/feature/remote-management' into feature/remote-management

This commit is contained in:
2026-03-16 12:47:18 +01:00
8 changed files with 230 additions and 45 deletions

View File

@@ -26,14 +26,14 @@ class AccountSettingsScreen extends ConsumerWidget {
accountSettingsViewModelProvider.select((s) => s.isLoggingOut),
);
ref.listen(
accountSettingsViewModelProvider.select((s) => s.isLoggingOut),
(prev, isLoggingOut) {
if (prev == true && !isLoggingOut) {
navigationContract.goTo(AppRoutes.legacyLogin);
}
},
);
ref.listen(accountSettingsViewModelProvider.select((s) => s.isLoggingOut), (
prev,
isLoggingOut,
) {
if (prev == true && !isLoggingOut) {
navigationContract.goTo(AppRoutes.legacyLogin);
}
});
return LegacyPageLayout(
theme: theme,
@@ -46,11 +46,39 @@ class AccountSettingsScreen extends ConsumerWidget {
),
child: Column(
children: [
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.personalData), icon: SFIcons.account, text: I18n.personalData, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.changePassword), icon: Icons.lock, text: I18n.changePassword, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.legacyDeviceSetup), icon: Icons.add_circle_outline, text: I18n.addNewSF, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.linkedDevices), icon: Icons.account_circle_outlined, text: I18n.linkedDevices, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.appUsers), icon: Icons.groups_outlined, text: I18n.appUsers, color: color),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.personalData),
icon: SFIcons.account,
text: I18n.personalData,
color: color,
),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.changePassword),
icon: Icons.lock,
text: I18n.changePassword,
color: color,
),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.legacyDeviceSetup),
icon: Icons.add_circle_outline,
text: I18n.addNewSF,
color: color,
),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.linkedDevices),
icon: Icons.account_circle_outlined,
text: I18n.linkedDevices,
color: color,
),
// _item(context, onPressed: () => navigationContract.pushTo(AppRoutes.appUsers), icon: Icons.groups_outlined, text: I18n.appUsers, color: color),
_item(
context,
onPressed: () async {
@@ -82,7 +110,14 @@ class AccountSettingsScreen extends ConsumerWidget {
text: I18n.regCode,
color: color,
),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.deleteAccount), icon: Icons.no_accounts, text: I18n.deleteAccount, color: color),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.deleteAccount),
icon: Icons.no_accounts,
text: I18n.deleteAccount,
color: color,
),
],
),
),
@@ -121,7 +156,9 @@ class AccountSettingsScreen extends ConsumerWidget {
required Color color,
}) {
return Padding(
padding: EdgeInsets.only(bottom: SizeUtils.getByScreen(small: 16, big: 15)),
padding: EdgeInsets.only(
bottom: SizeUtils.getByScreen(small: 16, big: 15),
),
child: SectionButton(
onPressed: onPressed,
icon: Icon(

View File

@@ -27,14 +27,14 @@ class DeviceManagementScreen extends ConsumerWidget {
),
child: Column(
children: [
AppMenuButton(
color: theme.getColorFor(ThemeCode.legacyPrimary),
onPressed: () =>
navigationContract.pushTo(AppRoutes.remoteConnection),
icon: SFIcons.connection,
text: context.translate(I18n.remoteConnection),
),
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
// AppMenuButton(
// color: theme.getColorFor(ThemeCode.legacyPrimary),
// onPressed: () =>
// navigationContract.pushTo(AppRoutes.remoteConnection),
// icon: SFIcons.connection,
// text: context.translate(I18n.remoteConnection),
// ),
// SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
AppMenuButton(
color: theme.getColorFor(ThemeCode.legacyPrimary),
onPressed: () =>
@@ -106,8 +106,7 @@ class DeviceManagementScreen extends ConsumerWidget {
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
AppMenuButton(
color: theme.getColorFor(ThemeCode.legacyPrimary),
onPressed: () =>
navigationContract.pushTo(AppRoutes.appsUse),
onPressed: () => navigationContract.pushTo(AppRoutes.appsUse),
icon: SFIcons.screenTime,
text: context.translate(I18n.appsUse),
),

View File

@@ -27,21 +27,111 @@ class SettingsScreen extends ConsumerWidget {
),
child: Column(
children: [
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.alarm), icon: Icons.notifications_outlined, text: I18n.alarm, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.appStore), icon: Icons.apps_rounded, text: I18n.appStore, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.blockPhone), icon: Icons.phone_outlined, text: I18n.blockPhone, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.timezone), icon: Icons.check, text: I18n.timezone, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.language), icon: Icons.translate_outlined, text: I18n.language, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.battery), icon: Icons.nightlight_outlined, text: I18n.battery, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.remoteManagement), icon: Icons.settings_remote_outlined, text: I18n.remoteManagement, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.legacyNotifications), icon: Icons.message_outlined, text: I18n.legacyNotifications, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.smsAlert), icon: Icons.sms_outlined, text: I18n.smsAlert, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.sosContacts), icon: Icons.perm_contact_calendar_outlined, text: I18n.sosContacts, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.sound), icon: Icons.volume_up_outlined, text: I18n.sound, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.wifiSettings), icon: Icons.wifi_find_outlined, text: I18n.wifiSettings, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.remoteOnOff), icon: Icons.settings_power_outlined, text: I18n.remoteOnOff, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.disableFunctions), icon: Icons.dashboard_customize_outlined, text: I18n.disableFunctions, color: color),
_item(context, onPressed: () => navigationContract.pushTo(AppRoutes.syncClock), icon: Icons.share_arrival_time_outlined, text: I18n.syncClock, color: color),
_item(
context,
onPressed: () => navigationContract.pushTo(AppRoutes.alarm),
icon: Icons.notifications_outlined,
text: I18n.alarm,
color: color,
),
_item(
context,
onPressed: () => navigationContract.pushTo(AppRoutes.appStore),
icon: Icons.apps_rounded,
text: I18n.appStore,
color: color,
),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.blockPhone),
icon: Icons.phone_outlined,
text: I18n.blockPhone,
color: color,
),
_item(
context,
onPressed: () => navigationContract.pushTo(AppRoutes.timezone),
icon: Icons.check,
text: I18n.timezone,
color: color,
),
_item(
context,
onPressed: () => navigationContract.pushTo(AppRoutes.language),
icon: Icons.translate_outlined,
text: I18n.language,
color: color,
),
_item(
context,
onPressed: () => navigationContract.pushTo(AppRoutes.battery),
icon: Icons.nightlight_outlined,
text: I18n.battery,
color: color,
),
// _item(context, onPressed: () => navigationContract.pushTo(AppRoutes.remoteManagement), icon: Icons.settings_remote_outlined, text: I18n.remoteManagement, color: color),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.legacyNotifications),
icon: Icons.message_outlined,
text: I18n.legacyNotifications,
color: color,
),
_item(
context,
onPressed: () => navigationContract.pushTo(AppRoutes.smsAlert),
icon: Icons.sms_outlined,
text: I18n.smsAlert,
color: color,
),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.sosContacts),
icon: Icons.perm_contact_calendar_outlined,
text: I18n.sosContacts,
color: color,
),
// _item(
// context,
// onPressed: () => navigationContract.pushTo(AppRoutes.sound),
// icon: Icons.volume_up_outlined,
// text: I18n.sound,
// color: color,
// ),
// _item(
// context,
// onPressed: () =>
// navigationContract.pushTo(AppRoutes.wifiSettings),
// icon: Icons.wifi_find_outlined,
// text: I18n.wifiSettings,
// color: color,
// ),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.remoteOnOff),
icon: Icons.settings_power_outlined,
text: I18n.remoteOnOff,
color: color,
),
_item(
context,
onPressed: () =>
navigationContract.pushTo(AppRoutes.disableFunctions),
icon: Icons.dashboard_customize_outlined,
text: I18n.disableFunctions,
color: color,
),
_item(
context,
onPressed: () => navigationContract.pushTo(AppRoutes.syncClock),
icon: Icons.share_arrival_time_outlined,
text: I18n.syncClock,
color: color,
),
],
),
),