-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #416 from Sidekick-Poe/feature/dev-cleanup
Clean the development page
- Loading branch information
Showing
7 changed files
with
40 additions
and
86 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
4 changes: 3 additions & 1 deletion
4
src/Sidekick.Common.Ui/UiClasses.razor → src/Sidekick.Common.Ui/UiClasses.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
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 |
---|---|---|
@@ -1,54 +1,45 @@ | ||
@page "/development" | ||
@using Sidekick.Common.Extensions | ||
@using Sidekick.Common.Platform | ||
@using Sidekick.Modules.Development.Components | ||
@using Sidekick.Modules.Development.Layouts | ||
@inherits SidekickView | ||
@layout DevelopmentLayout | ||
|
||
<AppContainer> | ||
<div class="grid grid-cols-12 gap-3"> | ||
<div class="col-span-8"> | ||
<Heading2 Class="mb-3">Items</Heading2> | ||
<FormTextarea @bind-Value="ItemText"/> | ||
<div class="grid grid-cols-12 gap-3 mt-3"> | ||
<div class="col-span-6"> | ||
<HomeButton Class="bg-blue-700 hover:bg-blue-500" OnClick="PriceCheck">Check Prices</HomeButton> | ||
</div> | ||
<div class="col-span-6"> | ||
<HomeButton Class="bg-fuchsia-700 hover:bg-fuchsia-500" OnClick="MapCheck">Check Map</HomeButton> | ||
</div> | ||
<Fieldset Legend="Copy your item text here"> | ||
<FormTextarea @bind-Value="ItemText" /> | ||
<div class="grid grid-cols-12 gap-3 mt-3"> | ||
<div class="col-span-6"> | ||
<HomeButton Class="bg-blue-700 hover:bg-blue-500" OnClick="PriceCheck">Check Prices</HomeButton> | ||
</div> | ||
<div class="col-span-6"> | ||
<HomeButton Class="bg-fuchsia-700 hover:bg-fuchsia-500" OnClick="MapCheck">Check Map</HomeButton> | ||
</div> | ||
</div> | ||
<div class="col-span-4"> | ||
<Heading2 Class="mb-3">Other Pages</Heading2> | ||
<HomeButton Class="bg-emerald-700 hover:bg-emerald-500 mb-3" OnClick="@(() => NavigationManager.NavigateTo("/wealth"))">Wealth</HomeButton> | ||
<HomeButton Class="bg-slate-700 hover:bg-slate-500 mb-3" OnClick="@(() => NavigationManager.NavigateTo("/settings"))">Settings</HomeButton> | ||
<Heading2 Class="mb-3">Keybinds</Heading2> | ||
<HomeButton Class="bg-amber-700 hover:bg-amber-500 mb-3" OnClick="RegisterHooks">Register Hooks</HomeButton> | ||
</div> | ||
</div> | ||
</Fieldset> | ||
<Fieldset Legend="Other sections"> | ||
<ButtonPrimary OnClick="@(() => NavigationManager.NavigateTo("/settings"))">Settings</ButtonPrimary> | ||
</Fieldset> | ||
</AppContainer> | ||
|
||
@inject IKeyboardProvider KeyboardProvider | ||
|
||
@code { | ||
|
||
private string? ItemText { get; set; } | ||
|
||
private void PriceCheck() | ||
{ | ||
NavigationManager.NavigateTo($"/trade/{ItemText.EncodeBase64Url()}"); | ||
if (ItemText != null) | ||
{ | ||
NavigationManager.NavigateTo($"/trade/{ItemText.EncodeBase64Url()}"); | ||
} | ||
} | ||
|
||
private void MapCheck() | ||
{ | ||
NavigationManager.NavigateTo($"/map/{ItemText.EncodeBase64Url()}"); | ||
} | ||
|
||
private void RegisterHooks() | ||
{ | ||
KeyboardProvider.RegisterHooks(); | ||
if (ItemText != null) | ||
{ | ||
NavigationManager.NavigateTo($"/map/{ItemText.EncodeBase64Url()}"); | ||
} | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,21 +1,32 @@ | ||
@page "/development/tests" | ||
@layout DevelopmentLayout | ||
@using Sidekick.Modules.Development.Layouts | ||
@using Sidekick.Common.Platform | ||
@inherits SidekickView | ||
|
||
<AppContainer> | ||
<div class="flex items-center justify-center gap-2"> | ||
<ButtonPrimary OnClick="ThrowException">Throw an exception</ButtonPrimary> | ||
</div> | ||
<Fieldset Legend="Custom actions"> | ||
<div class="flex gap-3"> | ||
<ButtonPrimary OnClick="RegisterHooks">Bind keyboard hooks</ButtonPrimary> | ||
<ButtonPrimary OnClick="ThrowException">Throw an exception</ButtonPrimary> | ||
</div> | ||
</Fieldset> | ||
</AppContainer> | ||
|
||
@inject IKeyboardProvider KeyboardProvider | ||
|
||
@code { | ||
|
||
public void ThrowException() | ||
private void ThrowException() | ||
{ | ||
#pragma warning disable S112 // General exceptions should never be thrown | ||
throw new Exception("Developper test from the exception page."); | ||
throw new Exception("[Development] This is a test exception."); | ||
#pragma warning restore S112 // General exceptions should never be thrown | ||
} | ||
|
||
private void RegisterHooks() | ||
{ | ||
KeyboardProvider.RegisterHooks(); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.