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

feat: settings manage data #5265

Merged
merged 4 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void main() {

// open settings and restore the location
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.files);
await tester.openSettingsPage(SettingsPage.manageData);
await tester.restoreLocation();

expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ extension AppFlowySettings on WidgetTester {

/// Restore the AppFlowy data storage location
Future<void> restoreLocation() async {
final button =
find.byTooltip(LocaleKeys.settings_files_recoverLocationTooltips.tr());
final button = find.text(LocaleKeys.settings_common_reset.tr());
expect(button, findsOneWidget);
await tapButton(button);
await pumpAndSettle();

final confirmButton = find.text(LocaleKeys.button_confirm.tr());
expect(confirmButton, findsOneWidget);
await tapButton(confirmButton);
return;
}

Expand Down
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we sunsetted supabase, should we remove this as well @LucasXu0 ?

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'package:flutter/material.dart';

import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/presentation/helpers/helpers.dart';
Expand All @@ -6,7 +8,6 @@ import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flowy_infra_ui/widget/buttons/secondary_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import '../../application/encrypt_secret_bloc.dart';
Expand Down Expand Up @@ -98,23 +99,20 @@ class _EncryptSecretScreenState extends State<EncryptSecretScreen> {
controller: _textEditingController,
hintText:
LocaleKeys.settings_menu_inputTextFieldHint.tr(),
onChanged: (p0) {},
onChanged: (_) {},
),
),
OkCancelButton(
alignment: MainAxisAlignment.end,
onOkPressed: () {
context.read<EncryptSecretBloc>().add(
EncryptSecretEvent.setEncryptSecret(
_textEditingController.text,
onOkPressed: () =>
context.read<EncryptSecretBloc>().add(
EncryptSecretEvent.setEncryptSecret(
_textEditingController.text,
),
),
);
},
onCancelPressed: () {
context.read<EncryptSecretBloc>().add(
const EncryptSecretEvent.cancelInputSecret(),
);
},
onCancelPressed: () => context
.read<EncryptSecretBloc>()
.add(const EncryptSecretEvent.cancelInputSecret()),
mode: TextButtonMode.normal,
),
const VSpace(6),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ enum SettingsPage {
// NEW
account,
workspace,
manageData,
// OLD
files,
notifications,
cloud,
shortcuts,
Expand Down
Loading
Loading