From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 624A51FF186 for ; Fri, 29 Aug 2025 13:49:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 04FE82CC92; Fri, 29 Aug 2025 13:49:37 +0200 (CEST) From: Shan Shaji To: pve-devel@lists.proxmox.com Date: Fri, 29 Aug 2025 13:48:45 +0200 Message-ID: <20250829114846.88507-4-s.shaji@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250829114846.88507-1-s.shaji@proxmox.com> References: <20250829114846.88507-1-s.shaji@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1756468135930 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.172 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH pve_flutter_frontend 3/3] ui: settings: add proxmox forum and bugzilla links X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "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 --- 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 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