diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 22880718..463ade05 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -462,4 +462,9 @@ "noFollowsConversations": "Keine Unterhaltungen mit Personen, denen Sie folgen", "noKnownConversations": "Keine Unterhaltungen mit bekannten Kontakten", "noMessageRequests": "Keine Nachrichtenanfragen" + , + "imprint": "Impressum", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 481cdc1a..22ac1ee2 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -1627,8 +1627,12 @@ "@relayStatusExcellentDescription": { "description": "Status description when relay connection is excellent", "placeholders": { - "myCount": {"type": "int"}, - "peerCount": {"type": "int"} + "myCount": { + "type": "int" + }, + "peerCount": { + "type": "int" + } } }, "relayStatusDegradedMyOnly": "Connected to your relays, but not to peer's DM relays. Messages may be delayed.", @@ -1682,5 +1686,9 @@ "noMessageRequests": "No message requests", "@noMessageRequests": { "description": "Empty state for requests DM tab" + }, + "imprint": "Imprint", + "@imprint": { + "description": "Imprint page title" } } \ No newline at end of file diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index d958c9e2..5a1aca3f 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -465,4 +465,9 @@ "noFollowsConversations": "No hay conversaciones con personas que sigues", "noKnownConversations": "No hay conversaciones con contactos conocidos", "noMessageRequests": "No hay solicitudes de mensajes" + , + "imprint": "Aviso legal", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index b3c67d4e..8b58d8c3 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -464,4 +464,9 @@ "noFollowsConversations": "Aucune conversation avec les personnes que vous suivez", "noKnownConversations": "Aucune conversation avec des contacts connus", "noMessageRequests": "Aucune demande de message" + , + "imprint": "Mentions légales", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index 19d6825b..5424a369 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -421,4 +421,9 @@ "noKnownConversations": "既知の連絡先との会話はありません", "noMessageRequests": "メッセージリクエストはありません", "failed": "失敗" + , + "imprint": "インプリント", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index d31c9f2d..c8961e32 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -464,4 +464,9 @@ "noFollowsConversations": "Nenhuma conversa com pessoas que você segue", "noKnownConversations": "Nenhuma conversa com contatos conhecidos", "noMessageRequests": "Nenhum pedido de mensagem" + , + "imprint": "Impressão", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 9ef93123..ec42f48f 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -421,4 +421,9 @@ "noKnownConversations": "Нет разговоров с известными контактами", "noMessageRequests": "Нет запросов на сообщения", "failed": "Ошибка" + , + "imprint": "Выходные данные", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/l10n/app_th.arb b/lib/l10n/app_th.arb index 21408f7f..34e32eeb 100644 --- a/lib/l10n/app_th.arb +++ b/lib/l10n/app_th.arb @@ -421,4 +421,9 @@ "noKnownConversations": "ไม่มีการสนทนากับผู้ติดต่อที่รู้จัก", "noMessageRequests": "ไม่มีคำขอข้อความ", "failed": "ล้มเหลว" + , + "imprint": "ข้อมูลทางกฎหมาย", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index b6bdc198..74a1e4d8 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -421,4 +421,9 @@ "noKnownConversations": "没有与已知联系人的对话", "noMessageRequests": "没有消息请求", "failed": "失败" + , + "imprint": "法律声明", + "@imprint": { + "description": "Imprint page title" + } } \ No newline at end of file diff --git a/lib/presentation_layer/components/drawer/nostr_side_menu.dart b/lib/presentation_layer/components/drawer/nostr_side_menu.dart index 2c0c008b..b21e1ebb 100644 --- a/lib/presentation_layer/components/drawer/nostr_side_menu.dart +++ b/lib/presentation_layer/components/drawer/nostr_side_menu.dart @@ -1,9 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_svg/svg.dart'; import 'package:go_router/go_router.dart'; -import 'package:package_info_plus/package_info_plus.dart'; import 'package:phosphor_flutter/phosphor_flutter.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -93,12 +91,6 @@ class NostrSideMenu extends ConsumerWidget { ); } - Future _getPackageInfo() async { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - - return packageInfo; - } - void navigateToProfile(BuildContext context, String pubkey) { context.push(RoutePaths.profile(pubkey: pubkey)); } @@ -324,7 +316,7 @@ class NostrSideMenu extends ConsumerWidget { ), _divider(context), Padding( - padding: const EdgeInsets.only(left: 20), + padding: const EdgeInsets.only(left: 5), child: _textButton( text: AppLocalizations.of(context)!.settings, onPressed: () { @@ -334,56 +326,54 @@ class NostrSideMenu extends ConsumerWidget { ), ), const SizedBox(height: 10), - Padding( - padding: const EdgeInsets.fromLTRB(20, 10, 15, 20), - child: _textButton( - text: AppLocalizations.of(context)!.termsOfService, - context: context, - onPressed: () { - // lauch url - Uri url = Uri.parse("https://camelus.app/terms"); - launchUrl(url, mode: LaunchMode.externalApplication); - }, - ), - ), - Padding( - padding: EdgeInsets.only(left: 20), - child: FutureBuilder( - future: _getPackageInfo(), - builder: (context, snapshot) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'v${snapshot.data?.version}', - style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, - fontSize: 10, - ), - ), - Text( - 'build ${snapshot.data?.buildNumber}', - style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, - fontSize: 8, - ), - ), - Text( - '${snapshot.data?.buildSignature}', - style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, - fontSize: 6, - ), - ), - ], - ); - }, - ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextButton( + style: TextButton.styleFrom( + padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5), + minimumSize: const Size(50, 10), + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + ), + onPressed: () { + final url = Uri.parse("https://camelus.app/terms"); + launchUrl(url, mode: LaunchMode.externalApplication); + }, + child: Text( + AppLocalizations.of(context)!.termsOfService, + style: TextStyle( + color: Theme.of(context).colorScheme.onSurface, + fontSize: 12, + fontWeight: FontWeight.normal, + ), + ), + ), + + TextButton( + style: TextButton.styleFrom( + padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5), + minimumSize: const Size(50, 10), + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + ), + onPressed: () { + final url = Uri.parse("https://camelus.app/imprint"); + launchUrl(url, mode: LaunchMode.externalApplication); + }, + child: Text( + AppLocalizations.of(context)!.imprint, + style: TextStyle( + color: Theme.of(context).colorScheme.onSurface, + fontSize: 12, + fontWeight: FontWeight.normal, + ), + ), + ), + ], ), _divider(context), Padding( - padding: const EdgeInsets.fromLTRB(20, 10, 15, 20), + padding: const EdgeInsets.fromLTRB(20, 0, 15, 10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -404,15 +394,7 @@ class NostrSideMenu extends ConsumerWidget { onPressed: () { openQrShareDialog(context, currentUserPubkey); }, - icon: SvgPicture.asset( - 'assets/icons/qr-code.svg', - colorFilter: ColorFilter.mode( - Theme.of(context).colorScheme.primary, - BlendMode.srcIn, - ), - height: 22, - width: 22, - ), + icon: Icon(PhosphorIcons.qrCode()), ), ], ), diff --git a/lib/presentation_layer/routes/nostr/settings/developer/developer_settings.dart b/lib/presentation_layer/routes/nostr/settings/developer/developer_settings.dart index e1e780df..da4ce4be 100644 --- a/lib/presentation_layer/routes/nostr/settings/developer/developer_settings.dart +++ b/lib/presentation_layer/routes/nostr/settings/developer/developer_settings.dart @@ -1,11 +1,18 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:package_info_plus/package_info_plus.dart'; import '../../../../providers/developer_settings_provider.dart'; class DeveloperSettingsPage extends ConsumerWidget { const DeveloperSettingsPage({super.key}); + Future _getPackageInfo() async { + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + + return packageInfo; + } + @override Widget build(BuildContext context, WidgetRef ref) { final state = ref.watch(developerSettingsProvider); @@ -21,6 +28,38 @@ class DeveloperSettingsPage extends ConsumerWidget { value: state.showPerformanceOverlay, onChanged: notifier.setShowPerformanceOverlay, ), + const Divider(), + FutureBuilder( + future: _getPackageInfo(), + builder: (context, snapshot) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'v${snapshot.data?.version}', + style: TextStyle( + color: Theme.of(context).colorScheme.onSurface, + fontSize: 10, + ), + ), + Text( + 'build ${snapshot.data?.buildNumber}', + style: TextStyle( + color: Theme.of(context).colorScheme.onSurface, + fontSize: 10, + ), + ), + Text( + '${snapshot.data?.buildSignature}', + style: TextStyle( + color: Theme.of(context).colorScheme.onSurface, + fontSize: 8, + ), + ), + ], + ); + }, + ), ], ), );