Skip to content

Commit

Permalink
インポート時のダイアログのメッセージを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Sep 27, 2023
1 parent d83280b commit 8452999
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/repository/import_export_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ImportExportRepository extends ChangeNotifier {
builder: (context2) => FolderSelectDialog(
account: account,
fileShowTarget: const ["miria.json", "miria.json.unknown"],
confirmationText: "このフォルダーからインポートする",
),
);
if (result == null) return;
Expand Down Expand Up @@ -126,6 +127,7 @@ class ImportExportRepository extends ChangeNotifier {
builder: (context2) => FolderSelectDialog(
account: account,
fileShowTarget: const ["miria.json", "miria.json.unknown"],
confirmationText: "このフォルダーに保存する",
),
);
if (result == null) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ class FolderResult {
class FolderSelectDialog extends ConsumerStatefulWidget {
final Account account;
final List<String>? fileShowTarget;
final String confirmationText;

const FolderSelectDialog({
super.key,
required this.account,
required this.fileShowTarget,
required this.confirmationText,
});

@override
Expand All @@ -35,7 +37,7 @@ class FolderSelectDialogState extends ConsumerState<FolderSelectDialog> {
return AlertDialog(
title: Column(
children: [
const Text("フォルダ選択"),
const Text("フォルダー選択"),
Row(
children: [
if (path.isNotEmpty)
Expand Down Expand Up @@ -131,7 +133,7 @@ class FolderSelectDialogState extends ConsumerState<FolderSelectDialog> {
onPressed: () {
Navigator.of(context).pop(FolderResult(path.lastOrNull));
},
child: const Text("このフォルダーに保存する"),
child: Text(widget.confirmationText),
)
],
);
Expand Down

0 comments on commit 8452999

Please sign in to comment.