-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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 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. * 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". * Gif background functionality (#29) * Merge dev and master branches (#28) * 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. * 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 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. --------- 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
1 parent
88ff5a7
commit a828395
Showing
29 changed files
with
1,461 additions
and
36 deletions.
There are no files selected for viewing
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
Submodule Gml.Client
updated
from 20badc to 6dd49d
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
13 changes: 11 additions & 2 deletions
13
src/Gml.Launcher/Views/Components/BackgroundComponent.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 |
---|---|---|
@@ -1,18 +1,27 @@ | ||
<Styles xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="using:Gml.Launcher.Views.Components"> | ||
xmlns:controls="using:Gml.Launcher.Views.Components" | ||
xmlns:gif="clr-namespace:L1.Avalonia.Gif;assembly=L1.Avalonia.Gif"> | ||
<Design.PreviewWith> | ||
<controls:BackgroundComponent Width="1920" | ||
Height="1080" /> | ||
</Design.PreviewWith> | ||
|
||
<Style Selector="controls|BackgroundComponent"> | ||
<Style Selector="controls|BackgroundComponent.Image"> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Image Stretch="UniformToFill" | ||
Source="{TemplateBinding Source}" /> | ||
</ControlTemplate> | ||
</Setter> | ||
</Style> | ||
<Style Selector="controls|BackgroundComponent.Gif"> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<gif:GifImage Stretch="UniformToFill" | ||
SourceStream="{TemplateBinding SourceStream}"/> | ||
</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,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<LangVersion>11</LangVersion> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<InternalsVisibleTo Include="L1.Avalonia.Gif.Test" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Avalonia" Version="11.0.0" /> | ||
<PackageReference Include="System.Reactive" Version="6.0.0" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace L1.Avalonia.Gif; | ||
|
||
internal enum BgWorkerCommand | ||
{ | ||
Null, | ||
Play, | ||
Pause, | ||
Dispose | ||
} |
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,11 @@ | ||
namespace L1.Avalonia.Gif; | ||
|
||
internal enum BgWorkerState | ||
{ | ||
Null, | ||
Start, | ||
Running, | ||
Paused, | ||
Complete, | ||
Dispose | ||
} |
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,9 @@ | ||
namespace L1.Avalonia.Gif.Decoding; | ||
|
||
internal enum BlockTypes | ||
{ | ||
EMPTY = 0, | ||
EXTENSION = 0x21, | ||
IMAGE_DESCRIPTOR = 0x2C, | ||
TRAILER = 0x3B | ||
} |
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,7 @@ | ||
namespace L1.Avalonia.Gif.Decoding; | ||
|
||
internal enum ExtensionType | ||
{ | ||
GRAPHICS_CONTROL = 0xF9, | ||
APPLICATION = 0xFF | ||
} |
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,9 @@ | ||
namespace L1.Avalonia.Gif.Decoding; | ||
|
||
public enum FrameDisposal | ||
{ | ||
Unknown = 0, | ||
Leave = 1, | ||
Background = 2, | ||
Restore = 3 | ||
} |
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,31 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace L1.Avalonia.Gif.Decoding; | ||
|
||
[StructLayout(LayoutKind.Explicit)] | ||
public readonly struct GifColor | ||
{ | ||
[FieldOffset(3)] public readonly byte A; | ||
|
||
[FieldOffset(2)] public readonly byte R; | ||
|
||
[FieldOffset(1)] public readonly byte G; | ||
|
||
[FieldOffset(0)] public readonly byte B; | ||
|
||
/// <summary> | ||
/// A struct that represents a ARGB color and is aligned as | ||
/// a BGRA bytefield in memory. | ||
/// </summary> | ||
/// <param name="r">Red</param> | ||
/// <param name="g">Green</param> | ||
/// <param name="b">Blue</param> | ||
/// <param name="a">Alpha</param> | ||
public GifColor(byte r, byte g, byte b, byte a = byte.MaxValue) | ||
{ | ||
A = a; | ||
R = r; | ||
G = g; | ||
B = b; | ||
} | ||
} |
Oops, something went wrong.