public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox_login_manager/pve_flutter_frontend 0/4] refactor settings screen and add HELP, LEGAL section in settings
@ 2025-08-29 11:48 Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 1/3] refactor: ui: add new settings page and use existing ssl toggle widget Shan Shaji
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Shan Shaji @ 2025-08-29 11:48 UTC (permalink / raw)
  To: pve-devel

This patch series includes changes from the following patch [0].
Addition of HELP and LEGAL section was done on top of it. 

[0] - https://lore.proxmox.com/pve-devel/20250801100051.83035-1-s.shaji@proxmox.com/

pve_flutter_frontend:

Shan Shaji (3):
  refactor: ui: add new settings page and use existing ssl toggle widget
  ui: settings: add privacy policy url link in settings screen
  ui: settings: add proxmox forum and bugzilla links

 lib/main.dart                    |   8 ++
 lib/pages/pve_settings_page.dart | 123 +++++++++++++++++++++++++++++++
 lib/utils/links.dart             |   4 +
 3 files changed, 135 insertions(+)
 create mode 100644 lib/pages/pve_settings_page.dart


proxmox_login_manager:

Shan Shaji (1):
  refactor: ui: move settings page to `pve_flutter_frontend`

 lib/proxmox_general_settings_form.dart | 58 +++++++++++---------------
 lib/proxmox_login_form.dart            |  5 +--
 lib/proxmox_login_selector.dart        | 13 +++---
 3 files changed, 31 insertions(+), 45 deletions(-)


Summary over all repositories:
  6 files changed, 166 insertions(+), 45 deletions(-)

-- 
Generated by git-murpp 0.8.1


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH pve_flutter_frontend 1/3] refactor: ui: add new settings page and use existing ssl toggle widget
  2025-08-29 11:48 [pve-devel] [PATCH proxmox_login_manager/pve_flutter_frontend 0/4] refactor settings screen and add HELP, LEGAL section in settings Shan Shaji
@ 2025-08-29 11:48 ` Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 2/3] ui: settings: add privacy policy url link in settings screen Shan Shaji
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Shan Shaji @ 2025-08-29 11:48 UTC (permalink / raw)
  To: pve-devel

The settings page UI was previously implemented in
proxmox_login_manager. A new screen has now been created  with an added
route and removed the settings page from `proxmox_login_manager`.
This screen reuses the SSL toggle form from the
`proxmox_login_manager` package.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/main.dart                    |  8 ++++++++
 lib/pages/pve_settings_page.dart | 23 +++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 lib/pages/pve_settings_page.dart

diff --git a/lib/main.dart b/lib/main.dart
index 6a7c5a9..0ffcae7 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,6 +1,7 @@
 import 'package:flutter/foundation.dart';
 import 'package:flutter/material.dart';
 import 'package:provider/provider.dart';
+import 'package:pve_flutter_frontend/pages/pve_settings_page.dart';
 import 'package:pve_flutter_frontend/widgets/pve_first_welcome_screen.dart';
 import 'package:shared_preferences/shared_preferences.dart';
 import 'package:proxmox_login_manager/proxmox_login_manager.dart';
@@ -227,6 +228,13 @@ class MyApp extends StatelessWidget {
             );
           }
 
+          if (context.name == PveSettingsPage.routePath) {
+            return MaterialPageRoute(
+              settings: context,
+              builder: (context) => PveSettingsPage(),
+            );
+          }
+
           if (authbloc!.state.value is Unauthenticated ||
               context.name == '/login') {
             return MaterialPageRoute(
diff --git a/lib/pages/pve_settings_page.dart b/lib/pages/pve_settings_page.dart
new file mode 100644
index 0000000..0d405c1
--- /dev/null
+++ b/lib/pages/pve_settings_page.dart
@@ -0,0 +1,23 @@
+import 'package:flutter/material.dart';
+import 'package:proxmox_login_manager/proxmox_general_settings_form.dart';
+import 'package:pve_flutter_frontend/widgets/pve_app_bar.dart';
+
+class PveSettingsPage extends StatelessWidget {
+  static final routePath = '/settings';
+
+  const PveSettingsPage({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: PveAppBar(),
+      body: SingleChildScrollView(
+        child: Column(
+          children: [
+            ProxmoxGeneralSettingsForm(),
+          ],
+        ),
+      ),
+    );
+  }
+}
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH pve_flutter_frontend 2/3] ui: settings: add privacy policy url link in settings screen
  2025-08-29 11:48 [pve-devel] [PATCH proxmox_login_manager/pve_flutter_frontend 0/4] refactor settings screen and add HELP, LEGAL section in settings Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 1/3] refactor: ui: add new settings page and use existing ssl toggle widget Shan Shaji
@ 2025-08-29 11:48 ` Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 3/3] ui: settings: add proxmox forum and bugzilla links Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH proxmox_login_manager 1/1] refactor: ui: move settings page to `pve_flutter_frontend` Shan Shaji
  3 siblings, 0 replies; 5+ messages in thread
