diff --git a/CircleViewerMaui/Activity.xaml b/CircleViewerMaui/Activity.xaml
new file mode 100644
index 0000000..a91eb01
--- /dev/null
+++ b/CircleViewerMaui/Activity.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
diff --git a/CircleViewerMaui/Activity.xaml.cs b/CircleViewerMaui/Activity.xaml.cs
new file mode 100644
index 0000000..7c4362d
--- /dev/null
+++ b/CircleViewerMaui/Activity.xaml.cs
@@ -0,0 +1,14 @@
+using CommunityToolkit.Maui.Views;
+using System.ComponentModel;
+using CircleViewerMaui.Popups;
+
+namespace CircleViewerMaui
+{
+ public partial class Activity : ContentPage
+ {
+ public Activity()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/CircleViewerMaui/AppShell.xaml b/CircleViewerMaui/AppShell.xaml
index c96b795..93ad684 100644
--- a/CircleViewerMaui/AppShell.xaml
+++ b/CircleViewerMaui/AppShell.xaml
@@ -5,20 +5,18 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CircleViewerMaui"
Shell.FlyoutBehavior="Flyout">
-
-
-
+ Title="User Groups"
+ ContentTemplate="{DataTemplate local:UserGroups}"
+ Route="UserGroups" />
+ Title="Activity"
+ ContentTemplate="{DataTemplate local:Activity}"
+ Route="Activity" />
+
diff --git a/CircleViewerMaui/CircleViewerMaui.csproj b/CircleViewerMaui/CircleViewerMaui.csproj
index 2afb6a2..88fa03b 100644
--- a/CircleViewerMaui/CircleViewerMaui.csproj
+++ b/CircleViewerMaui/CircleViewerMaui.csproj
@@ -71,6 +71,12 @@
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
MSBuild:Compile
diff --git a/CircleViewerMaui/MainPage.xaml.cs b/CircleViewerMaui/MainPage.xaml.cs
index 6b8841a..82b7b4d 100644
--- a/CircleViewerMaui/MainPage.xaml.cs
+++ b/CircleViewerMaui/MainPage.xaml.cs
@@ -1,5 +1,7 @@
using System.Reflection;
using CDPShared;
+using CircleViewerMaui.Popups;
+using CommunityToolkit.Maui.Views;
using Syncfusion.Maui.PdfViewer;
namespace CircleViewerMaui;
@@ -61,8 +63,17 @@ public partial class MainPage : ContentPage
return null;
}
+ async Task TestPopup()
+ {
+ var popup = new NewInvite("AS3RT3", "POEW");
+ popup.CanBeDismissedByTappingOutsideOfPopup = false;
+ this.ShowPopup(popup);
+ }
+
private async void onOpenClicked(object sender, EventArgs e)
{
+// await TestPopup();
+
var filePath = await OpenCirFileAsync();
if (filePath != null)
{
diff --git a/CircleViewerMaui/Popups/NewInvite.xaml b/CircleViewerMaui/Popups/NewInvite.xaml
new file mode 100644
index 0000000..125063d
--- /dev/null
+++ b/CircleViewerMaui/Popups/NewInvite.xaml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CircleViewerMaui/Popups/NewInvite.xaml.cs b/CircleViewerMaui/Popups/NewInvite.xaml.cs
new file mode 100644
index 0000000..32699f8
--- /dev/null
+++ b/CircleViewerMaui/Popups/NewInvite.xaml.cs
@@ -0,0 +1,23 @@
+using CommunityToolkit.Maui.Views;
+
+namespace CircleViewerMaui.Popups
+{
+ public partial class NewInvite : Popup
+ {
+ string _inviteCode;
+ private string _authCode;
+ public NewInvite(string inviteCode, string authCode)
+ {
+ _inviteCode = inviteCode;
+ _authCode = authCode;
+ InitializeComponent();
+ lblInviteCode.Text = _inviteCode;
+ lblAuthCode.Text = _authCode;
+ }
+
+ private void OnOKButtonClicked(object sender, EventArgs e)
+ {
+ Close();
+ }
+ }
+}
diff --git a/CircleViewerMaui/UserGroups.xaml b/CircleViewerMaui/UserGroups.xaml
index 3a4493d..d20284a 100644
--- a/CircleViewerMaui/UserGroups.xaml
+++ b/CircleViewerMaui/UserGroups.xaml
@@ -30,12 +30,12 @@
Text="Request code:"
TextColor="Purple"
VerticalOptions="Center"/>
-
+
-
+
@@ -47,8 +47,8 @@
VerticalOptions="Center"
HorizontalOptions="Fill"
HorizontalTextAlignment="Center"/>
-
-
+
+
diff --git a/CircleViewerMaui/UserGroups.xaml.cs b/CircleViewerMaui/UserGroups.xaml.cs
index 3cff98f..f74d1de 100644
--- a/CircleViewerMaui/UserGroups.xaml.cs
+++ b/CircleViewerMaui/UserGroups.xaml.cs
@@ -1,6 +1,9 @@
using CircleSDK.Model;
using CommunityToolkit.Maui.Alerts;
using CommunityToolkit.Maui.Core;
+using System.Collections.Generic;
+using CircleViewerMaui.Popups;
+using CommunityToolkit.Maui.Views;
namespace CircleViewerMaui
{
@@ -11,9 +14,13 @@ namespace CircleViewerMaui
{
InitializeComponent();
Circles = new List(App.CDP.Circles);
-// Circles = App.CDP.Circles;
-// lvCircles.ItemsSource = App.CDP.Circles;
- circlePicker.ItemsSource = App.CDP.Circles;
+ // Circles = App.CDP.Circles;
+ // lvCircles.ItemsSource = App.CDP.Circles;
+
+ var ordered = App.CDP.Circles.OrderBy(dr => dr.CircleName);
+ Circles = new List();
+ Circles.AddRange(ordered);
+ circlePicker.ItemsSource = Circles;
circlePicker.ItemDisplayBinding = new Binding("CircleName");
}
@@ -37,5 +44,16 @@ namespace CircleViewerMaui
var toast = Toast.Make(text, duration, fontSize);
await toast.Show(cancellationTokenSource.Token);
}
+
+ private async void BnGenInvite_OnClicked(object sender, EventArgs e)
+ {
+ CircleInfo ci = (CircleInfo) circlePicker.SelectedItem;
+ if (ci == null)
+ return;
+ var invite = await App.CDP.GenInvite(ci.CircleId);
+ var popup = new NewInvite(invite.Invite.InviteId, invite.Invite.AuthCode);
+ popup.CanBeDismissedByTappingOutsideOfPopup = false;
+ this.ShowPopup(popup);
+ }
}
}