Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge dev branch to main branch #996

Merged
merged 16 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/bug-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ body:
- type: textarea
attributes:
label: Steps to reproduce
description: Add the steps to reproduce this bug including your environment.
description: Add the steps to reproduce this bug, including your environment.
placeholder: Step 1. Download some files. Step 2. ...
validations:
required: true
Expand Down Expand Up @@ -74,20 +74,20 @@ body:
- type: textarea
attributes:
label: Device logs (exported using Manager settings).
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so there is no need for backticks.
render: shell
validations:
required: true
- type: textarea
attributes:
label: Installer logs (exported using Installer menu option) [unneeded if issue is not during patching].
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
label: Installer logs (exported using Installer menu option) [unneeded if the issue is not during patching].
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so there is no need for backticks.
render: shell
validations:
required: false
- type: textarea
attributes:
label: Screenshots or videos
label: Screenshots or video
description: Add screenshots or videos that show the bug here.
placeholder: Drag and drop the screenshots/videos into this box.
validations:
Expand All @@ -105,16 +105,16 @@ body:
validations:
required: false
- type: checkboxes
id: acknowledgements
id: acknowledgments
attributes:
label: Acknowledgements
label: Acknowledgments
description: Your issue will be closed if you haven't done these steps.
options:
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
- label: I have searched the existing issues; this is new and no duplicate or related to another open issue.
required: true
- label: I have written a short but informative title.
required: true
- label: I filled out all of the requested information in this issue properly.
- label: I properly filled out all of the requested information in this issue.
required: true
- label: The issue is related solely to the ReVanced Manager and not related to patching errors or patches
- label: The issue is solely related to ReVanced Manager and not caused by patches.
required: true
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
Expand Down
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionSha256Sum=6147605a23b4eff6c334927a86ff3508cb5d6722cd624c97ded4c2e8640f1f87
distributionSha256Sum=a01b6587e15fe7ed120a0ee299c25982a1eee045abd6a9dd5e216b2f628ef9ac
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
87 changes: 69 additions & 18 deletions assets/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,33 @@
"homeView": {
"refreshSuccess": "Refreshed successfully",
"widgetTitle": "Dashboard",

"updatesSubtitle": "Updates",
"patchedSubtitle": "Patched applications",

"updatesAvailable": "Updates available",
"noUpdates": "No updates available",

"WIP": "Work in progress...",

"noInstallations": "No patched applications installed",
"installed": "Installed",
"installUpdate": "Continue to install the update?",

"updateDialogTitle": "Update Manager",
"updateChangelogTitle": "Changelog",

"notificationTitle": "Update downloaded",
"notificationText": "Tap to install the update",

"downloadingMessage": "Downloading update...",
"downloadedMessage": "Update downloaded!",

"installingMessage": "Installing update...",

"errorDownloadMessage": "Unable to download update",
"errorInstallMessage": "Unable to install update",

"noConnection": "No internet connection",
"updatesDisabled": "Updating a patched app is currently disabled. Repatch the app again."
},
Expand All @@ -52,6 +62,7 @@
"patcherView": {
"widgetTitle": "Patcher",
"patchButton": "Patch",

"patchDialogText": "You have selected a resource patch and a split APK installation has been detected, so patching errors may occur.\nAre you sure you want to proceed?",
"armv7WarningDialogText": "Patching on ARMv7 devices is not yet supported and might fail. Proceed anyways?",
"splitApkWarningDialogText": "Patching a split APK is not yet supported and might fail. Proceed anyways?"
Expand All @@ -60,15 +71,18 @@
"widgetTitle": "Select an application",
"widgetTitleSelected": "Selected application",
"widgetSubtitle": "No application selected",

"noAppsLabel": "No applications found",
"notInstalled":"App not installed",

"currentVersion": "Current",
"suggestedVersion": "Suggested",
"allVersions": "All versions"
},
"patchSelectorCard": {
"widgetTitle": "Select patches",
"widgetTitleSelected": "Selected patches",

"widgetSubtitle": "Select an application first",
"widgetEmptySubtitle": "No patches selected"
},
Expand All @@ -79,24 +93,33 @@
"appSelectorView": {
"viewTitle": "Select an application",
"searchBarHint": "Search applications",
"selectFromStorageButton": "Select from storage",

"storageButton": "Storage",
"selectFromStorageButton": "Select from storage",

"errorMessage": "Unable to use selected application",

"downloadToast": "Download function is not available yet",

"featureNotAvailable": "Feature not implemented",
"featureNotAvailableText": "This application is a split APK and cannot be selected. Unfortunately, this feature is only available for rooted users at the moment. However, you can still install the application by selecting its APK files from your device's storage instead"
},
"patchesSelectorView": {
"viewTitle": "Select patches",
"searchBarHint": "Search patches",

"doneButton": "Done",

"default": "Default",
"defaultTooltip": "Select all default patches",

"none": "None",
"noneTooltip": "Deselect all patches",

"loadPatchesSelection": "Load patches selection",
"noSavedPatches": "No saved patches for the selected app.\nPress Done to save current selection.",
"noPatchesFound": "No patches found for the selected app",

"selectAllPatchesWarningContent": "You are about to select all patches, that includes non-suggested patches and can cause unwanted behavior."
},
"patchItem": {
Expand All @@ -109,11 +132,14 @@
"installRootButton": "Install as Root",
"openButton": "Open",
"shareButton": "Share file",

"notificationTitle": "ReVanced Manager is patching",
"notificationText": "Tap to return to the installer",

"shareApkMenuOption": "Share APK",
"exportApkMenuOption": "Export APK",
"shareLogMenuOption": "Share log",

"installErrorDialogTitle": "Error",
"installErrorDialogText1": "Root install is not possible with the current patches selection.\nRepatch your app or choose non-root install.",
"installErrorDialogText2": "Non-root install is not possible with the current patches selection.\nRepatch your app or choose root install if you have your device rooted.",
Expand All @@ -122,93 +148,118 @@
},
"settingsView": {
"widgetTitle": "Settings",

"appearanceSectionTitle": "Appearance",
"teamSectionTitle": "Team",
"infoSectionTitle": "Info",
"advancedSectionTitle": "Advanced",
"exportSectionTitle": "Import & export",
"logsSectionTitle": "Logs",

"darkThemeLabel": "Dark mode",
"darkThemeHint": "Welcome to the dark side",

"dynamicThemeLabel": "Material You",
"dynamicThemeHint": "Enjoy an experience closer to your device",

"languageLabel": "Language",
"englishOption": "English",

"sourcesLabel": "Sources",
"sourcesLabelHint": "Configure your custom sources",
"hostRepositoryLabel": "Repository API",
"orgPatchesLabel": "Patches organization",
"sourcesPatchesLabel": "Patches source",
"orgIntegrationsLabel": "Integrations organization",
"sourcesIntegrationsLabel": "Integrations source",
"sourcesResetDialogTitle": "Reset",
"sourcesResetDialogText": "Are you sure you want to reset custom sources to their default values?",
"apiURLResetDialogText": "Are you sure you want to reset API URL to its default value?",

"apiURLLabel": "API URL",
"apiURLHint": "Configure your custom API URL",
"selectApiURL": "API URL",
"hostRepositoryLabel": "Repository API",
"orgPatchesLabel": "Patches organization",
"sourcesPatchesLabel": "Patches source",
"orgIntegrationsLabel": "Integrations organization",

"contributorsLabel": "Contributors",
"contributorsHint": "A list of contributors of ReVanced",

"logsLabel": "Logs",
"logsHint": "Share Manager's logs",
"apiURLLabel": "API URL",
"apiURLHint": "Configure your custom API URL",
"selectApiURL": "API URL",

"experimentalUniversalPatchesLabel": "Experimental universal patches support",
"experimentalUniversalPatchesHint": "Display all applications to use with universal patches, loading list of apps may be slower",
"experimentalPatchesLabel": "Experimental patches support",
"experimentalPatchesHint": "Enable usage of unsupported patches in any app version",
"enabledExperimentalPatches": "Experimental patches support enabled",
"exportSectionTitle": "Import & export",

"aboutLabel": "About",
"snackbarMessage": "Copied to clipboard",
"restartAppForChanges": "Restart the app to apply changes",
"deleteKeystoreLabel": "Delete keystore",
"deleteKeystoreHint": "Delete the keystore used to sign the app",
"deleteKeystoreDialogText": "Are you sure you want to delete the keystore used to sign patched applications?",
"deletedKeystore": "Keystore deleted",

"deleteTempDirLabel": "Delete temporary files",
"deleteTempDirHint": "Delete unused temporary files",
"deletedTempDir": "Temporary files deleted",

"exportPatchesLabel": "Export patches selection",
"exportPatchesHint": "Export patches selection to a JSON file",
"exportedPatches": "Patches selection exported",
"noExportFileFound": "No patches selection to export",

"importPatchesLabel": "Import patches selection",
"importPatchesHint": "Import patches selection from a JSON file",
"importedPatches": "Patches selection imported",

"resetStoredPatchesLabel": "Reset patches",
"resetStoredPatchesHint": "Reset the stored patches selection",
"resetStoredPatchesDialogText": "Are you sure you want to reset the stored patches selection?",
"resetStoredPatches": "Patches selection has been reset",
"jsonSelectorErrorMessage": "Unable to use selected JSON file",

"deleteLogsLabel": "Delete logs",
"deleteLogsHint": "Delete collected manager logs",
"deletedLogs": "Logs deleted",

"deleteKeystoreLabel": "Delete keystore",
"deleteKeystoreHint": "Delete the keystore used to sign the app",
"deleteKeystoreDialogText": "Are you sure you want to delete the keystore used to sign patched applications?",
"deletedKeystore": "Keystore deleted",

"exportKeystoreLabel": "Export keystore",
"exportKeystoreHint": "Export keystore used to sign apps",
"exportedKeystore": "Keystore exported",
"noKeystoreExportFileFound": "No keystore to export",

"importKeystoreLabel": "Import keystore",
"importKeystoreHint": "Import keystore used to sign apps",
"importedKeystore": "Keystore imported",
"keystoreSelectorErrorMessage": "Unable to use selected KEYSTORE file",

"selectKeystorePassword": "Keystore Password",
"selectKeystorePasswordHint": "Select keystore password used to sign the apk"
"selectKeystorePasswordHint": "Select keystore password used to sign the apk",

"jsonSelectorErrorMessage": "Unable to use selected JSON file",
"keystoreSelectorErrorMessage": "Unable to use selected KEYSTORE file"
},
"appInfoView": {
"widgetTitle": "App info",
"openButton": "Open",
"uninstallButton": "Uninstall",
"patchButton": "Patch",
"unpatchButton": "Unpatch",
"unpatchDialogText": "Are you sure you want to unpatch this app?",
"rootDialogTitle": "Error",

"unpatchDialogText": "Are you sure you want to unpatch this app?",
"rootDialogText": "App was installed with superuser permissions, but currently ReVanced Manager has no permissions.\nPlease grant superuser permissions first.",

"packageNameLabel": "Package name",
"originalPackageNameLabel": "Original package name",
"installTypeLabel": "Installation type",
"rootTypeLabel": "Root",
"nonRootTypeLabel": "Non-root",
"patchedDateLabel": "Patched date",
"patchedDateHint": "{date} at {time}",
"appliedPatchesLabel": "Applied patches",

"patchedDateHint": "{date} at {time}",
"appliedPatchesHint": "{quantity} applied patches",

"updateNotImplemented": "This feature has not been implemented yet"
},
"contributorsView": {
Expand Down
2 changes: 1 addition & 1 deletion docs/1_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ In order to use ReVanced on your Android device, ReVanced Manager must be instal

## ⏭️ What's next

The next page will guide you through patching an app.
The next page will guide you through using ReVanced Manager.

Continue: [🪛 Usage](2_usage.md)
34 changes: 29 additions & 5 deletions lib/services/github_api.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:convert';
import 'dart:io';

import 'package:collection/collection.dart';
import 'package:dio/dio.dart';
import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
Expand All @@ -10,7 +9,6 @@ import 'package:injectable/injectable.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/services/manager_api.dart';


@lazySingleton
class GithubAPI {
late Dio _dio = Dio();
Expand Down Expand Up @@ -60,19 +58,45 @@ class GithubAPI {

Future<Map<String, dynamic>?> getLatestRelease(
String repoName,
) async {
try {
final response = await _dio.get(
'/repos/$repoName/releases',
);
return response.data[0];
} on Exception catch (e) {
if (kDebugMode) {
print(e);
}
return null;
}
}

Future<Map<String, dynamic>?> getLatestManagerRelease(
String repoName,
) async {
try {
final response = await _dio.get(
'/repos/$repoName/releases',
);
final Map<String, dynamic> releases = response.data[0];
int updates = 0;
final String currentVersion = await ManagerAPI().getCurrentManagerVersion();
final String currentVersion =
await ManagerAPI().getCurrentManagerVersion();
while (response.data[updates]['tag_name'] != 'v$currentVersion') {
updates++;
}
for(int i = 1; i < updates; i++){
releases.update('body', (value) => value + '\n' + '# '+ response.data[i]['tag_name']+'\n' + response.data[i]['body']);
for (int i = 1; i < updates; i++) {
releases.update(
'body',
(value) =>
value +
'\n' +
'# ' +
response.data[i]['tag_name'] +
'\n' +
response.data[i]['body'],
);
}
return releases;
} on Exception catch (e) {
Expand Down
Loading