From: Shan Shaji @ 2025-08-29 11:48 UTC (permalink / raw)
  To: pve-devel

According to Apple's App Store review guidelines all apps must include a
link to their privacy policy within the App [0]. To fix the issue add a
new list item in the settings screen that will allow users to access the
privacy policy.

[0] - https://developer.apple.com/app-store/review/guidelines/#legal

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/pages/pve_settings_page.dart | 27 +++++++++++++++++++++++++++
 lib/utils/links.dart             |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/lib/pages/pve_settings_page.dart b/lib/pages/pve_settings_page.dart
index 0d405c1..1f57f1c 100644
--- a/lib/pages/pve_settings_page.dart
+++ b/lib/pages/pve_settings_page.dart
@@ -1,5 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:proxmox_login_manager/proxmox_general_settings_form.dart';
+import 'package:pve_flutter_frontend/utils/links.dart';
 import 'package:pve_flutter_frontend/widgets/pve_app_bar.dart';
 
 class PveSettingsPage extends StatelessWidget {
@@ -15,6 +16,32 @@ class PveSettingsPage extends StatelessWidget {
         child: Column(
           children: [
             ProxmoxGeneralSettingsForm(),
+            const ListTile(
+              title: Text(
+                'LEGAL',
+                style: TextStyle(
+                  fontWeight: FontWeight.bold,
+                ),
+              ),
+            ),
+            ListTile(
+              leading: const Icon(Icons.privacy_tip_outlined),
+              title: const Text('Privacy Policy'),
+              trailing: const Icon(Icons.open_in_new),
+              onTap: () {
+                try {
+                  tryLaunchUrl(Links.privacyPolicyUrl);
+                } catch (_) {
+                  ScaffoldMessenger.of(context).showSnackBar(
+                    const SnackBar(
+                      content: Text(
+                        'Could not launch privacy policy',
+                      ),
+                    ),
+                  );
+                }
+              },
+            ),
           ],
         ),
       ),
diff --git a/lib/utils/links.dart b/lib/utils/links.dart
index 29b0501..bab1b80 100644
--- a/lib/utils/links.dart
+++ b/lib/utils/links.dart
@@ -16,4 +16,6 @@ class Links {
       Uri.parse('https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user');
   static final opaqueApp = Uri.parse(
       'https://play.google.com/store/apps/details?id=com.undatech.opaque');
+  static final privacyPolicyUrl = Uri.parse(
+      'https://pve.proxmox.com/wiki/Proxmox_VE_Mobile_Companion_Data_Protection');
 }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH pve_flutter_frontend 3/3] ui: settings: add proxmox forum and bugzilla links
  2025-08-29 11:48 [pve-devel] [PATCH proxmox_login_manager/pve_flutter_frontend 0/4] refactor settings screen and add HELP, LEGAL section in settings Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 1/3] refactor: ui: add new settings page and use existing ssl toggle widget Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 2/3] ui: settings: add privacy policy url link in settings screen Shan Shaji
