Skip to content

Commit

Permalink
Merge pull request #76 from 3Dpass/dev
Browse files Browse the repository at this point in the history
feat: Links for assets and objects. Version 2.17.1
  • Loading branch information
L3odr0id authored Sep 28, 2024
2 parents 789104e + 48a3d6a commit 7f219d7
Show file tree
Hide file tree
Showing 298 changed files with 4,694 additions and 6,947 deletions.
6 changes: 6 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ android {
// }
}
}

applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output ->
outputFileName = "threedpass" + "-" + versionName + "-" + output.getFilter(com.android.build.OutputFile.ABI) + ".apk"
}
}
}

flutter {
Expand Down
31 changes: 24 additions & 7 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
},
"matches_FOUND": "found",
"WHY_not_found": "Why?",
"save_this_object_button_label":"Save object",
"save_this_snapshot_button_label":"Save snapshot",
"rename_this_snapshot_button_label":"Rename this snapshot",

"stable_hashes_list_title": "Stable hashes",
Expand Down Expand Up @@ -99,7 +97,7 @@
"preview_settings_pixel_ratio_label": "Pixel ratio",
"wallet_settings_istestnet_switch": "Is Test net",
"node_url_label": "Node URL",
"error_hex": "Invalid input. Must be 8 digits",
"error_hex": "Invalid input. Must be 8 symbols",

"pixel_ratio_help_text": "Decreasing the value reduces preview quality, but increases performance.",

Expand Down Expand Up @@ -176,7 +174,7 @@
"create_credentials_name": "Name",
"create_credentials_name_error": "Name can not be empty",
"create_credentials_password": "Password",
"create_credentials_password_error": "6 to 18 digits and contains numbers and letters",
"create_credentials_password_error": "6 to 32 symbols and contains numbers and letters",
"create_credentials_password2": "Confirm Password",
"create_credentials_password2_error": "Inconsistent passwords",

Expand Down Expand Up @@ -322,8 +320,6 @@
"top_hashes_copied_toast": "Top hashes copied",
"trans_bytes_copied_toast": "Rotation bytes copied",
"file_hash_copied": "File hash copied",
"unsaved_object_appbar": "Unnamed object",
"delete_new_snapshot": "Don't save snapshot",
"delete_extisting_snapshot": "Delete snapshot",
"delete_snapshot_confirm_title": "Do you want to delete {}?",
"explore_hashes_button_title": "Compare hashes",
Expand Down Expand Up @@ -523,5 +519,26 @@
"error_validation_max_balance": "Your balance is {}",

"@2.17.0": {},
"copy_rotation_bytes": "Copy Rotation bytes"
"copy_rotation_bytes": "Copy Rotation bytes",

"@2.17.1": {},
"pools_loading": "Liquidity pools are still loading",
"swap_pool_could_not_check": "Couldn't check if pool exists",
"swap_pool_not_found": "Liquditity pool not found",
"uploaded_object_links_subtitle": "Links",
"uploaded_object_obj_details_subtitle": "Object details",
"asset_link_text": "View asset {}",
"snapshot_link_text": "View snapshot {}",
"uploaded_object_link_text": "View object {}",
"linked_assets_helper": "Linked {}:",
"assets_plural":{
"zero": "assets",
"one": "asset",
"two": "assets",
"few": "assets",
"many": "assets",
"other": "assets"
},
"linked_snapshots_helper": "+ {} found",
"view_object": "View object"
}
14 changes: 7 additions & 7 deletions integration_test/scan_page_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ void main() {
relativePath: filePath,
);

await context.router.push(
PreviewRouteWrapper(
hashObject: pair.left,
snapshot: pair.right,
createNewAnyway: true,
),
);
// await context.router.push(
// PreviewRouteWrapper(
// hashObject: pair.left,
// snapshot: pair.right,
// createNewAnyway: true,
// ),
// );

print('aaaaaaa3');

Expand Down
24 changes: 24 additions & 0 deletions lib/core/architecture/get_data_usecase.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'package:threedpass/core/architecture/local_repository_interface.dart';
import 'package:threedpass/core/architecture/remote_repository_interface.dart';
import 'package:threedpass/core/usecase.dart';

abstract class GetDataUseCase<TResult, Params>
extends UseCase<TResult, Params> {
final LocalRepoI<TResult, Params> localRepo;
final RemoteRepoI<TResult, Params> remoteRepo;

const GetDataUseCase({required this.localRepo, required this.remoteRepo});

@override
Future<TResult> call(final Params params) async {
final localRes = await localRepo.get(params);

if (localRes != null) {
return localRes;
} else {
final data = await remoteRepo.get(params);
await localRepo.set(data);
return data;
}
}
}
7 changes: 7 additions & 0 deletions lib/core/architecture/local_repository_interface.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'dart:async';

abstract class LocalRepoI<TData, Params> {
FutureOr<TData?> get(final Params params);

Future<void> set(final TData data);
}
3 changes: 3 additions & 0 deletions lib/core/architecture/remote_repository_interface.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
abstract class RemoteRepoI<TData, Params> {
Future<TData> get(final Params params);
}
5 changes: 0 additions & 5 deletions lib/core/errors/parse_failure.dart

This file was deleted.

9 changes: 0 additions & 9 deletions lib/core/errors/type_mismatch.dart

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7f219d7

Please sign in to comment.