EmptyState: Add hook to import code and faq
This commit is contained in:
parent
911471cd98
commit
2cd8ff6a46
2 changed files with 32 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
import 'package:ente_auth/l10n/l10n.dart';
|
||||
import 'package:ente_auth/theme/ente_theme.dart';
|
||||
import 'package:ente_auth/ui/settings/data/import_page.dart';
|
||||
import 'package:ente_auth/ui/settings/faq.dart';
|
||||
import 'package:ente_auth/utils/navigation_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class HomeEmptyStateWidget extends StatelessWidget {
|
||||
final VoidCallback? onScanTap;
|
||||
|
@ -50,6 +55,33 @@ class HomeEmptyStateWidget extends StatelessWidget {
|
|||
child: Text(l10n.importEnterSetupKey),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 54),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
routeToPage(context, ImportCodePage());
|
||||
},
|
||||
child: Text(
|
||||
l10n.importCodes,
|
||||
textAlign: TextAlign.center,
|
||||
style: getEnteTextTheme(context).bodyFaint.copyWith(decoration: TextDecoration.underline),
|
||||
),),
|
||||
const SizedBox(height: 18),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showModalBottomSheet<void>(
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
barrierColor: Colors.black87,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return const FAQQuestionsWidget();
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
l10n.faq,
|
||||
textAlign: TextAlign.center,
|
||||
style: getEnteTextTheme(context).bodyFaint.copyWith(decoration: TextDecoration.underline),
|
||||
),),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
|
@ -40,7 +40,6 @@ class DataSectionWidget extends StatelessWidget {
|
|||
trailingIconIsMuted: true,
|
||||
onTap: () async {
|
||||
routeToPage(context, ImportCodePage());
|
||||
// _showImportInstructionDialog(context);
|
||||
},
|
||||
),
|
||||
sectionOptionSpacing,
|
||||
|
|
Loading…
Add table
Reference in a new issue