diff --git a/.env.sample b/.env.sample
deleted file mode 100644
index db332bb..0000000
--- a/.env.sample
+++ /dev/null
@@ -1,2 +0,0 @@
-SENTRY_DSN=
-ENABLE_SENTRY=false
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
deleted file mode 100644
index cf174cb..0000000
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-name: Report a bug
-description: |
- You detected something wrong on the application.
-labels: ["bug"]
-body:
- - type: textarea
- id: steps
- attributes:
- label: Steps to reproduce
- description: Steps to reproduce the problem you are running into.
- placeholder: |
- 1. ...
- 2. ...
- 3. ...
- validations:
- required: true
- - type: textarea
- id: expected-results
- attributes:
- label: Expected results
- description: What is expected to happen.
- validations:
- required: true
- - type: textarea
- id: actual-results
- attributes:
- label: Actual results
- description: What is actually happening.
- validations:
- required: true
- - type: textarea
- id: screenshots
- attributes:
- label: Screenshots or Video
- description: |
- Upload any screenshots or video of the bug.
- value: |
- Screenshots or video demonstration
- validations:
- required: true
- - type: textarea
- id: app-os-details
- attributes:
- label: App and OS details
- description: |
- Some details about the app version and the OS where you are running the application.
- value: |
- - App version: (eg: v2.16.0)
- - Device OS version: (eg: Android 14)
- validations:
- required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request_agh.yml b/.github/ISSUE_TEMPLATE/feature_request_agh.yml
deleted file mode 100644
index 55972db..0000000
--- a/.github/ISSUE_TEMPLATE/feature_request_agh.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: Request a new feature that has been added to AdGuard Home
-description: |
- The AdGuard Home team added recently a new feature that you want on the app.
-labels: ["agh feature request"]
-body:
- - type: textarea
- id: description
- attributes:
- label: Description
- description: Describe the feature that you want on the app.
- placeholder: |
- Write the details here...
- validations:
- required: true
- - type: textarea
- id: screenshots
- attributes:
- label: Screenshots
- description: Attach some screenshots of where that new feature is located on the web administration panel.
- placeholder: |
- Screenshots here.
- validations:
- required: true
- - type: textarea
- id: version-introduced
- attributes:
- label: Version where feature was introduced
- description: Version of the AdGuard Home server where this feature was introduced.
- placeholder: |
- - Version: (eg: v0.107.44)
- validations:
- required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request_app.yml b/.github/ISSUE_TEMPLATE/feature_request_app.yml
deleted file mode 100644
index 3cf08e6..0000000
--- a/.github/ISSUE_TEMPLATE/feature_request_app.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: Request a new feature or an improvement for the app itself
-description: |
- You want a new feature for the application, or an improvement for an existing one.
-labels: ["app feature request"]
-body:
- - type: markdown
- id: important-info
- attributes:
- value: |
- ℹ️ IMPORTANT INFO ℹ️
- Please note that if the functionality is related to data representation, it may not be implemented, as AdGuard Home Manager depends on the capabilities of the AdGuard Home API.
- - type: textarea
- id: description
- attributes:
- label: Description
- description: Describe the feature that you want on the app.
- placeholder: |
- Write the details here...
- validations:
- required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml
deleted file mode 100644
index 805783f..0000000
--- a/.github/ISSUE_TEMPLATE/question.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: You have a question about the app
-description: |
- You want ask something that's not related with a feature request or a bug.
-labels: ["question"]
-body:
- - type: markdown
- id: important-info
- attributes:
- value: |
- Having problems while adding a connection to a server? Check out [this guide](https://github.com/JGeek00/adguard-home-manager/wiki/Create-a-connection).
- - type: textarea
- id: question
- attributes:
- label: Question
- description: Write your question here giving the maximum detail possible.
- placeholder: |
- Write your question here...
- validations:
- required: true
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index e9d1504..24476c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,16 +5,11 @@
*.swp
.DS_Store
.atom/
-.build/
.buildlog/
.history
.svn/
-.swiftpm/
migrate_working_dir/
-# Env
-.env
-
# IntelliJ related
*.iml
*.ipr
@@ -47,9 +42,3 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
-
-/debian/packages
-
-untranslated.json
-
-android/app/.cxx
diff --git a/.metadata b/.metadata
index 656c923..e27f5cc 100644
--- a/.metadata
+++ b/.metadata
@@ -4,7 +4,7 @@
# This file should be version controlled.
version:
- revision: f72efea43c3013323d1b95cff571f3c1caa37583
+ revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
channel: stable
project_type: app
@@ -13,11 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
- create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
- base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
+ create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ - platform: android
+ create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ - platform: ios
+ create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
- platform: linux
- create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
- base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
+ create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ - platform: macos
+ create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ - platform: web
+ create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ - platform: windows
+ create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
+ base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
# User provided section
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index fab9821..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "editor.formatOnSave": false,
- "editor.formatOnPaste": false,
- "editor.formatOnType": false,
- "editor.defaultFormatter": "Dart-Code.flutter",
- "dart.lineLength": 120,
- "[dart]": {
- "editor.rulers": [
- 120
- ],
- "editor.defaultFormatter": "Dart-Code.dart-code",
- "editor.formatOnSave": false,
- "editor.formatOnPaste": false,
- "editor.formatOnType": false
- },
- "cSpell.ignorePaths": [
- "/pubspec.yaml",
- "/.github/workflows"
- ],
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index 1dcbc67..aabbe0f 100644
--- a/README.md
+++ b/README.md
@@ -30,82 +30,13 @@
▶ See the clients list and create a custom configuration for a client.
▶ Configure the allowed devices, DHCP, DNS or rewrites among others.
▶ Material You interface with dynamic theming (only Android 12+).
-▶ Full desktop support with builds for macOS, Linux and Windows.
-▶ Responsive UI adapted for landscape displays.
## Privacy policy
-Check the privacy policy [here](https://github.com/JGeek00/adguard-home-manager/wiki/Privacy-policy).
+AdGuard Home Manager does not collect any personal user data. All data stored into the application is kept on the user's device.
## Disclaimer
This is an unofficial application. The AdGuard Home team and the development of the AdGuard Home software is not related in any way with this application.
-## Recommended configuration and lists
-On [this repository](https://github.com/juanico10/Pihole_list) you can find a recommended configuration for AdGuard Home and some lists. Thanks to [juanico10](https://github.com/juanico10).
-
-## Donations
-If you like the project and you want to contribute with the development, you can [become a sponsor on GitHub](https://github.com/sponsors/JGeek00), or you can donate using PayPal.
-
-
-
-## Generate production build
-
- -
- Prerequisites
-
- - Open
pubspec.yaml
and change the version name and the version number.
- - Run
flutter clean
.
- - Run
flutter pub get
.
-
-
- -
- Android
-
- - Make sure you have your
key.properties
file at android/
, with all the required values of your signing key correctly set up.
- - Make sure you have your keystore file at
android/app
.
- - Run
flutter build apk --release
to compile the APK.
- - The .apk package is located at
build/app/outputs/flutter-apk/app-release.apk
.
-
-
- -
- macOS
-
- - Run
flutter build macos --release
to compile the production build.
- - The .app package is located at
build/macos/Build/Products/Release/AdGuard Home Manager.app
.
-
-
- -
- Linux
-
- Prerequisites
-
- - Install rps by running
dart pub global activate rps --version 0.7.0-dev.6
-
- Build
-
- - Open
debian.yaml
file inside debian/ and update the version number
- - run
rps build linux
- - The .tar.gz is at
build/linux/x64/release/bundle
- - The .deb package is at
build/linux/x64/release/debian/
-
-
-
- -
- Windows
-
- - Run
flutter build windows --release
.
- - Open Inno Setup Compiler application and load the script
- - The script is located at
windows/innosetup_installer_builder.iss
- - Update the version number and save the changes
- - Click on the Compile button
- - The installer will be generated at
build/windows/aghm_installer.exe
.
-
-
-
-
## Third party libraries
- [provider](https://pub.dev/packages/provider)
- [sqflite](https://pub.dev/packages/sqflite)
@@ -113,6 +44,7 @@ If you like the project and you want to contribute with the development, you can
- [expandable](https://pub.dev/packages/expandable)
- [package info plus](https://pub.dev/packages/package_info_plus)
- [flutter phoenix](https://pub.dev/packages/flutter_phoenix)
+- [flutter displaymode](https://pub.dev/packages/flutter_displaymode)
- [flutter launcher icons](https://pub.dev/packages/flutter_launcher_icons)
- [flutter native splash](https://pub.dev/packages/flutter_native_splash)
- [intl](https://pub.dev/packages/intl)
@@ -120,28 +52,12 @@ If you like the project and you want to contribute with the development, you can
- [dynamic color](https://pub.dev/packages/dynamic_color)
- [device info](https://pub.dev/packages/device_info)
- [fl chart](https://pub.dev/packages/fl_chart)
+- [flutter web browser](https://pub.dev/packages/flutter_web_browser)
- [flutter svg](https://pub.dev/packages/flutter_svg)
+- [bottom sheet](https://pub.dev/packages/bottom_sheet)
- [percent indicator](https://pub.dev/packages/percent_indicator)
-- [flutter markdown](https://pub.dev/packages/flutter_markdown)
-- [markdown](https://pub.dev/packages/markdown)
-- [html](https://pub.dev/packages/html)
-- [flutter html](https://pub.dev/packages/flutter_html)
-- [sqlite3 flutter libs](https://pub.dev/packages/sqlite3_flutter_libs)
-- [sqflite common ffi](https://pub.dev/packages/sqflite_common_ffi)
-- [window size](https://github.com/google/flutter-desktop-embedding)
-- [flutter split view](https://github.com/JGeek00/flutter_split_view) (forked from [here](https://pub.dev/packages/flutter_split_view))
-- [async](https://pub.dev/packages/async)
-- [sentry flutter](https://pub.dev/packages/sentry_flutter)
-- [flutter dotenv](https://pub.dev/packages/flutter_dotenv)
-- [flutter reorderable list](https://pub.dev/packages/flutter_reorderable_list)
-- [pie chart](https://pub.dev/packages/pie_chart)
-- [segmented button slide](https://pub.dev/packages/segmented_button_slide)
-- [timezone](https://pub.dev/packages/timezone)
-- [url launcher](https://pub.dev/packages/url_launcher)
-- [flutter custom tabs](https://pub.dev/packages/flutter_custom_tabs)
-- [shared preferences](https://pub.dev/packages/shared_preferences)
-- [window manager](https://pub.dev/packages/window_manager)
+- [store checker](https://pub.dev/packages/store_checker)
-##### Created by JGeek00
+##### Created by JGeek00
\ No newline at end of file
diff --git a/android/app/build.gradle b/android/app/build.gradle
index ab6291c..d93673c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -1,9 +1,3 @@
-plugins {
- id "com.android.application"
- id "kotlin-android"
- id "dev.flutter.flutter-gradle-plugin"
-}
-
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@@ -12,6 +6,11 @@ if (localPropertiesFile.exists()) {
}
}
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+ throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
@@ -22,16 +21,13 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
-def keystoreProperties = new Properties()
-def keystorePropertiesFile = rootProject.file('key.properties')
-if (keystorePropertiesFile.exists()) {
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
-}
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- namespace "com.jgeek00.adguard_home_manager"
- compileSdkVersion 35
- ndkVersion "26.1.10909125"
+ compileSdkVersion 33
+ ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@@ -47,25 +43,21 @@ android {
}
defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.jgeek00.adguard_home_manager"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 26
- targetSdkVersion 35
+ targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
- signingConfigs {
- release {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
- storePassword keystoreProperties['storePassword']
- }
- }
-
buildTypes {
release {
- signingConfig signingConfigs.release
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
}
}
}
@@ -75,5 +67,5 @@ flutter {
}
dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.20"
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 603fecc..dbe31f9 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -15,8 +15,7 @@
android:label="AdGuard Home Manager"
android:name="${applicationName}"
android:requestLegacyExternalStorage="true"
- android:icon="@mipmap/ic_launcher"
- android:enableOnBackInvokedCallback="true">
+ android:icon="@mipmap/ic_launcher">
-
-
-
-
-
\ No newline at end of file
+
+
+
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 036d09b..0000000
--- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..f6f931d
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index ee4fa4d..0000000
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
deleted file mode 100644
index 4d52a73..0000000
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png
deleted file mode 100644
index 29cc5f7..0000000
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index ee4fa4d..0000000
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..6730672
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 2ae3642..0000000
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
deleted file mode 100644
index 8a39f50..0000000
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png
deleted file mode 100644
index 16ace9d..0000000
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 2ae3642..0000000
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..fe7f25b
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 1c206bb..0000000
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
deleted file mode 100644
index e490246..0000000
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png
deleted file mode 100644
index 757f194..0000000
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1c206bb..0000000
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..75b70bb
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index aefe0b6..0000000
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
deleted file mode 100644
index 3599460..0000000
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png
deleted file mode 100644
index a642b78..0000000
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index aefe0b6..0000000
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d8c30a3
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index 68173f9..0000000
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
deleted file mode 100644
index 7d57305..0000000
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png
deleted file mode 100644
index 2a04fcd..0000000
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 68173f9..0000000
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..ab98328
--- /dev/null
+++ b/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,4 @@
+
+
+ #ffffff
+
\ No newline at end of file
diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml
deleted file mode 100644
index c5d5899..0000000
--- a/android/app/src/main/res/values/ic_launcher_background.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- #FFFFFF
-
\ No newline at end of file
diff --git a/android/build.gradle b/android/build.gradle
index bc157bd..61a47e7 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,3 +1,16 @@
+buildscript {
+ ext.kotlin_version = '1.6.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.2.2'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
allprojects {
repositories {
google()
@@ -13,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
-tasks.register("clean", Delete) {
+task clean(type: Delete) {
delete rootProject.buildDir
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 19cfad9..cb24abd 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/android/key.properties.sample b/android/key.properties.sample
deleted file mode 100644
index b51dc2c..0000000
--- a/android/key.properties.sample
+++ /dev/null
@@ -1,4 +0,0 @@
-storePassword= # keystore password #
-keyPassword= # keystore key password #
-keyAlias= # key alias #
-storeFile= # ./keystore-file-name.jks #
\ No newline at end of file
diff --git a/android/settings.gradle b/android/settings.gradle
index e8481f5..44e62bc 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,26 +1,11 @@
-pluginManagement {
- def flutterSdkPath = {
- def properties = new Properties()
- file("local.properties").withInputStream { properties.load(it) }
- def flutterSdkPath = properties.getProperty("flutter.sdk")
- assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
- return flutterSdkPath
- }
- settings.ext.flutterSdkPath = flutterSdkPath()
+include ':app'
- includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
- repositories {
- google()
- mavenCentral()
- gradlePluginPortal()
- }
-}
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
-plugins {
- id "dev.flutter.flutter-plugin-loader" version "1.0.0"
- id "com.android.application" version '8.6.0' apply false
- id "org.jetbrains.kotlin.android" version "1.8.20" apply false
-}
-
-include ":app"
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/assets/icon/icon-circle-256.png b/assets/icon/icon-circle-256.png
deleted file mode 100644
index 517e26a..0000000
Binary files a/assets/icon/icon-circle-256.png and /dev/null differ
diff --git a/assets/icon/icon-circle.ico b/assets/icon/icon-circle.ico
deleted file mode 100644
index e4da1bd..0000000
Binary files a/assets/icon/icon-circle.ico and /dev/null differ
diff --git a/assets/icon/icon-circle.png b/assets/icon/icon-circle.png
deleted file mode 100644
index 5b39396..0000000
Binary files a/assets/icon/icon-circle.png and /dev/null differ
diff --git a/assets/icon/icon-macos.png b/assets/icon/icon-macos.png
deleted file mode 100755
index c201d70..0000000
Binary files a/assets/icon/icon-macos.png and /dev/null differ
diff --git a/assets/screenshots/linux/clients.png b/assets/screenshots/linux/clients.png
deleted file mode 100644
index 5804d46..0000000
Binary files a/assets/screenshots/linux/clients.png and /dev/null differ
diff --git a/assets/screenshots/linux/home.png b/assets/screenshots/linux/home.png
deleted file mode 100644
index 6666046..0000000
Binary files a/assets/screenshots/linux/home.png and /dev/null differ
diff --git a/assets/screenshots/linux/logs.png b/assets/screenshots/linux/logs.png
deleted file mode 100644
index 2cf184f..0000000
Binary files a/assets/screenshots/linux/logs.png and /dev/null differ
diff --git a/debian/compile_deb.txt b/debian/compile_deb.txt
deleted file mode 100644
index 4a18706..0000000
--- a/debian/compile_deb.txt
+++ /dev/null
@@ -1 +0,0 @@
-https://pub.dev/packages/flutter_to_debian
\ No newline at end of file
diff --git a/debian/debian.yaml b/debian/debian.yaml
deleted file mode 100644
index 43a90f9..0000000
--- a/debian/debian.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-flutter_app:
- command: AdGuardHomeManager
- arch: x64
- parent: /usr/local/lib
-
-control:
- Package: AdGuardHomeManager
- Version: 2.20.1
- Architecture: amd64
- Essential: no
- Priority: optional
- Depends:
- Maintainer: JGeek00
- Description: AdGuard Home control app
\ No newline at end of file
diff --git a/debian/gui/adguard-home-manager.desktop b/debian/gui/adguard-home-manager.desktop
deleted file mode 100644
index a011591..0000000
--- a/debian/gui/adguard-home-manager.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=AdGuard Home Manager
-Comment=Manage your AdGuard Home server
-Exec=adguard-home-manager
-Icon=${SNAP}/meta/gui/adguard-home-manager.png
-Terminal=false
-Type=Application
-Categories=Utilities;
diff --git a/debian/gui/adguard-home-manager.png b/debian/gui/adguard-home-manager.png
deleted file mode 100644
index 5b39396..0000000
Binary files a/debian/gui/adguard-home-manager.png and /dev/null differ
diff --git a/devtools_options.yaml b/devtools_options.yaml
deleted file mode 100644
index 7e7e7f6..0000000
--- a/devtools_options.yaml
+++ /dev/null
@@ -1 +0,0 @@
-extensions:
diff --git a/ios/.gitignore b/ios/.gitignore
old mode 100755
new mode 100644
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
old mode 100755
new mode 100644
index 7c56964..9625e10
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 12.0
+ 11.0
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
old mode 100755
new mode 100644
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
old mode 100755
new mode 100644
diff --git a/ios/Podfile b/ios/Podfile
old mode 100755
new mode 100644
index 279576f..88359b2
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '12.0'
+# platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 2c2d827..9a238fd 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -2,91 +2,60 @@ PODS:
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
- - flutter_custom_tabs_ios (2.0.0):
- - Flutter
- flutter_native_splash (0.0.1):
- Flutter
+ - flutter_web_browser (0.17.1):
+ - Flutter
+ - FMDB (2.7.5):
+ - FMDB/standard (= 2.7.5)
+ - FMDB/standard (2.7.5)
- package_info_plus (0.4.5):
- Flutter
- - Sentry/HybridSDK (8.18.0):
- - SentryPrivate (= 8.18.0)
- - sentry_flutter (0.0.1):
+ - sqflite (0.0.2):
- Flutter
- - FlutterMacOS
- - Sentry/HybridSDK (= 8.18.0)
- - SentryPrivate (8.18.0)
- - sqflite (0.0.3):
- - Flutter
- - FlutterMacOS
- - sqlite3 (3.45.0):
- - sqlite3/common (= 3.45.0)
- - sqlite3/common (3.45.0)
- - sqlite3/fts5 (3.45.0):
- - sqlite3/common
- - sqlite3/perf-threadsafe (3.45.0):
- - sqlite3/common
- - sqlite3/rtree (3.45.0):
- - sqlite3/common
- - sqlite3_flutter_libs (0.0.1):
- - Flutter
- - sqlite3 (~> 3.45.0)
- - sqlite3/fts5
- - sqlite3/perf-threadsafe
- - sqlite3/rtree
+ - FMDB (>= 2.7.5)
- store_checker (0.0.1):
- Flutter
DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- - flutter_custom_tabs_ios (from `.symlinks/plugins/flutter_custom_tabs_ios/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
+ - flutter_web_browser (from `.symlinks/plugins/flutter_web_browser/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
- - sqflite (from `.symlinks/plugins/sqflite/darwin`)
- - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`)
+ - sqflite (from `.symlinks/plugins/sqflite/ios`)
- store_checker (from `.symlinks/plugins/store_checker/ios`)
SPEC REPOS:
trunk:
- - Sentry
- - SentryPrivate
- - sqlite3
+ - FMDB
EXTERNAL SOURCES:
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
- flutter_custom_tabs_ios:
- :path: ".symlinks/plugins/flutter_custom_tabs_ios/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
+ flutter_web_browser:
+ :path: ".symlinks/plugins/flutter_web_browser/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
- sentry_flutter:
- :path: ".symlinks/plugins/sentry_flutter/ios"
sqflite:
- :path: ".symlinks/plugins/sqflite/darwin"
- sqlite3_flutter_libs:
- :path: ".symlinks/plugins/sqlite3_flutter_libs/ios"
+ :path: ".symlinks/plugins/sqflite/ios"
store_checker:
:path: ".symlinks/plugins/store_checker/ios"
SPEC CHECKSUMS:
- device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
- Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
- flutter_custom_tabs_ios: 62439c843b2691aae516fd50119a01eb9755fff7
+ device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
- package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
- Sentry: 8984a4ffb2b9bd2894d74fb36e6f5833865bc18e
- sentry_flutter: c87a0556eeb6cbf7f9f924d30e878bdedf22d364
- SentryPrivate: 2f0c9ba4c3fc993f70eab6ca95673509561e0085
- sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
- sqlite3: f307b6291c4db7b5086c38d6237446b98a738581
- sqlite3_flutter_libs: aeb4d37509853dfa79d9b59386a2dac5dd079428
+ flutter_web_browser: 7bccaafbb0c5b8862afe7bcd158f15557109f61f
+ FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+ package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
+ sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
store_checker: 359c5051d9ec30ff0a8fa39eb5ec9df021bb745d
-PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011
+PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
-COCOAPODS: 1.14.3
+COCOAPODS: 1.11.2
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
old mode 100755
new mode 100644
index 00edeae..972c5ab
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 54;
+ objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
@@ -68,6 +68,7 @@
65533F0C0783FDE34AE79B0A /* Pods-Runner.release.xcconfig */,
69C2CC4A6DE17506FC5C0F13 /* Pods-Runner.profile.xcconfig */,
);
+ name = Pods;
path = Pods;
sourceTree = "";
};
@@ -155,8 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 1430;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -217,12 +217,10 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
- "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@@ -233,7 +231,6 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -325,7 +322,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -336,7 +332,6 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -345,7 +340,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -363,22 +358,15 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 38Z3B9TJTR;
ENABLE_BITCODE = NO;
- ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = Runner/Info.plist;
- INFOPLIST_KEY_CFBundleDisplayName = "AdGuard Home";
- INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.jgeek00.adguardHomeManager;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.adguardHomeManager;
PRODUCT_NAME = "$(TARGET_NAME)";
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = NO;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
@@ -406,7 +394,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -417,7 +404,6 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -432,7 +418,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -463,7 +449,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -474,7 +459,6 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -483,7 +467,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -503,23 +487,16 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 38Z3B9TJTR;
ENABLE_BITCODE = NO;
- ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = Runner/Info.plist;
- INFOPLIST_KEY_CFBundleDisplayName = "AdGuard Home";
- INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.jgeek00.adguardHomeManager;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.adguardHomeManager;
PRODUCT_NAME = "$(TARGET_NAME)";
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = NO;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
@@ -533,22 +510,15 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 38Z3B9TJTR;
ENABLE_BITCODE = NO;
- ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = Runner/Info.plist;
- INFOPLIST_KEY_CFBundleDisplayName = "AdGuard Home";
- INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.jgeek00.adguardHomeManager;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.adguardHomeManager;
PRODUCT_NAME = "$(TARGET_NAME)";
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = NO;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
old mode 100755
new mode 100644
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
old mode 100755
new mode 100644
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
old mode 100755
new mode 100644
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
old mode 100755
new mode 100644
index a6b826d..c87d15a
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
-
- CADisableMinimumFrameDurationOnPhone
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleDisplayName
- AdGuard Home
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- adguardHomeManager
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- $(FLUTTER_BUILD_NAME)
- CFBundleSignature
- ????
- CFBundleVersion
- $(FLUTTER_BUILD_NUMBER)
- LSRequiresIPhoneOS
-
- UIApplicationSupportsIndirectInputEvents
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UIStatusBarHidden
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
-
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ AdGuard Home Manager
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ adguard_home_manager
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+ UIStatusBarHidden
+
+
diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
old mode 100755
new mode 100644
diff --git a/l10n.yaml b/l10n.yaml
index 764d005..4e6692e 100644
--- a/l10n.yaml
+++ b/l10n.yaml
@@ -1,4 +1,3 @@
arb-dir: lib/l10n
template-arb-file: app_en.arb
-output-localization-file: app_localizations.dart
-untranslated-messages-file: untranslated.json
\ No newline at end of file
+output-localization-file: app_localizations.dart
\ No newline at end of file
diff --git a/lib/base.dart b/lib/base.dart
new file mode 100644
index 0000000..327b6ca
--- /dev/null
+++ b/lib/base.dart
@@ -0,0 +1,144 @@
+// ignore_for_file: use_build_context_synchronously, depend_on_referenced_packages
+
+import 'dart:async';
+
+import 'package:flutter/material.dart';
+import 'package:animations/animations.dart';
+import 'package:flutter_web_browser/flutter_web_browser.dart';
+import 'package:provider/provider.dart';
+import 'package:store_checker/store_checker.dart';
+import 'package:flutter/services.dart';
+
+import 'package:adguard_home_manager/widgets/bottom_nav_bar.dart';
+import 'package:adguard_home_manager/widgets/update_modal.dart';
+
+import 'package:adguard_home_manager/providers/app_config_provider.dart';
+import 'package:adguard_home_manager/models/github_release.dart';
+import 'package:adguard_home_manager/services/http_requests.dart';
+import 'package:adguard_home_manager/models/app_screen.dart';
+import 'package:adguard_home_manager/config/app_screens.dart';
+import 'package:adguard_home_manager/providers/servers_provider.dart';
+
+class Base extends StatefulWidget {
+ final AppConfigProvider appConfigProvider;
+
+ const Base({
+ Key? key,
+ required this.appConfigProvider,
+ }) : super(key: key);
+
+ @override
+ State createState() => _BaseState();
+}
+
+class _BaseState extends State with WidgetsBindingObserver {
+ int selectedScreen = 0;
+
+ bool updateExists(String appVersion, String gitHubVersion) {
+ final List appVersionSplit = List.from(appVersion.split('.').map((e) => int.parse(e)));
+ final List gitHubVersionSplit = List.from(gitHubVersion.split('.').map((e) => int.parse(e)));
+
+ if (gitHubVersionSplit[0] > appVersionSplit[0]) {
+ return true;
+ }
+ else if (gitHubVersionSplit[0] == appVersionSplit[0] && gitHubVersionSplit[1] > appVersionSplit[1]) {
+ return true;
+ }
+ else if (gitHubVersionSplit[0] == appVersionSplit[0] && gitHubVersionSplit[1] == appVersionSplit[1] && gitHubVersionSplit[2] > appVersionSplit[2]) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ Future checkInstallationSource() async {
+ Source installationSource = await StoreChecker.getSource;
+ if (installationSource != Source.IS_INSTALLED_FROM_PLAY_STORE) {
+ final result = await checkAppUpdatesGitHub();
+ if (result['result'] == 'success') {
+ if (updateExists(widget.appConfigProvider.getAppInfo!.version, result['body'].tagName)) {
+ return result['body'];
+ }
+ }
+ }
+ return null;
+ }
+
+ void download(String link, String version) async {
+ FlutterWebBrowser.openWebPage(
+ url: link,
+ customTabsOptions: const CustomTabsOptions(
+ instantAppsEnabled: true,
+ showTitle: true,
+ urlBarHidingEnabled: false,
+ ),
+ safariVCOptions: const SafariViewControllerOptions(
+ barCollapsingEnabled: true,
+ dismissButtonStyle: SafariViewControllerDismissButtonStyle.close,
+ modalPresentationCapturesStatusBarAppearance: true,
+ )
+ );
+ }
+
+ @override
+ void initState() {
+ WidgetsBinding.instance.addObserver(this);
+
+ super.initState();
+
+ WidgetsBinding.instance.addPostFrameCallback((_) async {
+ final result = await checkInstallationSource();
+
+ if (result != null && widget.appConfigProvider.doNotRememberVersion != result.tagName) {
+ await showDialog(
+ context: context,
+ builder: (context) => UpdateModal(
+ gitHubRelease: result,
+ onDownload: download,
+ ),
+ );
+ }
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final serversProvider = Provider.of(context);
+ final appConfigProvider = Provider.of(context);
+
+ List screens = serversProvider.selectedServer != null
+ ? screensServerConnected
+ : screensSelectServer;
+
+ return AnnotatedRegion(
+ value: SystemUiOverlayStyle(
+ statusBarColor: Colors.transparent,
+ statusBarBrightness: Theme.of(context).brightness == Brightness.light
+ ? Brightness.light
+ : Brightness.dark,
+ statusBarIconBrightness: Theme.of(context).brightness == Brightness.light
+ ? Brightness.dark
+ : Brightness.light,
+ systemNavigationBarColor: Theme.of(context).scaffoldBackgroundColor,
+ systemNavigationBarIconBrightness: Theme.of(context).brightness == Brightness.light
+ ? Brightness.dark
+ : Brightness.light,
+ ),
+ child: Scaffold(
+ body: PageTransitionSwitcher(
+ duration: const Duration(milliseconds: 200),
+ transitionBuilder: (
+ (child, primaryAnimation, secondaryAnimation) => FadeThroughTransition(
+ animation: primaryAnimation,
+ secondaryAnimation: secondaryAnimation,
+ child: child,
+ )
+ ),
+ child: screens[appConfigProvider.selectedScreen].body,
+ ),
+ bottomNavigationBar: const BottomNavBar(),
+ )
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/classes/http_client.dart b/lib/classes/http_client.dart
deleted file mode 100644
index d64e1d1..0000000
--- a/lib/classes/http_client.dart
+++ /dev/null
@@ -1,216 +0,0 @@
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:adguard_home_manager/models/server.dart';
-
-enum ExceptionType { socket, timeout, handshake, http, unknown }
-
-class HttpResponse {
- final bool successful;
- final String? body;
- final int? statusCode;
- final ExceptionType? exception;
-
- const HttpResponse({
- required this.successful,
- required this.body,
- required this.statusCode,
- this.exception,
- });
-}
-
-String getConnectionString({
- required Server server,
- required String urlPath,
-}) {
- return "${server.connectionMethod}://${server.domain}${server.port != null ? ':${server.port}' : ""}${server.path ?? ""}/control$urlPath";
-}
-
-class HttpRequestClient {
- static Future get({
- required String urlPath,
- required Server server,
- int timeout = 10,
- }) async{
- final String connectionString = getConnectionString(server: server, urlPath: urlPath);
- try {
- HttpClient httpClient = HttpClient();
- HttpClientRequest request = await httpClient.getUrl(Uri.parse(connectionString));
- if (server.authToken != null) {
- request.headers.set('Authorization', 'Basic ${server.authToken}');
- }
- HttpClientResponse response = await request.close().timeout(
- Duration(seconds: timeout)
- );
- String reply = await response.transform(utf8.decoder).join();
- httpClient.close();
- return HttpResponse(
- successful: response.statusCode >= 400 ? false : true,
- body: reply,
- statusCode: response.statusCode
- );
- } on SocketException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.socket
- );
- } on TimeoutException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.timeout
- );
- } on HandshakeException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.handshake
- );
- } on HttpException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.http
- );
- } catch (e) {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.unknown
- );
- }
- }
-
- static Future post({
- required String urlPath,
- required Server server,
- dynamic body,
- int timeout = 10,
- }) async{
- final String connectionString = getConnectionString(server: server, urlPath: urlPath);
- try {
- HttpClient httpClient = HttpClient();
- HttpClientRequest request = await httpClient.postUrl(Uri.parse(connectionString));
- if (server.authToken != null) {
- request.headers.set('Authorization', 'Basic ${server.authToken}');
- }
- request.headers.set('content-type', 'application/json');
- request.add(utf8.encode(json.encode(body)));
- HttpClientResponse response = await request.close().timeout(
- Duration(seconds: timeout)
- );
- String reply = await response.transform(utf8.decoder).join();
- httpClient.close();
- return HttpResponse(
- successful: response.statusCode >= 400 ? false : true,
- body: reply,
- statusCode: response.statusCode
- );
- } on SocketException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.socket
- );
- } on TimeoutException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.timeout
- );
- } on HttpException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.http
- );
- } on HandshakeException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.handshake
- );
- } catch (e) {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.unknown
- );
- }
- }
-
- static Future put({
- required String urlPath,
- required Server server,
- dynamic body,
- int timeout = 10,
- }) async{
- final String connectionString = getConnectionString(server: server, urlPath: urlPath);
- try {
- HttpClient httpClient = HttpClient();
- HttpClientRequest request = await httpClient.putUrl(Uri.parse(connectionString));
- if (server.authToken != null) {
- request.headers.set('Authorization', 'Basic ${server.authToken}');
- }
- request.headers.set('content-type', 'application/json');
- request.add(utf8.encode(json.encode(body)));
- HttpClientResponse response = await request.close().timeout(
- Duration(seconds: timeout)
- );
- String reply = await response.transform(utf8.decoder).join();
- httpClient.close();
- return HttpResponse(
- successful: response.statusCode >= 400 ? false : true,
- body: reply,
- statusCode: response.statusCode
- );
- } on SocketException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.socket
- );
- } on TimeoutException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.timeout
- );
- } on HttpException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.http
- );
- } on HandshakeException {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.handshake
- );
- } catch (e) {
- return const HttpResponse(
- successful: false,
- body: null,
- statusCode: null,
- exception: ExceptionType.unknown
- );
- }
- }
-}
\ No newline at end of file
diff --git a/lib/classes/process_modal.dart b/lib/classes/process_modal.dart
index ac3db92..6febebb 100644
--- a/lib/classes/process_modal.dart
+++ b/lib/classes/process_modal.dart
@@ -1,14 +1,20 @@
-import 'package:adguard_home_manager/config/globals.dart';
import 'package:flutter/material.dart';
import 'package:adguard_home_manager/widgets/process_dialog.dart';
class ProcessModal {
+ late BuildContext context;
+
+ ProcessModal({
+ required this.context
+ });
+
void open(String message) async {
await Future.delayed(const Duration(seconds: 0), () => {
showDialog(
- context: globalNavigatorKey.currentContext!,
- builder: (ctx) {
+ context: context,
+ builder: (c) {
+ context = c;
return ProcessDialog(
message: message,
);
@@ -20,6 +26,6 @@ class ProcessModal {
}
void close() {
- Navigator.pop(globalNavigatorKey.currentContext!);
+ Navigator.pop(context);
}
}
\ No newline at end of file
diff --git a/lib/config/app_screens.dart b/lib/config/app_screens.dart
index 2326e31..1835dc4 100644
--- a/lib/config/app_screens.dart
+++ b/lib/config/app_screens.dart
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
-import 'package:adguard_home_manager/screens/clients/clients.dart';
-import 'package:adguard_home_manager/screens/connect/connect.dart';
import 'package:adguard_home_manager/screens/filters/filters.dart';
-import 'package:adguard_home_manager/screens/home/home.dart';
import 'package:adguard_home_manager/screens/logs/logs.dart';
+import 'package:adguard_home_manager/screens/connect/connect.dart';
+import 'package:adguard_home_manager/screens/home/home.dart';
+import 'package:adguard_home_manager/screens/clients/clients.dart';
import 'package:adguard_home_manager/screens/settings/settings.dart';
import 'package:adguard_home_manager/models/app_screen.dart';
@@ -13,12 +13,12 @@ List screensSelectServer = [
const AppScreen(
name: "connect",
icon: Icons.link_rounded,
- child: Connect()
+ body: Connect(),
),
const AppScreen(
name: "settings",
icon: Icons.settings_rounded,
- child: Settings()
+ body: Settings()
)
];
@@ -26,26 +26,26 @@ List screensServerConnected = [
const AppScreen(
name: "home",
icon: Icons.home_rounded,
- child: Home()
+ body: Home(),
),
const AppScreen(
name: "clients",
icon: Icons.devices,
- child: Clients()
+ body: Clients()
),
const AppScreen(
name: "logs",
icon: Icons.list_alt_rounded,
- child: Logs()
+ body: Logs(),
),
const AppScreen(
name: "filters",
icon: Icons.shield_rounded,
- child: Filters()
+ body: Filters(),
),
const AppScreen(
name: "settings",
icon: Icons.settings_rounded,
- child: Settings()
+ body: Settings()
)
];
\ No newline at end of file
diff --git a/lib/config/globals.dart b/lib/config/globals.dart
deleted file mode 100644
index a955a77..0000000
--- a/lib/config/globals.dart
+++ /dev/null
@@ -1,4 +0,0 @@
-import 'package:flutter/material.dart';
-
-final GlobalKey scaffoldMessengerKey = GlobalKey();
-final GlobalKey globalNavigatorKey = GlobalKey();
\ No newline at end of file
diff --git a/lib/config/home_top_items_default_order.dart b/lib/config/home_top_items_default_order.dart
deleted file mode 100644
index a5a23f0..0000000
--- a/lib/config/home_top_items_default_order.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-import 'dart:convert';
-
-import 'package:adguard_home_manager/constants/enums.dart';
-
-final List homeTopItemsDefaultOrder = [
- HomeTopItems.queriedDomains,
- HomeTopItems.blockedDomains,
- HomeTopItems.recurrentClients,
- HomeTopItems.topUpstreams,
- HomeTopItems.avgUpstreamResponseTime
-];
-
-final String homeTopItemsDefaultOrderString = jsonEncode(
- List.from(homeTopItemsDefaultOrder.map((e) => e.name))
-);
\ No newline at end of file
diff --git a/lib/config/minimum_server_version.dart b/lib/config/minimum_server_version.dart
deleted file mode 100644
index f554cb9..0000000
--- a/lib/config/minimum_server_version.dart
+++ /dev/null
@@ -1,4 +0,0 @@
-class MinimumServerVersion {
- static const String stable = "v0.107.28";
- static const String beta = "v0.108.0-b.33";
-}
\ No newline at end of file
diff --git a/lib/config/sizes.dart b/lib/config/sizes.dart
deleted file mode 100644
index 0fc2640..0000000
--- a/lib/config/sizes.dart
+++ /dev/null
@@ -1 +0,0 @@
-const double desktopBreakpoint = 1000;
\ No newline at end of file
diff --git a/lib/config/theme.dart b/lib/config/theme.dart
index eba0b9c..532c4c8 100644
--- a/lib/config/theme.dart
+++ b/lib/config/theme.dart
@@ -1,8 +1,12 @@
import 'package:flutter/material.dart';
+import 'package:adguard_home_manager/constants/adguard_green_color.dart';
+
ThemeData lightTheme(ColorScheme? dynamicColorScheme) => ThemeData(
useMaterial3: true,
- colorScheme: dynamicColorScheme,
+ colorScheme: dynamicColorScheme ?? ColorScheme.fromSwatch(primarySwatch: adguardGreenColor),
+ primaryColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor,
+ scaffoldBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.background : Colors.white,
snackBarTheme: SnackBarThemeData(
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
@@ -10,94 +14,84 @@ ThemeData lightTheme(ColorScheme? dynamicColorScheme) => ThemeData(
),
elevation: 4,
),
- brightness: Brightness.light, listTileTheme: ListTileThemeData(
+ brightness: Brightness.light,
+ dialogBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.surface : Colors.white,
+ textTheme: const TextTheme(
+ bodyText1: TextStyle(
+ color: Colors.black54
+ ),
+ bodyText2: TextStyle(
+ color: Colors.black
+ ),
+ ),
+ navigationBarTheme: NavigationBarThemeData(
+ indicatorColor: dynamicColorScheme != null ? dynamicColorScheme.secondaryContainer : adguardGreenColor,
+ iconTheme: MaterialStateProperty.all(
+ IconThemeData(
+ color: dynamicColorScheme != null ? dynamicColorScheme.onSecondaryContainer : adguardGreenColor,
+ )
+ )
+ ),
+ floatingActionButtonTheme: FloatingActionButtonThemeData(
+ foregroundColor: dynamicColorScheme != null ? dynamicColorScheme.onPrimaryContainer : Colors.white,
+ backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primaryContainer : adguardGreenColor
+ ),
+ textButtonTheme: TextButtonThemeData(
+ style: ButtonStyle(
+ foregroundColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor
+ ),
+ overlayColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.primary.withOpacity(0.1) : adguardGreenColor.withOpacity(0.1)
+ ),
+ ),
+ ),
+ dividerColor: Colors.black12,
+ listTileTheme: ListTileThemeData(
tileColor: Colors.transparent,
textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1),
),
- cardTheme: CardTheme(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
+ checkboxTheme: CheckboxThemeData(
+ checkColor: MaterialStateProperty.all(Colors.white),
+ fillColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor
+ ),
),
- popupMenuTheme: PopupMenuThemeData(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
+ tabBarTheme: TabBarTheme(
+ unselectedLabelColor: Colors.black,
+ labelColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor,
+ indicator: UnderlineTabIndicator(
+ borderSide: BorderSide(
+ color: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor,
+ width: 2
+ )
+ )
),
- navigationBarTheme: NavigationBarThemeData(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
+ radioTheme: RadioThemeData(
+ fillColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor
+ ),
),
- dialogTheme: DialogTheme(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
- ),
- // DISABLE PREDICTIVE BACK GESTURE
- // pageTransitionsTheme: const PageTransitionsTheme(
- // builders: {
- // TargetPlatform.android: PredictiveBackPageTransitionsBuilder()
- // }
- // )
+ androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
);
ThemeData darkTheme(ColorScheme? dynamicColorScheme) => ThemeData(
useMaterial3: true,
- colorScheme: dynamicColorScheme,
- snackBarTheme: SnackBarThemeData(
- behavior: SnackBarBehavior.floating,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(5)
- ),
- elevation: 4,
- ),
- brightness: Brightness.dark,
- listTileTheme: ListTileThemeData(
- tileColor: Colors.transparent,
- textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
- iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
- ),
- cardTheme: CardTheme(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
- ),
- popupMenuTheme: PopupMenuThemeData(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
+ colorScheme: dynamicColorScheme ?? ColorScheme.fromSwatch(primarySwatch: adguardGreenColor).copyWith(
+ brightness: Brightness.dark
),
+ primaryColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor,
+ scaffoldBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.background :const Color.fromRGBO(18, 18, 18, 1),
+ dialogBackgroundColor: dynamicColorScheme != null ? dynamicColorScheme.background : const Color.fromRGBO(44, 44, 44, 1),
navigationBarTheme: NavigationBarThemeData(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
+ indicatorColor: dynamicColorScheme != null ? dynamicColorScheme.secondaryContainer : adguardGreenColor,
+ iconTheme: MaterialStateProperty.all(
+ IconThemeData(
+ color: dynamicColorScheme != null ? dynamicColorScheme.onSecondaryContainer : adguardGreenColor,
+ )
+ )
),
- dialogTheme: DialogTheme(
- surfaceTintColor: dynamicColorScheme?.surfaceTint
- ),
- // DISABLE PREDICTIVE BACK GESTURE
- // pageTransitionsTheme: const PageTransitionsTheme(
- // builders: {
- // TargetPlatform.android: PredictiveBackPageTransitionsBuilder()
- // }
- // )
-);
-
-ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData(
- useMaterial3: true,
- colorSchemeSeed: primaryColor,
- snackBarTheme: SnackBarThemeData(
- behavior: SnackBarBehavior.floating,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(5)
- ),
- elevation: 4,
- ),
- listTileTheme: const ListTileThemeData(
- tileColor: Colors.transparent,
- textColor: Color.fromRGBO(117, 117, 117, 1),
- iconColor: Color.fromRGBO(117, 117, 117, 1),
- ),
- brightness: Brightness.light,
- // DISABLE PREDICTIVE BACK GESTURE
- // pageTransitionsTheme: const PageTransitionsTheme(
- // builders: {
- // TargetPlatform.android: PredictiveBackPageTransitionsBuilder()
- // }
- // )
-);
-
-ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
- useMaterial3: true,
- colorSchemeSeed: primaryColor,
snackBarTheme: SnackBarThemeData(
contentTextStyle: const TextStyle(
color: Colors.white
@@ -108,16 +102,258 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
),
elevation: 4,
),
+ floatingActionButtonTheme: FloatingActionButtonThemeData(
+ foregroundColor: dynamicColorScheme != null ? dynamicColorScheme.onPrimaryContainer : Colors.white,
+ backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primaryContainer : adguardGreenColor
+ ),
+ textButtonTheme: TextButtonThemeData(
+ style: ButtonStyle(
+ foregroundColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor
+ ),
+ overlayColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.primary.withOpacity(0.1) : adguardGreenColor.withOpacity(0.1)
+ ),
+ ),
+ ),
+ brightness: Brightness.dark,
+ textTheme: const TextTheme(
+ bodyText1: TextStyle(
+ color: Colors.white70
+ ),
+ bodyText2: TextStyle(
+ color: Colors.white
+ ),
+ ),
+ dividerColor: Colors.white12,
+ listTileTheme: ListTileThemeData(
+ tileColor: Colors.transparent,
+ textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
+ iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1),
+ ),
+ checkboxTheme: CheckboxThemeData(
+ checkColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.onPrimary : Colors.white
+ ),
+ fillColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.onSurface : adguardGreenColor
+ ),
+ ),
+ tabBarTheme: TabBarTheme(
+ unselectedLabelColor: Colors.white,
+ labelColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor,
+ indicator: UnderlineTabIndicator(
+ borderSide: BorderSide(
+ color: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor,
+ width: 2
+ )
+ )
+ ),
+ radioTheme: RadioThemeData(
+ fillColor: MaterialStateProperty.all(
+ dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor
+ ),
+ ),
+ androidOverscrollIndicator: AndroidOverscrollIndicator.stretch
+);
+
+ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData(
+ useMaterial3: true,
+ primaryColor: primaryColor,
+ appBarTheme: AppBarTheme(
+ color: Colors.white,
+ foregroundColor: Colors.black,
+ elevation: 0,
+ surfaceTintColor: primaryColor
+ ),
+ snackBarTheme: SnackBarThemeData(
+ behavior: SnackBarBehavior.floating,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(5)
+ ),
+ elevation: 4,
+ ),
+ brightness: Brightness.light,
+ scaffoldBackgroundColor: Colors.white,
+ dialogBackgroundColor: Colors.white,
+ textTheme: const TextTheme(
+ bodyText1: TextStyle(
+ color: Colors.black54
+ ),
+ bodyText2: TextStyle(
+ color: Colors.black
+ ),
+ ),
+ floatingActionButtonTheme: FloatingActionButtonThemeData(
+ foregroundColor: Colors.white,
+ backgroundColor: primaryColor
+ ),
+ textButtonTheme: TextButtonThemeData(
+ style: ButtonStyle(
+ foregroundColor: MaterialStateProperty.all(primaryColor),
+ overlayColor: MaterialStateProperty.all(primaryColor.withOpacity(0.1))
+ ),
+ ),
+ elevatedButtonTheme: ElevatedButtonThemeData(
+ style: ButtonStyle(
+ foregroundColor: MaterialStateProperty.all(primaryColor),
+ surfaceTintColor: MaterialStateProperty.all(primaryColor),
+ overlayColor: MaterialStateProperty.all(primaryColor.shade50),
+ )
+ ),
+ cardTheme: CardTheme(
+ surfaceTintColor: primaryColor
+ ),
+ navigationBarTheme: NavigationBarThemeData(
+ surfaceTintColor: primaryColor,
+ indicatorColor: primaryColor
+ ),
+ inputDecorationTheme: InputDecorationTheme(
+ floatingLabelStyle: TextStyle(
+ color: primaryColor
+ ),
+ iconColor: Colors.grey,
+ focusedBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(10),
+ borderSide: BorderSide(
+ color: primaryColor,
+ width: 2
+ )
+ )
+ ),
+ textSelectionTheme: TextSelectionThemeData(
+ cursorColor: primaryColor
+ ),
+ dividerColor: Colors.black12,
+ listTileTheme: const ListTileThemeData(
+ tileColor: Colors.transparent,
+ textColor: Color.fromRGBO(117, 117, 117, 1),
+ iconColor: Color.fromRGBO(117, 117, 117, 1),
+ ),
+ checkboxTheme: CheckboxThemeData(
+ checkColor: MaterialStateProperty.all(Colors.white),
+ fillColor: MaterialStateProperty.all(primaryColor),
+ ),
+ tabBarTheme: TabBarTheme(
+ unselectedLabelColor: Colors.black,
+ labelColor: primaryColor,
+ indicator: UnderlineTabIndicator(
+ borderSide: BorderSide(
+ color: primaryColor,
+ width: 2
+ )
+ )
+ ),
+ progressIndicatorTheme: ProgressIndicatorThemeData(
+ color: primaryColor
+ ),
+ indicatorColor: primaryColor,
+ radioTheme: RadioThemeData(
+ fillColor: MaterialStateProperty.all(primaryColor),
+ ),
+ androidOverscrollIndicator: AndroidOverscrollIndicator.stretch,
+);
+
+ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData(
+ useMaterial3: true,
+ primaryColor: primaryColor,
+ scaffoldBackgroundColor: const Color.fromRGBO(18, 18, 18, 1),
+ navigationBarTheme: NavigationBarThemeData(
+ indicatorColor: primaryColor,
+ surfaceTintColor: primaryColor
+ ),
+ dialogTheme: DialogTheme(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(30)
+ )
+ ),
+ appBarTheme: AppBarTheme(
+ color: const Color.fromRGBO(18, 18, 18, 1),
+ foregroundColor: Colors.white,
+ elevation: 0,
+ surfaceTintColor: primaryColor
+ ),
+ dialogBackgroundColor: const Color.fromRGBO(44, 44, 44, 1),
+ snackBarTheme: SnackBarThemeData(
+ contentTextStyle: const TextStyle(
+ color: Colors.white
+ ),
+ behavior: SnackBarBehavior.floating,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(5)
+ ),
+ elevation: 4,
+ ),
+ floatingActionButtonTheme: FloatingActionButtonThemeData(
+ foregroundColor: Colors.white,
+ backgroundColor: primaryColor
+ ),
+ textButtonTheme: TextButtonThemeData(
+ style: ButtonStyle(
+ foregroundColor: MaterialStateProperty.all(primaryColor),
+ overlayColor: MaterialStateProperty.all(primaryColor.withOpacity(0.1))
+ ),
+ ),
+ elevatedButtonTheme: ElevatedButtonThemeData(
+ style: ButtonStyle(
+ foregroundColor: MaterialStateProperty.all(primaryColor),
+ surfaceTintColor: MaterialStateProperty.all(primaryColor),
+ overlayColor: MaterialStateProperty.all(primaryColor.shade50),
+ )
+ ),
+ cardTheme: CardTheme(
+ surfaceTintColor: primaryColor
+ ),
+ inputDecorationTheme: InputDecorationTheme(
+ floatingLabelStyle: TextStyle(
+ color: primaryColor
+ ),
+ iconColor: Colors.grey,
+ focusedBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(10),
+ borderSide: BorderSide(
+ color: primaryColor,
+ )
+ )
+ ),
+ checkboxTheme: CheckboxThemeData(
+ checkColor: MaterialStateProperty.all(Colors.white),
+ fillColor: MaterialStateProperty.all(primaryColor),
+ ),
listTileTheme: const ListTileThemeData(
tileColor: Colors.transparent,
textColor: Color.fromRGBO(187, 187, 187, 1),
iconColor: Color.fromRGBO(187, 187, 187, 1),
),
+ textSelectionTheme: TextSelectionThemeData(
+ cursorColor: primaryColor
+ ),
brightness: Brightness.dark,
- // DISABLE PREDICTIVE BACK GESTURE
- // pageTransitionsTheme: const PageTransitionsTheme(
- // builders: {
- // TargetPlatform.android: PredictiveBackPageTransitionsBuilder()
- // }
- // )
+ textTheme: const TextTheme(
+ bodyText1: TextStyle(
+ color: Colors.white70
+ ),
+ bodyText2: TextStyle(
+ color: Colors.white
+ ),
+ ),
+ dividerColor: Colors.white12,
+ tabBarTheme: TabBarTheme(
+ unselectedLabelColor: Colors.white,
+ labelColor: primaryColor,
+ indicator: UnderlineTabIndicator(
+ borderSide: BorderSide(
+ color: primaryColor,
+ width: 2
+ )
+ )
+ ),
+ progressIndicatorTheme: ProgressIndicatorThemeData(
+ color: primaryColor
+ ),
+ indicatorColor: primaryColor,
+ radioTheme: RadioThemeData(
+ fillColor: MaterialStateProperty.all(primaryColor),
+ ),
+ androidOverscrollIndicator: AndroidOverscrollIndicator.stretch
);
\ No newline at end of file
diff --git a/lib/constants/enums.dart b/lib/constants/enums.dart
deleted file mode 100644
index 569db37..0000000
--- a/lib/constants/enums.dart
+++ /dev/null
@@ -1,3 +0,0 @@
-enum LoadStatus { loading, loaded, error }
-enum HomeTopItems { queriedDomains, blockedDomains, recurrentClients, topUpstreams, avgUpstreamResponseTime }
-enum CustomRulesSorting { topBottom, bottomTop }
\ No newline at end of file
diff --git a/lib/constants/regexps.dart b/lib/constants/regexps.dart
deleted file mode 100644
index e882913..0000000
--- a/lib/constants/regexps.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-class Regexps {
- static final wildcardDomain = RegExp(r'^(\*\.)?(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,10}$');
- static final domain = RegExp(r'^((?:(?:[a-zA-Z]{1})|(?:[a-zA-Z]{1}[a-zA-Z]{1})|(?:[a-zA-Z]{1}[0-9]{1})|(?:[0-9]{1}[a-zA-Z]{1})|(?:[a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\.)+([a-zA-Z]{2,10}|[a-zA-Z0-9-]{2,30}\.[a-zA-Z]{2,10})$');
- static final ipv4Address = RegExp(r'^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$');
- static final ipv6Address = RegExp(r'(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))');
- static final subroute = RegExp(r'^\/\b([A-Za-z0-9_\-~/]*)[^\/|\.|\:]$');
- static final macAddress = RegExp(r'^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$');
- static final url = RegExp(r'^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})$');
- static final certificate = RegExp(r'(-{3,}(\bBEGIN CERTIFICATE\b))|(-{3,}-{3,}(\END CERTIFICATE\b)-{3,})', multiLine: true);
- static final privateKey = RegExp(r'(-{3,}(\bBEGIN\b).*(PRIVATE KEY\b))|(-{3,}-{3,}(\bEND\b).*(PRIVATE KEY\b)-{3,})', multiLine: true);
- static final path = RegExp(r'^(\/{0,1}(?!\/))[A-Za-z0-9\/\-_]+(\.([a-zA-Z]+))?$');
-}
\ No newline at end of file
diff --git a/lib/constants/routes_names.dart b/lib/constants/routes_names.dart
deleted file mode 100644
index fa0b07c..0000000
--- a/lib/constants/routes_names.dart
+++ /dev/null
@@ -1,31 +0,0 @@
-class RoutesNames {
- static const String connect = "/connect";
-
- static const String home = "/home";
- static const String queriedDomains = "/home/queried-domains";
- static const String blockedDomains = "/home/blocked-domains";
- static const String recurrentClients = "/home/recurrent-clients";
-
- static const String clients = "/clients";
- static const String clientsList = "/clients/list";
- static const String clientPlaceholder = "/clients/list/placeholder";
- static const String client = "/clients/list:id";
-
- static const String logs = "/logs";
-
- static const String filters = "/filters";
-
- static const String settings = "/settings";
- static const String safeSearch = "/settings/safe-search";
- static const String accessSettings = "/settings/access-settigs";
- static const String dhcpSettings = "/settings/dhcp-settings";
- static const String dnsSettings = "/settings/dns-settings";
- static const String encryptionSettings = "/settings/encryption-settings";
- static const String dnsRewrites = "/settings/dns-rewrites";
- static const String serverUpdates = "/settings/server-updates";
- static const String serverInfo = "/settings/server-info";
- static const String customization = "/settings/customization";
- static const String servers = "/settings/servers";
- static const String generalSettings = "/settings/general-settings";
- static const String advancedSettings = "/settings/advanced-settings";
-}
\ No newline at end of file
diff --git a/lib/constants/services.dart b/lib/constants/services.dart
new file mode 100644
index 0000000..a71a5c2
--- /dev/null
+++ b/lib/constants/services.dart
@@ -0,0 +1,142 @@
+const List