10 Commits

Author SHA1 Message Date
BlossomiShymae
4d6e04acb8 Fix bug where parameter types weren't correct 2024-08-10 05:56:06 -05:00
BlossomiShymae
dc538ee5ce Fix bug where parameters weren't showing up 2024-08-10 05:52:42 -05:00
BlossomiShymae
16d18878e0 Increment version 2024-08-10 05:04:47 -05:00
BlossomiShymae
893f226463 Add search for endpoint operations 2024-08-10 05:01:09 -05:00
BlossomiShymae
90a2a1747a Increment version 2024-08-10 02:22:03 -05:00
BlossomiShymae
1e9e466194 Change event viewer style 2024-08-10 02:20:54 -05:00
BlossomiShymae
6dd0476cea Fix event viewer incorrectly displaying JSON 2024-08-10 02:19:00 -05:00
Blossomi Shymae
c98ce85583 Update README.md 2024-08-09 18:52:01 -05:00
Blossomi Shymae
0e3456f006 Update README.md 2024-08-09 18:45:14 -05:00
Blossomi Shymae
fe6de3fa15 Update README.md 2024-08-09 18:39:42 -05:00
6 changed files with 47 additions and 14 deletions

View File

@@ -9,10 +9,10 @@
</PropertyGroup>
<PropertyGroup Label="Avalonia">
<AvaloniaXamlIlDebuggerLaunch>False</AvaloniaXamlIlDebuggerLaunch>
<ApplicationIcon>app.ico</ApplicationIcon>
<ApplicationIcon>app.ico</ApplicationIcon>
<AssemblyName>NeedleworkDotNet</AssemblyName>
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>0.1.0.0</FileVersion>
<AssemblyVersion>0.2.2.0</AssemblyVersion>
<FileVersion>0.2.2.0</FileVersion>
<AvaloniaXamlVerboseExceptions>False</AvaloniaXamlVerboseExceptions>
</PropertyGroup>
@@ -27,7 +27,7 @@
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.0-beta2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.0-beta2" />
<PackageReference Include="AvaloniaEdit.TextMate" Version="11.0.6" />
<PackageReference Include="BlossomiShymae.GrrrLCU" Version="0.8.0" />
<PackageReference Include="BlossomiShymae.GrrrLCU" Version="0.9.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Material.Icons.Avalonia" Version="2.1.10" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />

View File

@@ -12,15 +12,31 @@ namespace Needlework.Net.Desktop.ViewModels
public string Endpoint { get; }
public string Title => Endpoint;
[ObservableProperty] private IAvaloniaReadOnlyList<PathOperationViewModel> _pathOperations;
[ObservableProperty] private PathOperationViewModel? _selectedPathOperation;
[ObservableProperty] private string? _search;
[ObservableProperty] private IAvaloniaReadOnlyList<PathOperationViewModel> _filteredPathOperations;
public EndpointViewModel(string endpoint)
{
Endpoint = endpoint;
var handler = WeakReferenceMessenger.Default.Send<DataRequestMessage>().Response;
PathOperations = new AvaloniaList<PathOperationViewModel>(handler.Plugins[endpoint].Select(x => new PathOperationViewModel(x)));
FilteredPathOperations = new AvaloniaList<PathOperationViewModel>(PathOperations);
}
partial void OnSearchChanged(string? value)
{
if (string.IsNullOrWhiteSpace(value))
{
FilteredPathOperations = new AvaloniaList<PathOperationViewModel>(PathOperations);
return;
}
FilteredPathOperations = new AvaloniaList<PathOperationViewModel>(PathOperations.Where(o => o.Path.ToLower().Contains(value.ToLower())));
}
}
}

View File

@@ -48,8 +48,8 @@ namespace Needlework.Net.Desktop.ViewModels
var pathParameters = new AvaloniaList<ParameterViewModel>();
foreach (var parameter in parameters)
{
if (parameter.In != location) break;
pathParameters.Add(new ParameterViewModel(parameter.Name, parameter.Schema.Type, parameter.Required));
if (parameter.In != location) continue;
pathParameters.Add(new ParameterViewModel(parameter.Name, GetSchemaType(parameter.Schema), parameter.Required));
}
return pathParameters;

View File

@@ -3,6 +3,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:suki="clr-namespace:SukiUI.Controls;assembly=SukiUI"
xmlns:materialIcons="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:theme="clr-namespace:SukiUI.Theme;assembly=SukiUI"
xmlns:vm="using:Needlework.Net.Desktop.ViewModels"
xmlns:avalonEdit="https://github.com/avaloniaui/avaloniaedit"
@@ -12,15 +13,22 @@
<Grid RowDefinitions="auto,*" ColumnDefinitions="3*,2,4*,2,4*">
<Grid Grid.Row="0"
Grid.Column="0"
Grid.RowSpan="2"
RowDefinitions="auto,*"
RowDefinitions="*"
ColumnDefinitions="auto,*">
<TextBox Text="{Binding Search}"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"/>
</Grid>
<Grid Grid.Row="1"
Grid.Column="0"
RowDefinitions="*"
ColumnDefinitions="*">
<ListBox ItemsSource="{Binding PathOperations}"
<ListBox ItemsSource="{Binding FilteredPathOperations}"
SelectedItem="{Binding SelectedPathOperation}"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
Margin="0 0 0 0"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Row="1"
Grid.Column="0">
<ListBox.ItemTemplate>
<DataTemplate>

View File

@@ -58,10 +58,11 @@
<suki:GlassCard>
<avaloniaEdit:TextEditor
Name="ResponseEditor"
ShowLineNumbers="True"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Visible"
Text=""
FontSize="14"/>
FontSize="12"/>
</suki:GlassCard>
</Border>
</Grid>

View File

@@ -4,9 +4,13 @@
Needlework.Net is an open-source helper tool for the LCU that provides documented endpoints and can send requests without any code setup. Created using .NET! 🌠
# Requirements
- Windows x64
- .NET 8 runtime. [It can be downloaded here.](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-8.0.7-windows-x64-installer)
## Download
[Needlework can be downloaded from the latest release for Windows!](https://github.com/BlossomiShymae/Needlework/releases)
[Needlework can be downloaded from the latest release for Windows!](https://github.com/BlossomiShymae/Needlework.Net/releases)
## Contributors
@@ -16,6 +20,10 @@ Needlework.Net is an open-source helper tool for the LCU that provides documente
## Credits
### GrrrLCU
A simple wrapper for the LCU.
- [Repository](https://github.com/BlossomiShymae/GrrrLCU)
### LCU Explorer
This project was inspired by LCU Explorer, an application created by the HextechDocs team! 💚
@@ -31,7 +39,7 @@ Endpoints and schemas are provided by dysolix's [generated OpenAPI file.](https:
THE PROGRAM IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGMENT, OR OF FITNESS FOR A PARTICULAR PURPOSE. LICENSOR DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE PROGRAM WILL MEET YOUR REQUIREMENTS OR THAT OPERATION WILL BE UNINTERRUPTED OR ERROR FREE. LICENSOR MAKES NO WARRANTIES RESPECTING ANY HARM THAT MAY BE CAUSED BY MALICIOUS USE OF THIS SOFTWARE. LICENSOR FURTHER EXPRESSLY DISCLAIMS ANY WARRANTY OR REPRESENTATION TO AUTHORIZED USERS OR TO ANY THIRD PARTY.
Needlework isn't endorsed by Riot Games and doesn't
Needlework.Net isn't endorsed by Riot Games and doesn't
reflect the views or opinions of Riot Games or anyone officially
involved in producing or managing Riot Games properties. Riot Games,
and all associated properties are trademarks or registered