Skip to content

Commit

Permalink
Merge pull request #378 from Npepperlinux/inport_export_message
Browse files Browse the repository at this point in the history
設定のインポート・エクスポートの説明の修正
  • Loading branch information
shiosyakeyakini-info authored Jun 22, 2024
2 parents 3921b0f + 89c2ebc commit 5c61106
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 75 deletions.
11 changes: 6 additions & 5 deletions lib/l10n/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -813,13 +813,14 @@
"systemFont": "システム標準",

"selectFolder": "フォルダー選択",
"importSettings": "設定のインポート",
"importSettingsDescription": "設定ファイルをドライブから読み込みます。設定ファイルには保存されたときのすべてのアカウントの設定情報が記録されていますが、そのうちこの端末でログインしているアカウントの情報のみを読み込みます。",
"settingsFileManagement": "設定ファイルの管理",
"importAndExportSettingsDescription": "現在の設定から、アカウントのログイン情報を除くすべての設定を設定ファイルに出力して管理することができます。設定ファイルは、指定したアカウントの「ドライブ」内に保存されます。",
"importSettings": "インポート",
"importSettingsDescription": "全般設定と、この端末でログインしているアカウントに対応する設定が読み込まれます。",
"pleaseSelectAccount": "アカウントを選んでや",
"select": "選択",
"exportSettings": "設定のエクスポート",
"exportSettingsDescription1": "設定ファイルをドライブに保存します。設定ファイルにはこの端末でログインしているすべてのアカウントの、ログイン情報以外の情報が記録されます。",
"exportSettingsDescription2": "設定ファイルは1回のエクスポートにつき1つのアカウントに対して保存されます。",
"exportSettings": "エクスポート",
"exportSettingsDescription": "全般設定と、この端末でログインしているすべてのアカウントの設定を設定ファイルに保存します。",
"pleaseSelectAccountToExportSettings": "設定ファイルを保存するアカウントを選んでや",

"selectAntenna": "アンテナ選択",
Expand Down
144 changes: 74 additions & 70 deletions lib/view/settings_page/import_export_page/import_export_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,79 +29,83 @@ class ImportExportPageState extends ConsumerState<ImportExportPage> {
body: Padding(
padding: const EdgeInsets.only(left: 10, right: 10),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).importSettings,
style: Theme.of(context).textTheme.titleLarge,
),
Text(S.of(context).importSettingsDescription),
Row(
children: [
Expanded(
child: DropdownButton(
isExpanded: true,
items: [
for (final account in accounts)
DropdownMenuItem(
value: account,
child: Text(account.acct.toString()),
),
],
value: selectedImportAccount,
onChanged: (value) {
setState(() {
selectedImportAccount = value;
});
},
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).settingsFileManagement,
style: Theme.of(context).textTheme.titleLarge,
),
Text(S.of(context).importAndExportSettingsDescription),
Text(
S.of(context).importSettings,
style: Theme.of(context).textTheme.titleLarge,
),
Text(S.of(context).importSettingsDescription),
Row(
children: [
Expanded(
child: DropdownButton(
isExpanded: true,
items: [
for (final account in accounts)
DropdownMenuItem(
value: account,
child: Text(account.acct.toString()),
),
],
value: selectedImportAccount,
onChanged: (Account? value) {
setState(() {
selectedImportAccount = value;
});
},
),
),
),
ElevatedButton(
onPressed: () async {
final account = selectedImportAccount;
if (account == null) {
await SimpleMessageDialog.show(
context,
S.of(context).pleaseSelectAccount,
);
return;
}
await ref
.read(importExportRepositoryProvider)
.import(context, account)
.expectFailure(context);
},
child: Text(S.of(context).select),
),
],
),
const Padding(padding: EdgeInsets.only(top: 30)),
Text(
S.of(context).exportSettings,
style: Theme.of(context).textTheme.titleLarge,
),
Text(S.of(context).exportSettingsDescription1),
Text(S.of(context).exportSettingsDescription2),
Row(
children: [
Expanded(
child: DropdownButton(
isExpanded: true,
items: [
for (final account in accounts)
DropdownMenuItem(
value: account,
child: Text(account.acct.toString()),
),
],
value: selectedExportAccount,
onChanged: (value) {
setState(() {
selectedExportAccount = value;
});
ElevatedButton(
onPressed: () async {
final account = selectedImportAccount;
if (account == null) {
await SimpleMessageDialog.show(
context,
S.of(context).pleaseSelectAccount,
);
return;
}
await ref
.read(importExportRepository)
.import(context, account)
.expectFailure(context);
},
),
],
),
const Padding(padding: EdgeInsets.only(top: 30)),
Text(
S.of(context).exportSettings,
style: Theme.of(context).textTheme.titleLarge,
),
Text(S.of(context).exportSettingsDescription),
Row(
children: [
Expanded(
child: DropdownButton(
isExpanded: true,
items: [
for (final account in accounts)
DropdownMenuItem(
value: account,
child: Text(account.acct.toString()),
),
],
value: selectedExportAccount,
onChanged: (Account? value) {
setState(() {
selectedExportAccount = value;
});
},
),
),
),
ElevatedButton(
onPressed: () async {
Expand Down

0 comments on commit 5c61106

Please sign in to comment.