Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Setup protobuff and add labels.proto #1092

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
lib/generated/intl/messages_*.dart linguist-generated=true
lib/generated/l10n.dart linguist-generated=true
lib/models/protos/*.dart linguist-generated=true
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ You can alternatively install the build from PlayStore or F-Droid.
8. For iOS, run `flutter build ios`
<br/>

### Proto
- Install `protoc` (on macOS, `brew install protobuf`)
- Install `https://pub.dev/packages/protoc_plugin` plugin.
- Add `protoc-gen-dart` to your `PATH` (on macOS, `export PATH="$PATH":"$HOME/.pub-cache/bin"`)
- Run `protoc --dart_out=lib/models/protos -Iprotos protos/*.proto`

## 🙋 Help

We provide human support to our customers. Please write to [support@ente.io](mailto:support@ente.io) sharing as many details as possible about whatever it is that you need help with, and we will get back to you as soon as possible.
Expand Down
11 changes: 11 additions & 0 deletions lib/generated/intl/messages_en.dart

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

70 changes: 70 additions & 0 deletions lib/generated/l10n.dart

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

7 changes: 7 additions & 0 deletions lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,13 @@
"saving": "Saving...",
"editsSaved": "Edits saved",
"oopsCouldNotSaveEdits": "Oops, could not save edits",
"machineLearning": "Machine learning",
"status": "Status",
"clearIndexes": "Clear indexes",
"indexedItems": "Indexed items",
"unindexedItems": "Unindexed items",
"enableMachineLearning": "Enable machine learning",
"enableMLWarning": "Please note that this will result in a higher bandwidth and battery usage until all items are indexed.",
"distanceInKMUnit": "km",
"@distanceInKMUnit": {
"description": "Unit for distance in km"
Expand Down
113 changes: 113 additions & 0 deletions lib/models/protos/labels.pb.dart

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

7 changes: 7 additions & 0 deletions lib/models/protos/labels.pbenum.dart

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

31 changes: 31 additions & 0 deletions lib/models/protos/labels.pbjson.dart

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

9 changes: 9 additions & 0 deletions lib/models/protos/labels.pbserver.dart

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

7 changes: 5 additions & 2 deletions lib/services/billing_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ class BillingService {
);
return;
}
final dialog = createProgressDialog(context, S.of(context).pleaseWait,
isDismissible: true);
final dialog = createProgressDialog(
context,
S.of(context).pleaseWait,
isDismissible: true,
);
await dialog.show();
try {
final String jwtToken = await UserService.instance.getFamiliesToken();
Expand Down
22 changes: 22 additions & 0 deletions lib/ui/advanced_settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import 'package:photos/ui/components/title_bar_title_widget.dart';
import 'package:photos/ui/components/title_bar_widget.dart';
import 'package:photos/ui/tools/debug/app_storage_viewer.dart';
import 'package:photos/ui/viewer/gallery/photo_grid_size_picker_page.dart';
import "package:photos/ui/viewer/search/settings/ml_settings.dart";
import 'package:photos/utils/local_settings.dart';
import 'package:photos/utils/navigation_util.dart';
import "package:shared_preferences/shared_preferences.dart";

class AdvancedSettingsScreen extends StatefulWidget {
const AdvancedSettingsScreen({super.key});
Expand Down Expand Up @@ -61,6 +63,26 @@ class _AdvancedSettingsScreenState extends State<AdvancedSettingsScreen> {
children: [
Column(
children: [
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: S.of(context).machineLearning,
),
menuItemColor: colorScheme.fillFaint,
trailingWidget: Icon(
Icons.chevron_right_outlined,
color: colorScheme.strokeBase,
),
singleBorderRadius: 8,
alignCaptionedTextToLeft: true,
onTap: () async {
final SharedPreferences pref =
await SharedPreferences.getInstance();
routeToPage(context, MLSettings(pref: pref));
},
),
const SizedBox(
height: 24,
),
GestureDetector(
onTap: () {
routeToPage(
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/tools/lock_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
}
}
} catch (e, s) {
_logger.severe(e, s);
_logger.severe("showLockScreenError", e, s);
}
}
}
Loading