-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refine the invest flow * Wip * Add Invest wizard * Added Nostr part * Add gauges * Fix header * Completed invest wizard * Refine use of IProject * Complete Browse flow * Add Launcher Service * Improve more * Polish * More polish * Use projects + polishing
- Loading branch information
Showing
59 changed files
with
1,087 additions
and
239 deletions.
There are no files selected for viewing
48 changes: 26 additions & 22 deletions
48
src/Angor/Avalonia/AngorApp.Desktop/AngorApp.Desktop.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects. | ||
One for Windows with net9.0-windows TFM, one for MacOS with net9.0-macos and one with net9.0 TFM for Linux.--> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects. | ||
One for Windows with net9.0-windows TFM, one for MacOS with net9.0-macos and one with net9.0 TFM for Linux.--> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport> | ||
<Company>Angor</Company> | ||
<Product>Angor</Product> | ||
<AssemblyName>Angor</AssemblyName> | ||
<RootNamespace>Angor</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<ApplicationManifest>app.manifest</ApplicationManifest> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<ApplicationManifest>app.manifest</ApplicationManifest> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Avalonia.Desktop" /> | ||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> | ||
<PackageReference Include="Avalonia.Diagnostics" > | ||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets> | ||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Avalonia.Desktop"/> | ||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> | ||
<PackageReference Include="Avalonia.Diagnostics"> | ||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets> | ||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\AngorApp\AngorApp.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\AngorApp\AngorApp.csproj"/> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:avalonia="https://github.com/projektanker/icons.avalonia" | ||
xmlns:details="clr-namespace:AngorApp.Sections.Browse.Details" | ||
xmlns:common="clr-namespace:AngorApp.Common" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="AngorApp.Common.SuccessView" x:DataType="common:SuccessViewModel"> | ||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> | ||
<avalonia:Icon Value="fa-solid fa-check" Foreground="Green" FontSize="20" Margin="10" /> | ||
<TextBlock Text="{Binding Message}" VerticalAlignment="Center" /> | ||
</StackPanel> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace AngorApp.Common; | ||
|
||
public partial class SuccessView : UserControl | ||
{ | ||
public SuccessView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Reactive.Linq; | ||
using Zafiro.Avalonia.Controls.Wizards.Builder; | ||
|
||
namespace AngorApp.Common; | ||
|
||
public class SuccessViewModel : IStep | ||
{ | ||
public string Message { get; } | ||
|
||
public SuccessViewModel(string message) | ||
{ | ||
Message = message; | ||
} | ||
|
||
public IObservable<bool> IsValid => Observable.Return(false); | ||
public IObservable<bool> IsBusy => Observable.Return(false); | ||
public bool AutoAdvance => false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<Styles xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:z="clr-namespace:Zafiro.Avalonia.Dialogs;assembly=Zafiro.Avalonia.Dialogs" | ||
xmlns:views="clr-namespace:Zafiro.Avalonia.Dialogs.Views;assembly=Zafiro.Avalonia.Dialogs" | ||
xmlns:generic="clr-namespace:System.Collections.Generic;assembly=System.Collections" | ||
xmlns:angorApp="clr-namespace:AngorApp" | ||
xmlns:amount="clr-namespace:AngorApp.Sections.Browse.Details.Invest.Amount" | ||
xmlns:controls="clr-namespace:AngorApp.Controls"> | ||
<Design.PreviewWith> | ||
<z:DialogView Width="600" Height="500"> | ||
<z:DialogView.Content> | ||
<amount:AmountView VerticalAlignment="Center" /> | ||
</z:DialogView.Content> | ||
<z:DialogView.Options> | ||
<generic:List x:TypeArguments="z:IOption"> | ||
<controls:OptionDesign Title="Next" /> | ||
<controls:OptionDesign Title="Cancel" /> | ||
</generic:List> | ||
</z:DialogView.Options> | ||
</z:DialogView> | ||
</Design.PreviewWith> | ||
|
||
<Style Selector="z|DialogViewContainer.Desktop"> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Border Background="{StaticResource Level1}" Padding="20"> | ||
<ContentPresenter Content="{TemplateBinding Content}" /> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter> | ||
</Style> | ||
|
||
<Style Selector="z|DialogView"> | ||
<Setter Property="OptionsPanelHeight" Value="30" /> | ||
<Setter Property="Template"> | ||
<ControlTemplate TargetType="z:DialogView"> | ||
<Border Background="{StaticResource Level1}"> | ||
<DockPanel x:DataType="z:DialogViewModel" x:CompileBindings="True"> | ||
<DockPanel.DataTemplates> | ||
<DataTemplate DataType="z:MessageDialogViewModel"> | ||
<views:MessageDialogView /> | ||
</DataTemplate> | ||
</DockPanel.DataTemplates> | ||
<ItemsControl Margin="0 10 0 0" HorizontalAlignment="Right" ItemsSource="{TemplateBinding Options}" | ||
DockPanel.Dock="Bottom"> | ||
<ItemsControl.ItemContainerTheme> | ||
<ControlTheme TargetType="ContentPresenter"> | ||
<Setter x:DataType="z:IOption" Property="IsVisible" Value="{Binding IsVisible^}" /> | ||
</ControlTheme> | ||
</ItemsControl.ItemContainerTheme> | ||
<ItemsControl.ItemsPanel> | ||
<ItemsPanelTemplate> | ||
<StackPanel Orientation="Horizontal" Spacing="8" /> | ||
</ItemsPanelTemplate> | ||
</ItemsControl.ItemsPanel> | ||
<ItemsControl.ItemTemplate> | ||
<DataTemplate x:DataType="z:IOption"> | ||
<Button HorizontalContentAlignment="Center" | ||
VerticalAlignment="Stretch" | ||
HorizontalAlignment="Stretch" | ||
Command="{Binding Command}" | ||
IsDefault="{Binding IsDefault}" | ||
IsCancel="{Binding IsCancel}" | ||
Content="{Binding Title}" /> | ||
</DataTemplate> | ||
</ItemsControl.ItemTemplate> | ||
</ItemsControl> | ||
<ContentControl Margin="0 4" Content="{TemplateBinding Content}" /> | ||
</DockPanel> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter> | ||
</Style> | ||
</Styles> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Reactive.Linq; | ||
using Zafiro.Avalonia.Commands; | ||
using Zafiro.Avalonia.Dialogs; | ||
|
||
namespace AngorApp.Controls; | ||
|
||
public class OptionDesign : IOption | ||
{ | ||
public string Title { get; set; } | ||
public IEnhancedCommand Command { get; } | ||
public bool IsDefault { get; set; } | ||
public bool IsCancel { get; set; } | ||
public IObservable<bool> IsVisible { get; } = Observable.Return(true); | ||
} |
Oops, something went wrong.