@ 2025-08-29 11:48 ` Shan Shaji
  2025-08-29 11:48 ` [pve-devel] [PATCH proxmox_login_manager 1/1] refactor: ui: move settings page to `pve_flutter_frontend` Shan Shaji
  3 siblings, 0 replies; 5+ messages in thread
From: Shan Shaji @ 2025-08-29 11:48 UTC (permalink / raw)
  To: pve-devel

Right now all concerns and bugs are being raised in the play
console. To allow users to directly access proxmox forum and report bugs
in bugzilla, add help section in settings page.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/pages/pve_settings_page.dart | 121 +++++++++++++++++++++++++------
 lib/utils/links.dart             |   2 +
 2 files changed, 99 insertions(+), 24 deletions(-)

diff --git a/lib/pages/pve_settings_page.dart b/lib/pages/pve_settings_page.dart
index 1f57f1c..8d4078d 100644
--- a/lib/pages/pve_settings_page.dart
+++ b/lib/pages/pve_settings_page.dart
@@ -16,35 +16,108 @@ class PveSettingsPage extends StatelessWidget {
         child: Column(
           children: [
             ProxmoxGeneralSettingsForm(),
-            const ListTile(
-              title: Text(
-                'LEGAL',
-                style: TextStyle(
-                  fontWeight: FontWeight.bold,
+            _PveSettingsSection(
+              sectionTitle: 'LEGAL',
+              items: [
+                ListTile(
+                  leading: const Icon(Icons.privacy_tip_outlined),
+                  title: const Text('Privacy Policy'),
+                  trailing: const Icon(Icons.open_in_new),
+                  onTap: () => _launchUrl(
+                    url: Links.privacyPolicyUrl,
+                    onFailure: () {
+                      ScaffoldMessenger.of(context).showSnackBar(
+                        const SnackBar(
+                          content: Text(
+                            'Could not launch privacy policy',
+                          ),
+                        ),
+                      );
+                    },
+                  ),
                 ),
-              ),
-            ),
-            ListTile(
-              leading: const Icon(Icons.privacy_tip_outlined),
-              title: const Text('Privacy Policy'),
-              trailing: const Icon(Icons.open_in_new),
-              onTap: () {
-                try {
-                  tryLaunchUrl(Links.privacyPolicyUrl);
-                } catch (_) {
-                  ScaffoldMessenger.of(context).showSnackBar(
-                    const SnackBar(
-                      content: Text(
-                        'Could not launch privacy policy',
-                      ),
-                    ),
-                  );
-                }
-              },
+              ],
             ),
+            _PveSettingsSection(
+              sectionTitle: 'HELP',
+              items: [
+                ListTile(
+                  leading: Icon(Icons.web),
+                  trailing: const Icon(Icons.open_in_new),
+                  title: const Text('Proxmox Forum'),
+                  onTap: () => _launchUrl(
+                    url: Links.proxmoxForum,
+                    onFailure: () {
+                      ScaffoldMessenger.of(context).showSnackBar(
+                        const SnackBar(
+                          content: Text(
+                            'Could not open forum',
+                          ),
+                        ),
+                      );
+                    },
+                  ),
+                ),
+                ListTile(
+                  leading: Icon(Icons.bug_report_outlined),
+                  trailing: const Icon(Icons.open_in_new),
+                  title: const Text('Report a bug'),
+                  onTap: () => _launchUrl(
+                    url: Links.bugzillaUri,
+                    onFailure: () {
+                      ScaffoldMessenger.of(context).showSnackBar(
+                        const SnackBar(
+                          content: Text(
+                            'Could not open bugzilla',
+                          ),
+                        ),
+                      );
+                    },
+                  ),
+                )
+              ],
+            )
           ],
         ),
       ),
     );
   }
