-
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.
* 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>
- Loading branch information
1 parent
19237dc
commit 57be648
Showing
24 changed files
with
1,422 additions
and
8 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
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
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.