implement tracking protection per site
This commit is contained in:
@@ -64,6 +64,7 @@ import 'package:weblibre/features/settings/presentation/screens/privacy_security
|
||||
import 'package:weblibre/features/settings/presentation/screens/search_content_settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/tabs_behavior_settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/tracking_protection_exceptions.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/web_engine_hardening.dart';
|
||||
import 'package:weblibre/features/settings/presentation/screens/web_engine_hardening_group.dart';
|
||||
import 'package:weblibre/features/tor/presentation/screens/tor_proxy.dart';
|
||||
|
||||
@@ -146,6 +146,11 @@ RouteBase get $settingsRoute => GoRouteData.$route(
|
||||
name: 'AddonCollectionRoute',
|
||||
factory: $AddonCollectionRoute._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'tracking_protection_exceptions',
|
||||
name: 'TrackingProtectionExceptionsRoute',
|
||||
factory: $TrackingProtectionExceptionsRoute._fromState,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -446,6 +451,28 @@ mixin $AddonCollectionRoute on GoRouteData {
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
mixin $TrackingProtectionExceptionsRoute on GoRouteData {
|
||||
static TrackingProtectionExceptionsRoute _fromState(GoRouterState state) =>
|
||||
TrackingProtectionExceptionsRoute();
|
||||
|
||||
@override
|
||||
String get location =>
|
||||
GoRouteData.$location('/settings/tracking_protection_exceptions');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $browserRoute => GoRouteData.$route(
|
||||
path: '/browser',
|
||||
name: 'BrowserRoute',
|
||||
|
||||
@@ -71,6 +71,10 @@ part of 'routes.dart';
|
||||
name: 'AddonCollectionRoute',
|
||||
path: 'addon_collection',
|
||||
),
|
||||
TypedGoRoute<TrackingProtectionExceptionsRoute>(
|
||||
name: 'TrackingProtectionExceptionsRoute',
|
||||
path: 'tracking_protection_exceptions',
|
||||
),
|
||||
],
|
||||
)
|
||||
class SettingsRoute extends GoRouteData with $SettingsRoute {
|
||||
@@ -182,3 +186,11 @@ class WebEngineHardeningGroupRoute extends GoRouteData
|
||||
return WebEngineHardeningGroupScreen(groupName: group);
|
||||
}
|
||||
}
|
||||
|
||||
class TrackingProtectionExceptionsRoute extends GoRouteData
|
||||
with $TrackingProtectionExceptionsRoute {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const TrackingProtectionExceptionsScreen();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user