+
+  void _launchUrl({
+    required Uri url,
+    required VoidCallback onFailure,
+  }) {
+    try {
+      tryLaunchUrl(url);
+    } catch (_) {
+      onFailure();
+    }
+  }
+}
+
+class _PveSettingsSection extends StatelessWidget {
+  const _PveSettingsSection({
+    required this.sectionTitle,
+    required this.items,
+  });
+
+  final String sectionTitle;
+  final List<Widget> items;
+
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      children: [
+        ListTile(
+          title: Text(
+            sectionTitle,
+            style: TextStyle(
+              fontWeight: FontWeight.bold,
+            ),
+          ),
+        ),
+        ...items,
+      ],
+    );
+  }
 }
diff --git a/lib/utils/links.dart b/lib/utils/links.dart
index bab1b80..3c1797e 100644
--- a/lib/utils/links.dart
+++ b/lib/utils/links.dart
@@ -18,4 +18,6 @@ class Links {
       'https://play.google.com/store/apps/details?id=com.undatech.opaque');
   static final privacyPolicyUrl = Uri.parse(
       'https://pve.proxmox.com/wiki/Proxmox_VE_Mobile_Companion_Data_Protection');
+  static final bugzillaUri =
+      Uri.parse('https://bugzilla.proxmox.com/enter_bug.cgi?product=pve');
 }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH proxmox_login_manager 1/1] refactor: ui: move settings page to `pve_flutter_frontend`
  2025-08-29 11:48 [pve-devel] [PATCH proxmox_login_manager/pve_flutter_frontend 0/4] refactor settings screen and add HELP, LEGAL section in settings Shan Shaji
                   ` (2 preceding siblings ...)
  2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 3/3] ui: settings: add proxmox forum and bugzilla links Shan Shaji
@ 2025-08-29 11:48 ` Shan Shaji
  3 siblings, 0 replies; 5+ messages in thread
From: Shan Shaji @ 2025-08-29 11:48 UTC (permalink / raw)
  To: pve-devel

The setting screen UI was previously defined in this repo. If a new app
settings needs to be added eg: privacy policy link, app version string.
The change had to be done in the package even though the change is not
package specific.

Inorder to fix that, move settings page to `pve_flutter_frontend` and use
`ProxmoxGeneralSettingsForm` as a widget in the new settings page.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/proxmox_general_settings_form.dart | 58 +++++++++++---------------
 lib/proxmox_login_form.dart            |  5 +--
 lib/proxmox_login_selector.dart        | 13 +++---
 3 files changed, 31 insertions(+), 45 deletions(-)

