From eefb7fc0eac0e329eb263bd04a623fd5f8a103b7 Mon Sep 17 00:00:00 2001 From: Gerwin Kuijntjes Date: Thu, 2 Apr 2026 11:52:01 +0200 Subject: [PATCH] Design: dashboard-style ConnectionsPage with rich connection cards - Add header with ProjectDiagram icon, app title, and connection count - Replace plain ListView with styled cards (Border + rounded corners) - Each card shows: database icon, name, host, scheme badge, secure lock - Inline edit/delete buttons on each card (pencil + trash icons) - Hide nav bar title (dashboard header replaces it) - Add computed properties: IsSecure, SchemeShortName, DisplayName - Add ConnectionCountLabel to ViewModel - Add OpenConnection command for card tap handling Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Models/Neo4jConnectionString.cs | 6 + .../Xamarin.Neo4j/Pages/ConnectionsPage.xaml | 178 ++++++++++++++---- .../Pages/ConnectionsPage.xaml.cs | 6 +- .../ViewModels/ConnectionsViewModel.cs | 21 +++ 4 files changed, 169 insertions(+), 42 deletions(-) diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Models/Neo4jConnectionString.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Models/Neo4jConnectionString.cs index 57171cd..f9794b2 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Models/Neo4jConnectionString.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Models/Neo4jConnectionString.cs @@ -27,6 +27,12 @@ namespace Xamarin.Neo4j.Models public string Password { get; set; } + public bool IsSecure => Scheme?.Contains("+s") ?? false; + + public string SchemeShortName => Scheme != null && Scheme.StartsWith("bolt") ? "bolt" : "neo4j"; + + public string DisplayName => string.IsNullOrWhiteSpace(Name) ? Host : Name; + public Tuple ParseHost() { var fullHost = Scheme + Host; diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Pages/ConnectionsPage.xaml b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Pages/ConnectionsPage.xaml index 5f7fe1d..0b1c013 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Pages/ConnectionsPage.xaml +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Pages/ConnectionsPage.xaml @@ -3,58 +3,160 @@ + Title=" "> - - - - - - - - - - - - - + - -