Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Show configured endpoint on OnboardingPage

vishnukvmd293246ce9246
diff --git a/auth/lib/l10n/arb/app_en.arb b/auth/lib/l10n/arb/app_en.arb
index 9f5674d853..9528a2fc41 100644
--- a/auth/lib/l10n/arb/app_en.arb
+++ b/auth/lib/l10n/arb/app_en.arb
@@ -414,5 +414,6 @@
"serverEndpoint": "Server endpoint",
"invalidEndpoint": "Invalid endpoint",
"invalidEndpointMessage": "Sorry, the endpoint you entered is invalid. Please enter a valid endpoint and try again.",
- "endpointUpdatedMessage": "Endpoint updated successfully"
+ "endpointUpdatedMessage": "Endpoint updated successfully",
+ "customEndpoint": "Connecting to {endpoint}"
}
\ No newline at end of file
diff --git a/auth/lib/onboarding/view/onboarding_page.dart b/auth/lib/onboarding/view/onboarding_page.dart
index d8c359ecc4..4d7ca79985 100644
--- a/auth/lib/onboarding/view/onboarding_page.dart
+++ b/auth/lib/onboarding/view/onboarding_page.dart
@@ -2,6 +2,7 @@ import 'dart:async';
import 'package:ente_auth/app/view/app.dart';
import 'package:ente_auth/core/configuration.dart';
+import 'package:ente_auth/core/constants.dart';
import 'package:ente_auth/core/event_bus.dart';
import 'package:ente_auth/ente_theme_data.dart';
import 'package:ente_auth/events/trigger_logout_event.dart';
@@ -74,13 +75,14 @@ class _OnboardingPageState extends State<OnboardingPage> {
isDismissible: false,
);
if (result?.action == ButtonAction.first) {
- Navigator.of(context).push(
+ await Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return const DeveloperSettingsPage();
},
),
);
+ setState(() {});
}
}
},
@@ -193,6 +195,28 @@ class _OnboardingPageState extends State<OnboardingPage> {
),
),
),
+ Configuration.instance.getHttpEndpoint() ==
+ kDefaultProductionEndpoint
+ ? const SizedBox.shrink()
+ : Container(
+ width: double.infinity,
+ padding: const EdgeInsets.only(top: 20, bottom: 20),
+ child: GestureDetector(
+ onTap: _optForOfflineMode,
+ child: Center(
+ child: Text(
+ context.l10n.customEndpoint(
+ Configuration.instance.getHttpEndpoint(),
+ ),
+ style: body.copyWith(
+ color: Theme.of(context)
+ .colorScheme
+ .subTextColor,
+ ),
+ ),
+ ),
+ ),
+ ),
],
),
),