Skip to content

Commit

Permalink
Merge dev and main branches (#31)
Browse files Browse the repository at this point in the history
* Update host URL in ResourceKeysDictionary

The host URL used in the ResourceKeysDictionary file has been updated from a local address to a production address. Additionally, a minor formatting change was made in the OverviewPageViewModel file.

* Update submodule link Gml.Client

* Replace submodule update with git clone in scripts

The git submodule update command in both the 'load-repositories.sh' and 'load-repositories.bat' scripts has been replaced with git clone. This allows for repositories 'GamerVII.Notification.Avalonia' and 'Gml.Client' to be cloned directly instead of being updated through submodules.

* Update submodule link Gml.Client

* Update submodule link Gml.Client

* Update submodule link Gml.Client

* Update system service, resources, and application UI

The system service has been updated to asynchronously load system data. Additional resource keys and corresponding translations have been added to the localization service. Several changes have been made to the application user interface including a new splash screen, application icon, and version number.

* Update submodule link Gml.Client

* Update submodule Gml.Client

* Add error tracking to AsyncStreamToImageLoader

The update wraps the core logic of the OnSourceChanged method inside a try-catch block. In case of any exceptions during execution, they are captured and sent to Sentry for error tracking and troubleshooting. This ensures smoother runtime and easier debugging.

* Update host URL and clean up code

The host URL in the ResourceKeysDictionary file was changed from a local IP address to an external URL "https://gmlb.recloud.tech".

* Update submodule link Gml.Client

* Add error tracking to AsyncStreamToImageLoader

The update wraps the core logic of the OnSourceChanged method inside a try-catch block. In case of any exceptions during execution, they are captured and sent to Sentry for error tracking and troubleshooting. This ensures smoother runtime and easier debugging.

* Update host URL and clean up code

The host URL in the ResourceKeysDictionary file was changed from a local IP address to an external URL "https://gmlb.recloud.tech".

* Update submodule link Gml.Client

* Update submodule link Gml.Client

* Gif background functionality (#29)

* Merge dev and master btanches (#28)

* Update host URL in ResourceKeysDictionary

The host URL used in the ResourceKeysDictionary file has been updated from a local address to a production address. Additionally, a minor formatting change was made in the OverviewPageViewModel file.

* Replace submodule update with git clone in scripts

The git submodule update command in both the 'load-repositories.sh' and 'load-repositories.bat' scripts has been replaced with git clone. This allows for repositories 'GamerVII.Notification.Avalonia' and 'Gml.Client' to be cloned directly instead of being updated through submodules.

* Update system service, resources, and application UI

The system service has been updated to asynchronously load system data. Additional resource keys and corresponding translations have been added to the localization service. Several changes have been made to the application user interface including a new splash screen, application icon, and version number.

* Update submodule link Gml.Client

* Add error tracking to AsyncStreamToImageLoader

The update wraps the core logic of the OnSourceChanged method inside a try-catch block. In case of any exceptions during execution, they are captured and sent to Sentry for error tracking and troubleshooting. This ensures smoother runtime and easier debugging.

* Update host URL and clean up code

The host URL in the ResourceKeysDictionary file was changed from a local IP address to an external URL "https://gmlb.recloud.tech".

* Add error tracking to AsyncStreamToImageLoader

The update wraps the core logic of the OnSourceChanged method inside a try-catch block. In case of any exceptions during execution, they are captured and sent to Sentry for error tracking and troubleshooting. This ensures smoother runtime and easier debugging.

* Update host URL and clean up code

The host URL in the ResourceKeysDictionary file was changed from a local IP address to an external URL "https://gmlb.recloud.tech".

---------

Co-authored-by: GamerVII-NET <gamervii.phone@gmail.com>

* Add GIF decoding functionality

Introduced several new classes to handle the decoding of GIF files. This includes reading the data stream and processing headers, frames, color tables, and extensions. Functionality for rendering frames and handling exceptions has also been implemented.

* Refactor code and optimize exceptions in gif decoder

Code for gif decoding has been refactored for improved readability and efficiency. The exception handling has been optimized for specific errors, such as LzwDecompressionException, contributing to better error reporting and debugging. Unnecessary comments and code have also been removed.

* Remove unnecessary whitespace in AsyncStreamToImageLoader

This commit eliminates a redundant line in the AsyncStreamToImageLoader class file. The change helps to maintain the cleanliness and readability of the code.

---------

Co-authored-by: GamerVII-NET <111225722+GamerVII-NET@users.noreply.github.com>
Co-authored-by: GamerVII-NET <gamervii.phone@gmail.com>
Co-authored-by: s.bryzglov <s.bryzgalov@icvr.io>
Co-authored-by: Anton Terentev <gamervii@icloud.com>

* Refactor LoginPageViewModel and update AsyncStreamToImageLoader

This commit refactors LoginPageViewModel to change the type of _screen from IScreen to MainWindowViewModel. This allows the app to subscribe to the 'OnClosed' event of the main window, and dispose of connections when the window is closed to prevent memory leaks. AsyncStreamToImageLoader has also been updated to clear avatar image classes upfront and enhance filename checking mechanism to prevent non-loaded images.

* Update submodule link Gml.Client

* Update background component in MainWindow

Updated the background image's component in MainWindow.axaml file. Added a class attribute, which can be used for styling or Javascript manipulation in the future.

* Remove invalid character from document.svg

The first character of the document.svg file in the Gml.Launcher/Assets/Images directory was an invalid character and is now removed. This fix ensures that the SVG file is correctly formed and interprets as expected.

* Add 'launcher' project and comment out language combo box

Added a new 'launcher' project to the Gml.Launcher.sln file and made adjustments to project settings for consistency. Additionally, commented out the language selection combo box in the SettingsPageView.axaml as it is currently not in use.

* Update submodule Gml.Client

* Update submodule Update submodule link Gml.Client

* Switch host and update debugging settings

Furthermore, the debugging settings in App.axaml.cs have been updated to not debug mode, and the return value in case of null 'actualVersion' has been set to true in SplashScreenViewModel.cs.

* Optimize system data loading process

The previous implementation executed the tasks for refreshing the drive, motherboard, and CPU lists sequentially. This was unnecessarily time-consuming. With the new implementation, these tasks are run concurrently using Task.WhenAll method for better performance and efficiency.

* Change execution context for MainWindow in debug mode

This update modifies the execution context for MainWindow in the Gml.Launcher App. Previously, it was running in non-debug mode. Now, it is set up to run in debug mode.

* Disable window resizing and update pointer events handling

A new property `CanResize=False` has been added to the MainWindow.axaml to prevent the window from being resized. The pointer events handling logic was moved from OverviewPageView to MainWindow. This was done to ensure better control over dragging behavior and to prevent inappropriate actions during specific interactions.

* Update settings validation for window size

Improved the validation and error-handling approach for setting window size parameters. Now, the windowWidth and windowHeight values are only updated when numeric values are provided. If non-numeric values are input, they will be reset to default.

* Remove commented out code in MainWindow.axaml.cs

* Added default font

* Update font styles and host URL

This commit updates the font styles across several components, improving text readability and consistency. It also switches the host URL in the ResourceKeysDictionary to a production-ready address.

* Update submodule link Gml.Client

---------

Co-authored-by: GamerVII-NET <gamervii.phone@gmail.com>
Co-authored-by: Sergey Bryzgalov <123618366+l1sonnn@users.noreply.github.com>
Co-authored-by: s.bryzglov <s.bryzgalov@icvr.io>
  • Loading branch information
4 people authored Jun 11, 2024
1 parent a828395 commit 726cad9
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Gml.Client
1 change: 1 addition & 0 deletions src/Gml.Launcher/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="Assets/Styles/Colors.axaml"/>
</ResourceDictionary.MergedDictionaries>
<FontFamily x:Key="ManropeFont">avares://Gml.Launcher/Assets/Fonts#Manrope</FontFamily>
</ResourceDictionary>
</Application.Resources>

Expand Down
Binary file added src/Gml.Launcher/Assets/Fonts/Manrope-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/Gml.Launcher/Assets/Fonts/Manrope-Light.ttf
Binary file not shown.
Binary file added src/Gml.Launcher/Assets/Fonts/Manrope-Medium.ttf
Binary file not shown.
Binary file added src/Gml.Launcher/Assets/Fonts/Manrope-Regular.ttf
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions src/Gml.Launcher/Assets/Styles/Classes.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
</components:StackFrameBorder>
</Design.PreviewWith>

<Style Selector="TextBlock">
<Setter Property="FontFamily" Value="Manrope"/>
</Style>

<Style Selector="TextBlock.FormText">
<Setter Property="Foreground" Value="{DynamicResource ContentColor}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
Expand Down
11 changes: 5 additions & 6 deletions src/Gml.Launcher/Core/Services/SystemService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ public string GetHwid()

public async Task LoadSystemData()
{
await Task.Run(() =>
{
_hardwareInfo.RefreshDriveList();
_hardwareInfo.RefreshMotherboardList();
_hardwareInfo.RefreshCPUList();
});
var refreshDriveListTask = Task.Run(() => _hardwareInfo.RefreshDriveList());
var refreshMotherboardListTask = Task.Run(() => _hardwareInfo.RefreshMotherboardList());
var refreshCpuListTask = Task.Run(() => _hardwareInfo.RefreshCPUList());

await Task.WhenAll(refreshDriveListTask, refreshMotherboardListTask, refreshCpuListTask);
}

private static string GetFolderPath(Environment.SpecialFolder folder)
Expand Down
26 changes: 24 additions & 2 deletions src/Gml.Launcher/ViewModels/Pages/SettingsPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,35 @@ public double RamValue
public string WindowWidth
{
get => _windowWidth.ToString();
set => this.RaiseAndSetIfChanged(ref _windowWidth, int.Parse(string.Concat(value.Where(char.IsDigit))));
set
{
var isNumeric = int.TryParse(string.Concat(value.Where(char.IsDigit)), out int numericValue);
if (isNumeric)
{
this.RaiseAndSetIfChanged(ref _windowWidth, numericValue);
}
else
{
this.RaiseAndSetIfChanged(ref _windowWidth, default);
}
}
}

public string WindowHeight
{
get => _windowHeight.ToString();
set => this.RaiseAndSetIfChanged(ref _windowHeight, int.Parse(string.Concat(value.Where(char.IsDigit))));
set
{
var isNumeric = int.TryParse(string.Concat(value.Where(char.IsDigit)), out int numericValue);
if (isNumeric)
{
this.RaiseAndSetIfChanged(ref _windowHeight, numericValue);
}
else
{
this.RaiseAndSetIfChanged(ref _windowWidth, default);
}
}
}

public ObservableCollection<Language> AvailableLanguages { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/Gml.Launcher/ViewModels/SplashScreenViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public async Task InitializeAsync()

if (actualVersion is null)
{
return (null, false);
return (null, true);
}

var version = Assembly.GetExecutingAssembly().GetName().Version ?? new Version(1, 0, 0, 0);
Expand Down
4 changes: 3 additions & 1 deletion src/Gml.Launcher/Views/Components/BadgeComponent.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
CornerRadius="{TemplateBinding CornerRadius}"
Padding="{TemplateBinding Padding}"
BorderThickness="{TemplateBinding BorderThickness}">
<TextBlock Text="{TemplateBinding Text}" Foreground="{TemplateBinding Foreground}"/>
<TextBlock Text="{TemplateBinding Text}"
FontWeight="Medium"
Foreground="{TemplateBinding Foreground}"/>
</Border>
</ControlTemplate>
</Setter>
Expand Down
2 changes: 1 addition & 1 deletion src/Gml.Launcher/Views/Components/GmlButton.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<Setter Property="CornerRadius" Value="50" />
<Setter Property="Height" Value="50" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="FontWeight" Value="ExtraBold" />
<Setter Property="Padding" Value="10, 0, 20, 0" />

<Setter Property="Template">
Expand Down
2 changes: 2 additions & 0 deletions src/Gml.Launcher/Views/Components/ServerInfo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
<TextBlock Text="{TemplateBinding ProfileName}"
Foreground="{TemplateBinding Foreground}"
TextWrapping="Wrap"
FontWeight="ExtraBlack"
FontSize="{TemplateBinding FontSize}"/>

<TextBlock Text="{TemplateBinding ProfileDescription}"
Foreground="{DynamicResource ContentColor}"
FontWeight="Medium"
Expand Down
1 change: 1 addition & 0 deletions src/Gml.Launcher/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Width="1000"
Height="600"
MinHeight="600"
CanResize="False"
x:Class="Gml.Launcher.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Background="Transparent"
Expand Down
5 changes: 5 additions & 0 deletions src/Gml.Launcher/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ protected override void OnClosed(EventArgs e)

base.OnClosed(e);
}

protected override void OnPointerPressed(PointerPressedEventArgs e)
{
BeginMoveDrag(e);
}
}
10 changes: 0 additions & 10 deletions src/Gml.Launcher/Views/Pages/OverviewPageView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,5 @@ public OverviewPageView()
this.WhenActivated(disposables => { });
AvaloniaXamlLoader.Load(this);
}

protected override void OnPointerPressed(PointerPressedEventArgs e)
{
// BeginMoveDrag(e);

if(this.GetVisualRoot() is Window window && e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
{
window.BeginMoveDrag(e);
}
}
}

0 comments on commit 726cad9

Please sign in to comment.