feat(navigation): add routes for installed apps and app usage schedules
This commit is contained in:
@@ -212,6 +212,19 @@ void configureAppRouter() {
|
||||
name: 'background_image',
|
||||
pageBuilder: const BackgroundImageBuilder().buildPage,
|
||||
),
|
||||
GoRoute(
|
||||
path: 'installed_apps',
|
||||
name: 'installed_apps',
|
||||
pageBuilder: const InstalledAppsBuilder().buildPage,
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: 'schedules',
|
||||
name: 'app_usage_schedules',
|
||||
pageBuilder:
|
||||
const AppUsageSchedulesBuilder().buildPage,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@@ -12,3 +12,5 @@ export 'src/features/volume_control/volume_control_builder.dart';
|
||||
export 'src/features/do_not_disturb/do_not_disturb_builder.dart';
|
||||
export 'src/features/call_history/call_history_builder.dart';
|
||||
export 'src/features/background_image/background_image_builder.dart';
|
||||
export 'src/features/installed_apps/installed_apps_builder.dart';
|
||||
export 'src/features/app_usage_schedules/app_usage_schedules_builder.dart';
|
||||
|
||||
@@ -119,7 +119,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
onPressed: () => showDialog(
|
||||
onPressed: () => showLegacyDialog(
|
||||
context: context,
|
||||
builder: (_) => Dialog(child: CallWatchDialog()),
|
||||
),
|
||||
@@ -145,6 +145,14 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
icon: SFIcons.screenTime,
|
||||
text: context.translate(I18n.appsUse),
|
||||
),
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.installedApps),
|
||||
icon: Icons.apps_outlined,
|
||||
text: context.translate(I18n.installedAppsTitle),
|
||||
),
|
||||
],
|
||||
if (capabilities?.commands?.types.contains('FIND_DEVICE') ?? false) ...[
|
||||
gap,
|
||||
|
||||
@@ -70,6 +70,8 @@ class AppRoutes {
|
||||
static const rewards = '$deviceManagement/rewards';
|
||||
static const activityMeter = '$deviceManagement/activity_meter';
|
||||
static const appsUse = '$deviceManagement/apps_use';
|
||||
static const installedApps = '$deviceManagement/installed_apps';
|
||||
static const appUsageSchedules = '$installedApps/schedules';
|
||||
static const volumeControl = '$deviceManagement/volume_control';
|
||||
static const doNotDisturb = '$deviceManagement/do_not_disturb';
|
||||
static const callHistory = '$deviceManagement/call_history';
|
||||
|
||||
Reference in New Issue
Block a user