diff --git a/lib/proxmox_general_settings_form.dart b/lib/proxmox_general_settings_form.dart
index cb0afef..e39f91d 100644
--- a/lib/proxmox_general_settings_form.dart
+++ b/lib/proxmox_general_settings_form.dart
@@ -12,6 +12,7 @@ class ProxmoxGeneralSettingsForm extends StatefulWidget {
 class _ProxmoxGeneralSettingsFormState
     extends State<ProxmoxGeneralSettingsForm> {
   Future<ProxmoxGeneralSettingsModel>? _settings;
+
   @override
   void initState() {
     super.initState();
@@ -20,41 +21,30 @@ class _ProxmoxGeneralSettingsFormState
 
   @override
   Widget build(BuildContext context) {
-    return Scaffold(
-      appBar: AppBar(
-        title: const Text('Settings'),
-      ),
-      body: FutureBuilder<ProxmoxGeneralSettingsModel>(
-          future: _settings,
-          builder: (context, snaptshot) {
-            if (snaptshot.hasData) {
-              final settings = snaptshot.data!;
-              return SingleChildScrollView(
-                child: Column(
-                  children: [
-                    SwitchListTile(
-                      title: const Text('Validate SSL connections'),
-                      subtitle: const Text('e.g. validates certificates'),
-                      value: settings.sslValidation!,
-                      onChanged: (value) async {
-                        await settings
-                            .rebuild((b) => b.sslValidation = value)
-                            .toLocalStorage();
-                        setState(() {
-                          _settings =
-                              ProxmoxGeneralSettingsModel.fromLocalStorage();
-                        });
-                      },
-                    )
-                  ],
-                ),
-              );
-            }
+    return FutureBuilder<ProxmoxGeneralSettingsModel>(
+      future: _settings,
+      builder: (context, snapShot) {
+        if (snapShot.hasData) {
+          final settings = snapShot.data!;
+          return SwitchListTile(
+            title: const Text('Validate SSL connections'),
+            subtitle: const Text('e.g. validates certificates'),
+            value: settings.sslValidation!,
+            onChanged: (value) async {
+              await settings
+                  .rebuild((b) => b.sslValidation = value)
+                  .toLocalStorage();
+              setState(() {
+                _settings = ProxmoxGeneralSettingsModel.fromLocalStorage();
+              });
+            },
+          );
+        }
 
-            return const Center(
-              child: CircularProgressIndicator(),
-            );
-          }),
+        return const Center(
+          child: CircularProgressIndicator(),
+        );
+      },
     );
   }
 }
diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart
index 5a2db3b..db9994b 100644
--- a/lib/proxmox_login_form.dart
+++ b/lib/proxmox_login_form.dart
@@ -6,7 +6,6 @@ import 'package:collection/collection.dart';
 import 'package:proxmox_dart_api_client/proxmox_dart_api_client.dart'
     as proxclient;
 import 'package:proxmox_dart_api_client/proxmox_dart_api_client.dart';
-import 'package:proxmox_login_manager/proxmox_general_settings_form.dart';
 import 'package:proxmox_login_manager/proxmox_general_settings_model.dart';
 import 'package:proxmox_login_manager/proxmox_login_model.dart';
 import 'package:proxmox_login_manager/proxmox_tfa_form.dart';
@@ -829,9 +828,7 @@ class ProxmoxCertificateErrorDialog extends StatelessWidget {
           child: const Text('Close'),
         ),
         TextButton(
-          onPressed: () => Navigator.of(context).pushReplacement(
-              MaterialPageRoute(
-                  builder: (context) => const ProxmoxGeneralSettingsForm())),
+          onPressed: () => Navigator.popAndPushNamed(context, '/settings'),
           child: const Text('Settings'),
         )
       ],
diff --git a/lib/proxmox_login_selector.dart b/lib/proxmox_login_selector.dart
index ba84d7d..c8d9813 100644
--- a/lib/proxmox_login_selector.dart
+++ b/lib/proxmox_login_selector.dart
@@ -1,6 +1,5 @@
 import 'package:flutter/material.dart';
 import 'package:built_collection/built_collection.dart';
-import 'package:proxmox_login_manager/proxmox_general_settings_form.dart';
 import 'package:proxmox_login_manager/proxmox_login_form.dart';
 import 'package:proxmox_login_manager/proxmox_login_model.dart';
 import 'package:proxmox_dart_api_client/proxmox_dart_api_client.dart'
@@ -52,12 +51,12 @@ class _ProxmoxLoginSelectorState extends State<ProxmoxLoginSelector> {
         ),
         actions: [
           IconButton(
-              icon: const Icon(Icons.settings),
-              onPressed: () {
-                Navigator.of(context).push(MaterialPageRoute(
-                  builder: (context) => const ProxmoxGeneralSettingsForm(),
-                ));
-              })
+            icon: const Icon(Icons.settings),
+            onPressed: () => Navigator.pushNamed(
+              context,
+              '/settings',
+            ),
+          )
         ],
       ),
       body: FutureBuilder<ProxmoxLoginStorage?>(
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-29 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-29 11:48 [pve-devel] [PATCH proxmox_login_manager/pve_flutter_frontend 0/4] refactor settings screen and add HELP, LEGAL section in settings Shan Shaji
2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 1/3] refactor: ui: add new settings page and use existing ssl toggle widget Shan Shaji
2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 2/3] ui: settings: add privacy policy url link in settings screen Shan Shaji
2025-08-29 11:48 ` [pve-devel] [PATCH pve_flutter_frontend 3/3] ui: settings: add proxmox forum and bugzilla links Shan Shaji
2025-08-29 11:48 ` [pve-devel] [PATCH proxmox_login_manager 1/1] refactor: ui: move settings page to `pve_flutter_frontend` Shan Shaji

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal