-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5f064f
commit 0404699
Showing
3 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
OpenLyricsClient/Frontend/Models/Pages/Settings/SettingsUserPageViewModel.cs
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,26 @@ | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Reactive; | ||
using System.Runtime.CompilerServices; | ||
using OpenLyricsClient.Backend; | ||
using ReactiveUI; | ||
|
||
namespace OpenLyricsClient.Frontend.Models.Pages.Settings; | ||
|
||
public class SettingsUserPageViewModel : ViewModelBase, INotifyPropertyChanged | ||
{ | ||
public event PropertyChangedEventHandler? PropertyChanged; | ||
|
||
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) | ||
{ | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
|
||
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null) | ||
{ | ||
if (EqualityComparer<T>.Default.Equals(field, value)) return false; | ||
field = value; | ||
OnPropertyChanged(propertyName); | ||
return true; | ||
} | ||
} |
134 changes: 134 additions & 0 deletions
134
OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml
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,134 @@ | ||
<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:elements="clr-namespace:OpenLyricsClient.Frontend.Models.Elements" | ||
xmlns:settings="clr-namespace:OpenLyricsClient.Frontend.Models.Pages.Settings" | ||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" | ||
mc:Ignorable="d" | ||
d:DesignWidth="1000" | ||
d:DesignHeight="1000" | ||
x:Class="OpenLyricsClient.Frontend.View.Pages.Settings.SettingsUserPage"> | ||
|
||
<UserControl.DataContext> | ||
<settings:SettingsUserPageViewModel/> | ||
</UserControl.DataContext> | ||
|
||
<Grid Background="{DynamicResource PrimaryBackgroundBrush}"> | ||
|
||
<ScrollViewer VerticalScrollBarVisibility="Auto" | ||
HorizontalScrollBarVisibility="Auto" | ||
VerticalAlignment="Top" | ||
Margin="10,0,10,0"> | ||
|
||
<StackPanel Margin="0,20,0,0" | ||
HorizontalAlignment="Center" | ||
Width="800"> | ||
|
||
<StackPanel Orientation="Vertical" | ||
Spacing="10"> | ||
|
||
<elements:GroupBox Classes="clean" | ||
Background="{DynamicResource SecondaryBackgroundBrush}"> | ||
|
||
<StackPanel Margin="15" | ||
Orientation="Vertical" | ||
Spacing="15"> | ||
|
||
<TextBlock FontSize="16" | ||
VerticalAlignment="Top" | ||
HorizontalAlignment="Left" | ||
FontWeight="Bold" | ||
Text="Profile"> | ||
</TextBlock> | ||
|
||
<TextBlock Text="Here you can get your user information and you current plan"></TextBlock> | ||
|
||
<Grid ColumnDefinitions="Auto, Auto, Auto" Height="200"> | ||
<Border Grid.Column="0" | ||
Width="125" | ||
Height="125" | ||
Margin="40,0,0,0" | ||
Background="{DynamicResource LightBackgroundBrush}" | ||
CornerRadius="30"> | ||
<avalonia:MaterialIcon Kind="User" | ||
Width="80" | ||
Height="80"/> | ||
</Border> | ||
|
||
<Panel Grid.Column="1" | ||
Width="2" | ||
Background="{DynamicResource LightBackgroundBrush}" | ||
Margin="50"></Panel> | ||
|
||
<StackPanel Grid.Column="3" | ||
VerticalAlignment="Center" | ||
Spacing="10"> | ||
|
||
<StackPanel Orientation="Horizontal" Spacing="10"> | ||
<TextBlock Text="User Identification" | ||
FontWeight="Light" | ||
FontSize="15"/> | ||
|
||
<TextBlock Text="3649q694" | ||
FontWeight="Bold" | ||
FontSize="15"/> | ||
</StackPanel> | ||
|
||
<StackPanel Orientation="Horizontal" Spacing="10"> | ||
<TextBlock Text="Secret" | ||
FontWeight="Light" | ||
FontSize="15"/> | ||
|
||
<TextBlock Text="3649q694" | ||
FontWeight="Bold" | ||
FontSize="15"/> | ||
</StackPanel> | ||
|
||
|
||
<StackPanel Orientation="Horizontal" Spacing="10"> | ||
<TextBlock Text="Your plan" | ||
FontWeight="Light" | ||
Margin="0,5,0,0" | ||
FontSize="15"/> | ||
|
||
<Border CornerRadius="10" Background="{DynamicResource LightBackgroundBrush}"> | ||
<StackPanel Orientation="Horizontal" Spacing="0"> | ||
<TextBlock Text="OpenLyricsClient" | ||
FontWeight="Light" | ||
Margin="5,5,0,5" | ||
FontSize="15"/> | ||
|
||
<Border CornerRadius="10"> | ||
<TextBlock Text="Plus" | ||
FontWeight="Bold" | ||
VerticalAlignment="Bottom" | ||
Margin="4,4,5,5" | ||
FontSize="16"> | ||
|
||
<TextBlock.Foreground> | ||
<RadialGradientBrush Center="0.5,0.5" Radius="0.5"> | ||
<GradientStop Color="Blue" Offset="0" /> | ||
<GradientStop Color="Cyan" Offset="0.5" /> | ||
<GradientStop Color="White" Offset="1" /> | ||
</RadialGradientBrush> | ||
</TextBlock.Foreground> | ||
</TextBlock> | ||
</Border> | ||
|
||
</StackPanel> | ||
</Border> | ||
</StackPanel> | ||
|
||
</StackPanel> | ||
</Grid> | ||
|
||
|
||
|
||
</StackPanel> | ||
</elements:GroupBox> | ||
</StackPanel> | ||
</StackPanel> | ||
</ScrollViewer> | ||
</Grid> | ||
</UserControl> |
18 changes: 18 additions & 0 deletions
18
OpenLyricsClient/Frontend/View/Pages/Settings/SettingsUserPage.axaml.cs
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 Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace OpenLyricsClient.Frontend.View.Pages.Settings; | ||
|
||
public partial class SettingsUserPage : UserControl | ||
{ | ||
public SettingsUserPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void InitializeComponent() | ||
{ | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
} |