feat(Search) Search hotkey now working. CMD + K
This commit is contained in:
@@ -15,24 +15,24 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<SupportedPlatform Include="browser" />
|
<SupportedPlatform Include="browser"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Markdig" Version="0.28.1" />
|
<PackageReference Include="Markdig" Version="0.28.1"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0-preview.2.22153.2" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0-preview.2.22153.2"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0-preview.2.22153.2" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0-preview.2.22153.2"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Inputs\" />
|
<Folder Include="Inputs\"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Model\Model.csproj" />
|
<ProjectReference Include="..\Model\Model.csproj"/>
|
||||||
<ProjectReference Include="..\Services\Services.csproj" />
|
<ProjectReference Include="..\Services\Services.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Inputs\" />
|
<None Remove="Inputs\"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -48,25 +48,25 @@
|
|||||||
|
|
||||||
void OnInputChanged(ChangeEventArgs changeEventArgs)
|
void OnInputChanged(ChangeEventArgs changeEventArgs)
|
||||||
{
|
{
|
||||||
int valueWas = Value;
|
var valueWas = Value;
|
||||||
int newValue = int.Parse(changeEventArgs.Value!.ToString()!);
|
var newValue = int.Parse(changeEventArgs.Value!.ToString()!);
|
||||||
|
|
||||||
if (newValue > Max)
|
if (newValue > Max)
|
||||||
{
|
{
|
||||||
newValue = Max;
|
newValue = Max;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newValue < Min)
|
if (newValue < Min)
|
||||||
{
|
{
|
||||||
newValue = Min;
|
newValue = Min;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (valueWas != newValue)
|
if (valueWas != newValue)
|
||||||
{
|
{
|
||||||
Value = newValue;
|
Value = newValue;
|
||||||
changeEventArgs.Value = newValue;
|
changeEventArgs.Value = newValue;
|
||||||
OnChange.InvokeAsync(changeEventArgs);
|
OnChange.InvokeAsync(changeEventArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
placeholder="@Placeholder"
|
placeholder="@Placeholder"
|
||||||
type="text"
|
type="text"
|
||||||
value="@Value"
|
value="@Value"
|
||||||
id="@labelId"
|
id="@Id"
|
||||||
@oninput="OnChange"
|
@oninput="OnChange"
|
||||||
@onchange="OnChange"/>
|
@onchange="OnChange"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,6 +51,9 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Id { get; set; } = "";
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Label { get; set; } = "";
|
public string Label { get; set; } = "";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
@using System.Runtime.InteropServices
|
@inject ISearchService searchService
|
||||||
@inject ISearchService searchService
|
|
||||||
@inject NavigationManager navigationManager
|
@inject NavigationManager navigationManager
|
||||||
@inject IJSRuntime jsRuntime
|
@inject IJSRuntime jsRuntime
|
||||||
|
|
||||||
@@ -7,13 +6,9 @@
|
|||||||
<div class="searchText">
|
<div class="searchText">
|
||||||
Search...
|
Search...
|
||||||
</div>
|
</div>
|
||||||
@if (false)
|
<div class="searchHotkey">
|
||||||
{
|
@CommandKey + K
|
||||||
<div class="searchHotkey">
|
</div>
|
||||||
@CommandKey + K
|
|
||||||
</div>
|
|
||||||
|
|
||||||
}
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -35,6 +30,7 @@
|
|||||||
.searchHotkey {
|
.searchHotkey {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
|
||||||
|
background-color: var(--info);
|
||||||
border: 2px solid var(--primary-border);
|
border: 2px solid var(--primary-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,6 +38,7 @@
|
|||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment ChildContent { get; set; } = default!;
|
public RenderFragment ChildContent { get; set; } = default!;
|
||||||
|
|
||||||
@@ -58,4 +55,5 @@
|
|||||||
{
|
{
|
||||||
userAgent = await jsRuntime.InvokeAsync<string>("getUserAgent");
|
userAgent = await jsRuntime.InvokeAsync<string>("getUserAgent");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -17,31 +17,31 @@
|
|||||||
</NavLink>
|
</NavLink>
|
||||||
|
|
||||||
<div class="sectionNavs">
|
<div class="sectionNavs">
|
||||||
@foreach (var webSection in WebSections)
|
@foreach (var webSection in WebSections)
|
||||||
{
|
|
||||||
var isSelected = navigationService.GetNavigationSectionId().Equals(webSection.Id);
|
|
||||||
var sectionButtonStyle = "sectionButton";
|
|
||||||
if (isSelected)
|
|
||||||
{
|
{
|
||||||
sectionButtonStyle += " sectionButtonSelected";
|
var isSelected = navigationService.GetNavigationSectionId().Equals(webSection.Id);
|
||||||
}
|
var sectionButtonStyle = "sectionButton";
|
||||||
|
if (isSelected)
|
||||||
<div class="sectionNav">
|
|
||||||
<button onclick="@(() => { MenuClicked(webSection.Id); })" class="@sectionButtonStyle">@webSection.Name</button>
|
|
||||||
|
|
||||||
@if (isSelected)
|
|
||||||
{
|
{
|
||||||
<div class="navMenuPosition">
|
sectionButtonStyle += " sectionButtonSelected";
|
||||||
<div class="navMenuContainer">
|
|
||||||
<DesktopNavSectionComponent Section=webSection />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
</div>
|
|
||||||
}
|
<div class="sectionNav">
|
||||||
|
<button onclick="@(() => { MenuClicked(webSection.Id); })" class="@sectionButtonStyle">@webSection.Name</button>
|
||||||
|
|
||||||
|
@if (isSelected)
|
||||||
|
{
|
||||||
|
<div class="navMenuPosition">
|
||||||
|
<div class="navMenuContainer">
|
||||||
|
<DesktopNavSectionComponent Section=webSection/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SearchButtonComponent />
|
<SearchButtonComponent/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<NavLink @onclick="() => {
|
<NavLink @onclick="() => { navigationService.ChangeNavigationState(NavigationStateType.Default); navigationService.ChangeNavigationSectionId(-1); }" href="@Page.Href" class="desktopNavLink">
|
||||||
navigationService.ChangeNavigationState(NavigationStateType.Default);
|
|
||||||
navigationService.ChangeNavigationSectionId(-1); }" href="@Page.Href" class="desktopNavLink">
|
|
||||||
<div class="navName">
|
<div class="navName">
|
||||||
@Page.Name
|
@Page.Name
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.2.22153.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.2.22153.1"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0-preview.2.22153.1">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0-preview.2.22153.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|||||||
+2
-8
@@ -15,7 +15,8 @@
|
|||||||
|
|
||||||
<EntityDialogPortal/>
|
<EntityDialogPortal/>
|
||||||
<ToastPortal/>
|
<ToastPortal/>
|
||||||
<SearchPortal />
|
<SearchPortal/>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
a {
|
a {
|
||||||
@@ -68,11 +69,4 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
#if NO_SQL
|
|
||||||
|
|
||||||
#else
|
|
||||||
[Inject]
|
|
||||||
DatabaseContext Database { get; set; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
@inject NavigationManager navigationManager
|
@inject NavigationManager navigationManager
|
||||||
|
|
||||||
@if (searchService.IsLoaded())
|
@if (searchService.IsLoaded() && searchService.IsVisible)
|
||||||
{
|
{
|
||||||
<div class="searchBackground" onclick="@CloseDialog">
|
<div class="searchBackground" onclick="@CloseDialog">
|
||||||
<div class="searchContainer"
|
<div class="searchContainer"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
@onclick:stopPropagation="true">
|
@onclick:stopPropagation="true">
|
||||||
|
|
||||||
<FormLayoutComponent>
|
<FormLayoutComponent>
|
||||||
<FormTextComponent Placeholder="Search..." OnChange="SearchChanged"></FormTextComponent>
|
<FormTextComponent Id="search-input-box" Placeholder="Search..." OnChange="SearchChanged"></FormTextComponent>
|
||||||
</FormLayoutComponent>
|
</FormLayoutComponent>
|
||||||
|
|
||||||
<div class="searchBox">
|
<div class="searchBox">
|
||||||
@@ -30,16 +30,14 @@
|
|||||||
@searchSection.Key
|
@searchSection.Key
|
||||||
</div>
|
</div>
|
||||||
<div class="searchContents">
|
<div class="searchContents">
|
||||||
@foreach (var searchPoint in searchPoints)
|
@foreach (var searchPoint in searchPoints)
|
||||||
{
|
{
|
||||||
<button class="searchLink @searchPoint.PointType.ToLower()" @onclick="() => OnSearch(searchPoint)">@searchPoint.Title</button>
|
<button class="searchLink @searchPoint.PointType.ToLower()" @onclick="() => OnSearch(searchPoint)">@searchPoint.Title</button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -110,7 +108,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -125,11 +122,16 @@
|
|||||||
searchService.Subscribe(OnSearchChanged);
|
searchService.Subscribe(OnSearchChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private System.Threading.Timer timer = null!;
|
||||||
private void OnSearchChanged()
|
private void OnSearchChanged()
|
||||||
{
|
{
|
||||||
if (searchService.IsVisible)
|
if (searchService.IsVisible)
|
||||||
{
|
{
|
||||||
jsRuntime.InvokeVoidAsync("SetFocusToElement", "search-dialog-input");
|
timer = new System.Threading.Timer(_ =>
|
||||||
|
{
|
||||||
|
jsRuntime.InvokeVoidAsync("SetFocusToElement", "search-input-box");
|
||||||
|
InvokeAsync(StateHasChanged);
|
||||||
|
}, null, 1, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,7 +151,6 @@
|
|||||||
{
|
{
|
||||||
if (url.Contains("#"))
|
if (url.Contains("#"))
|
||||||
{
|
{
|
||||||
|
|
||||||
navigationManager.NavigateTo(url,
|
navigationManager.NavigateTo(url,
|
||||||
navigationManager.Uri.Split("#").First().Contains(url.Split("#").First()));
|
navigationManager.Uri.Split("#").First().Contains(url.Split("#").First()));
|
||||||
}
|
}
|
||||||
@@ -157,7 +158,6 @@
|
|||||||
{
|
{
|
||||||
navigationManager.NavigateTo(url);
|
navigationManager.NavigateTo(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SearchChanged(ChangeEventArgs obj)
|
private void SearchChanged(ChangeEventArgs obj)
|
||||||
|
|||||||
+9
-9
@@ -20,10 +20,10 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Markdig" Version="0.28.1" />
|
<PackageReference Include="Markdig" Version="0.28.1"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0-preview.2.22153.2" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0-preview.2.22153.2"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0-preview.2.22153.2" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0-preview.2.22153.2" PrivateAssets="all"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0-preview.2.22153.2" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0-preview.2.22153.2"/>
|
||||||
<!--
|
<!--
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-preview.2.22153.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-preview.2.22153.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="7.0.0-preview.2.22153.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="7.0.0-preview.2.22153.1" />
|
||||||
@@ -32,17 +32,17 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
|
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Components\Components.csproj" />
|
<ProjectReference Include="..\Components\Components.csproj"/>
|
||||||
<ProjectReference Include="..\Model\Model.csproj" />
|
<ProjectReference Include="..\Model\Model.csproj"/>
|
||||||
<ProjectReference Include="..\Services\Services.csproj" />
|
<ProjectReference Include="..\Services\Services.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="wwwroot\generated" />
|
<Folder Include="wwwroot\generated"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
@layout PageLayout
|
@layout PageLayout
|
||||||
|
|
||||||
<DevOnlyComponent>
|
<DevOnlyComponent>
|
||||||
<SearchButtonComponent />
|
<SearchButtonComponent/>
|
||||||
</DevOnlyComponent>
|
</DevOnlyComponent>
|
||||||
|
|
||||||
<HomePage/>
|
<HomePage/>
|
||||||
@@ -41,17 +41,16 @@
|
|||||||
await webService.Load();
|
await webService.Load();
|
||||||
|
|
||||||
await Focus();
|
await Focus();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Focus()
|
private async Task Focus()
|
||||||
{
|
{
|
||||||
// await jsRuntime.InvokeVoidAsync("SetFocusToElement", pageContents);
|
// await jsRuntime.InvokeVoidAsync("SetFocusToElement", pageContents);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async void OnAfterRender(bool firstRender)
|
protected override async void OnAfterRender(bool firstRender)
|
||||||
{
|
{
|
||||||
// await jsRuntime.InvokeVoidAsync("SetFocusToElement", pageContents);
|
// await jsRuntime.InvokeVoidAsync("SetFocusToElement", pageContents);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDisposable.Dispose()
|
void IDisposable.Dispose()
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
@implements IDisposable;
|
@implements IDisposable;
|
||||||
|
|
||||||
@inject ISearchService searchService
|
@inject ISearchService searchService
|
||||||
|
@inject IJSRuntime jsRuntime
|
||||||
|
|
||||||
@if (searchService.IsVisible)
|
<SearchDialogComponent></SearchDialogComponent>
|
||||||
{
|
|
||||||
<SearchDialogComponent></SearchDialogComponent>
|
|
||||||
}
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private string test = "Q";
|
||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
@@ -17,8 +16,11 @@
|
|||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
await searchService.Load();
|
await searchService.Load();
|
||||||
|
await jsRuntime.InvokeVoidAsync("SetDotnetReference", DotNetObjectReference.Create(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
searchService.Unsubscribe(OnUpdate);
|
searchService.Unsubscribe(OnUpdate);
|
||||||
@@ -28,4 +30,21 @@
|
|||||||
{
|
{
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JSInvokable("OnKeyPress")]
|
||||||
|
public async Task OnKeyPress(string code, bool ctrlKey, bool shiftKey, bool altKey, bool metaKey)
|
||||||
|
{
|
||||||
|
if (code.ToLower().Equals("k") && (ctrlKey || shiftKey || altKey || metaKey))
|
||||||
|
{
|
||||||
|
if (searchService.IsVisible)
|
||||||
|
{
|
||||||
|
searchService.Hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
searchService.Show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Cheat Sheet
|
title: Cheat Sheet summary: Handy links or quick information on this project. created_date: 2022-04-11 updated_date:
|
||||||
summary: Handy links or quick information on this project.
|
2022-04-11
|
||||||
created_date: 2022-04-11
|
|
||||||
updated_date: 2022-04-11
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Overview
|
# Overview
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Project Data
|
title: Project Data summary: Using data in this project. created_date: 2022-04-11 updated_date: 2022-04-11
|
||||||
summary: Using data in this project.
|
|
||||||
created_date: 2022-04-11
|
|
||||||
updated_date: 2022-04-11
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Overview
|
# Overview
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Setup
|
title: Setup summary: Get set up on developing this web project. created_date: 3/30/2022 updated_date: 4/7/2022
|
||||||
summary: Get set up on developing this web project.
|
|
||||||
created_date: 3/30/2022
|
|
||||||
updated_date: 4/7/2022
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Overview
|
# Overview
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Holdout
|
title: Holdout summary: First coop test map in pre-alpha. created_date: 2/18/2022 updated_date: 2/18/2022
|
||||||
summary: First coop test map in pre-alpha.
|
|
||||||
created_date: 2/18/2022
|
|
||||||
updated_date: 2/18/2022
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Information contained in this note is based on this <a href="https://www.youtube.com/watch?v=XkAgOCIz3DE">YouTube,
|
Information contained in this note is based on this <a href="https://www.youtube.com/watch?v=XkAgOCIz3DE">YouTube,
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Custom HotKey Setup
|
title: Custom HotKey Setup summary: Customize your hotkeys in the pre-alpha. created_date: 4/13/2022 updated_date:
|
||||||
summary: Customize your hotkeys in the pre-alpha.
|
4/13/2022
|
||||||
created_date: 4/13/2022
|
|
||||||
updated_date: 4/13/2022
|
|
||||||
---
|
---
|
||||||
|
|
||||||
In the pre-alpha, IGP comes with some Unreal default hotkey setup.
|
In the pre-alpha, IGP comes with some Unreal default hotkey setup.
|
||||||
@@ -97,7 +95,8 @@ You can notice a single line of this file can be broken down like this.
|
|||||||
`ActionMappings=(ActionName="AttackMove",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=A)`
|
`ActionMappings=(ActionName="AttackMove",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=A)`
|
||||||
|
|
||||||
- `ActionMappings=(***)`: Indicates content is an action mapping. i.e. a hotkey
|
- `ActionMappings=(***)`: Indicates content is an action mapping. i.e. a hotkey
|
||||||
- `ActionName="AttackMove"`: Indicates the name of the selected action. Here, we are using the `AttackMove` move action, that forces your selected army to attack.
|
- `ActionName="AttackMove"`: Indicates the name of the selected action. Here, we are using the `AttackMove` move action,
|
||||||
|
that forces your selected army to attack.
|
||||||
- `Key=A`: Indicates key being mapped to the action. Set to `Key=Tab` to require the Tab key to be pressed instead, to
|
- `Key=A`: Indicates key being mapped to the action. Set to `Key=Tab` to require the Tab key to be pressed instead, to
|
||||||
perform the `AttackMove` action.
|
perform the `AttackMove` action.
|
||||||
- `bShift=False`: Indicates that the Shift key is not held. Set to `bShift=True` to require a shift key held to
|
- `bShift=False`: Indicates that the Shift key is not held. Set to `bShift=True` to require a shift key held to
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Armor Types
|
title: Armor Types summary: Heavy, Medium, and Light. What does it mean? created_date: 4/13/2000 updated_date: 4/13/2000
|
||||||
summary: Heavy, Medium, and Light. What does it mean?
|
|
||||||
created_date: 4/13/2000
|
|
||||||
updated_date: 4/13/2000
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Armor Types
|
## Armor Types
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: Economy Overview
|
title: Economy Overview summary: Alloy, Ether and Supply. Don't forget to expand!
|
||||||
summary: Alloy, Ether and Supply. Don't forget to expand!
|
created_date: 1/01/2000 updated_date: 1/01/2000
|
||||||
created_date: 1/01/2000
|
|
||||||
updated_date: 1/01/2000
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: Families, Factions, and Immortal Vanguards
|
title: Families, Factions, and Immortal Vanguards summary: How IMMORTAL: Gates of Pyre handle your army selection
|
||||||
summary: How IMMORTAL: Gates of Pyre handle your army selection choices
|
choices created_date: 1/01/2000 updated_date: 1/01/2000
|
||||||
created_date: 1/01/2000
|
|
||||||
updated_date: 1/01/2000
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Immortals Spells and Pyre
|
title: Immortals Spells and Pyre summary: Customize your hotkeys in the pre-alpha. created_date: 1/01/2000 updated_date:
|
||||||
summary: Customize your hotkeys in the pre-alpha.
|
1/01/2000
|
||||||
created_date: 1/01/2000
|
|
||||||
updated_date: 1/01/2000
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## What are Immortals
|
## What are Immortals
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Timing and Scouting
|
title: Timing and Scouting summary: Knowing is half the battle. created_date: 1/01/2000 updated_date: 1/01/2000
|
||||||
summary: Knowing is half the battle.
|
|
||||||
created_date: 1/01/2000
|
|
||||||
updated_date: 1/01/2000
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Timing
|
## Timing
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
[{"Id":1,"Name":"Database UX Patch","Date":"2022-03-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":2,"Name":"Thrum Stats Hotfix","Date":"2022-03-12T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":3,"Name":"Memory Tester Patch","Date":"2022-03-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":4,"Name":"Hide Pyre Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":5,"Name":"Stream Patch","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":6,"Name":"Agile UI Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":7,"Name":"Armor Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":8,"Name":"Home Page Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":9,"Name":"Mobile Menu Hotfix 2","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":10,"Name":"Mobile Menu Hotfix","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":11,"Name":"Mobile Menu Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":12,"Name":"0.0.6.8375a Patch","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":13,"Name":"Google Tracking Hotfix","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":14,"Name":"Privacy Policy Patch","Date":"2022-02-17T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":15,"Name":"Home Page Quick Hotfix","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":16,"Name":"Early Agile Patch","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":17,"Name":"Form Text Rendering Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":18,"Name":"Reducing Timing Interval Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":19,"Name":"Changelog Patch","Date":"2022-02-14T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":20,"Name":"SQL Patch","Date":"2022-03-26T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":21,"Name":"Stream Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":22,"Name":"0.0.6.8900a Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":23,"Name":"Database Links Patch","Date":"2022-04-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":24,"Name":"Open Source Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":25,"Name":"Stream Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":26,"Name":"Notes/Docs Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":27,"Name":"Stream Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":28,"Name":"Passive Patch","Date":"2022-04-12T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":29,"Name":"0.0.6.9121a Patch","Date":"2022-04-13T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":30,"Name":"Stream Patch","Date":"2022-04-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":31,"Name":"BuildCalc Hotfix","Date":"2022-04-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":32,"Name":"Search Path","Date":"2022-04-16T00:00:00","GitChangeModels":[],"Important":"False"}]
|
[{"Id":1,"Name":"Database UX Patch","Date":"2022-03-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":2,"Name":"Thrum Stats Hotfix","Date":"2022-03-12T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":3,"Name":"Memory Tester Patch","Date":"2022-03-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":4,"Name":"Hide Pyre Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":5,"Name":"Stream Patch","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":6,"Name":"Agile UI Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":7,"Name":"Armor Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":8,"Name":"Home Page Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":9,"Name":"Mobile Menu Hotfix 2","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":10,"Name":"Mobile Menu Hotfix","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":11,"Name":"Mobile Menu Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":12,"Name":"0.0.6.8375a Patch","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":13,"Name":"Google Tracking Hotfix","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":14,"Name":"Privacy Policy Patch","Date":"2022-02-17T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":15,"Name":"Home Page Quick Hotfix","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":16,"Name":"Early Agile Patch","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":17,"Name":"Form Text Rendering Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":18,"Name":"Reducing Timing Interval Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":19,"Name":"Changelog Patch","Date":"2022-02-14T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":20,"Name":"SQL Patch","Date":"2022-03-26T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":21,"Name":"Stream Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":22,"Name":"0.0.6.8900a Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":23,"Name":"Database Links Patch","Date":"2022-04-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":24,"Name":"Open Source Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":25,"Name":"Stream Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":26,"Name":"Notes/Docs Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":27,"Name":"Stream Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":28,"Name":"Passive Patch","Date":"2022-04-12T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":29,"Name":"0.0.6.9121a Patch","Date":"2022-04-13T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":30,"Name":"Stream Patch","Date":"2022-04-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":31,"Name":"BuildCalc Hotfix","Date":"2022-04-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":32,"Name":"Search Patch","Date":"2022-04-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":33,"Name":"Search Hotfix","Date":"2022-04-16T00:00:00","GitChangeModels":[],"Important":"False"}]
|
||||||
+11
-4
@@ -12,8 +12,8 @@
|
|||||||
<link href="css/app.css" rel="stylesheet"/>
|
<link href="css/app.css" rel="stylesheet"/>
|
||||||
<link href="IGP.styles.css" rel="stylesheet"/>
|
<link href="IGP.styles.css" rel="stylesheet"/>
|
||||||
|
|
||||||
<link href="manifest.json" rel="manifest" />
|
<link href="manifest.json" rel="manifest"/>
|
||||||
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
|
<link href="icon-512.png" rel="apple-touch-icon" sizes="512x512"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="background-color: #161618; color: white;">
|
<body style="background-color: #161618; color: white;">
|
||||||
@@ -37,14 +37,21 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
window.DotNetReference = null;
|
||||||
|
window.SetDotnetReference = function (dotnetReference) {
|
||||||
|
window.DotNetReference = dotnetReference;
|
||||||
|
};
|
||||||
|
|
||||||
window.getUserAgent = () => {
|
window.getUserAgent = () => {
|
||||||
return navigator.userAgent;
|
return navigator.userAgent;
|
||||||
};
|
};
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
window.SetFocusToElement = (elementId) => {
|
window.SetFocusToElement = (elementId) => {
|
||||||
document.getElementById(elementId).focus();
|
document.getElementById(elementId).focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
document.addEventListener("keydown", function (e) {
|
||||||
|
DotNetReference?.invokeMethodAsync('OnKeyPress', e.key, e.ctrlKey, e.shiftKey, e.altKey, e.metaKey)
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>navigator.serviceWorker.register('service-worker.js');</script>
|
<script>navigator.serviceWorker.register('service-worker.js');</script>
|
||||||
|
|||||||
@@ -8,17 +8,17 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Contexts\Contexts.csproj" />
|
<ProjectReference Include="..\Contexts\Contexts.csproj"/>
|
||||||
<ProjectReference Include="..\Model\Model.csproj" />
|
<ProjectReference Include="..\Model\Model.csproj"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="7.0.0-preview.2.22153.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="7.0.0-preview.2.22153.1"/>
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.2.22153.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.2.22153.1"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0-preview.2.22153.1">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0-preview.2.22153.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-preview.2.22153.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-preview.2.22153.1"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0-preview.2.22153.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.0-preview.2.22153.1"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0-preview.2.22153.1">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0-preview.2.22153.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|||||||
@@ -3,14 +3,6 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Remove="_PaperWork\**"/>
|
|
||||||
<EmbeddedResource Remove="_PaperWork\**"/>
|
|
||||||
<None Remove="_PaperWork\**"/>
|
|
||||||
<None Remove="Immortal\MemoryTester\"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
|
||||||
<PackageReference Include="YamlDotNet" Version="11.2.1"/>
|
<PackageReference Include="YamlDotNet" Version="11.2.1"/>
|
||||||
|
|||||||
@@ -26,19 +26,24 @@ public class NoteContentModel
|
|||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped] public virtual string LoadedContent { get; set; }
|
||||||
public virtual string LoadedContent { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public string IsHidden { get; set; } = "False";
|
public string IsHidden { get; set; } = "False";
|
||||||
public string IsPreAlpha { get; set; } = "True";
|
public string IsPreAlpha { get; set; } = "True";
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public virtual ICollection<NoteContentModel> NoteContentModels { get; set; } = new List<NoteContentModel>();
|
||||||
|
|
||||||
|
[NotMapped] public virtual NoteContentModel Parent { get; set; }
|
||||||
|
[NotMapped] public virtual int PageOrder { get; set; }
|
||||||
|
|
||||||
public List<SearchPointModel> GetHeaders()
|
public List<SearchPointModel> GetHeaders()
|
||||||
{
|
{
|
||||||
var regex = new Regex(@"^#* (.*)$", RegexOptions.Multiline);
|
var regex = new Regex(@"^#* (.*)$", RegexOptions.Multiline);
|
||||||
var listOfMatches = regex.Matches(LoadedContent);
|
var listOfMatches = regex.Matches(LoadedContent);
|
||||||
|
|
||||||
List<SearchPointModel> foundHeaders = new List<SearchPointModel>();
|
var foundHeaders = new List<SearchPointModel>();
|
||||||
|
|
||||||
foreach (var capture in listOfMatches)
|
foreach (var capture in listOfMatches)
|
||||||
{
|
{
|
||||||
@@ -49,19 +54,13 @@ public class NoteContentModel
|
|||||||
cleanUp = cleanUp.Replace("\"", "");
|
cleanUp = cleanUp.Replace("\"", "");
|
||||||
cleanUp = cleanUp.Trim();
|
cleanUp = cleanUp.Trim();
|
||||||
cleanUp = cleanUp.Replace(" ", "-");
|
cleanUp = cleanUp.Replace(" ", "-");
|
||||||
foundHeaders.Add(new SearchPointModel(){ Title = capture.ToString().Trim(), Href = cleanUp});
|
foundHeaders.Add(new SearchPointModel { Title = capture.ToString().Trim(), Href = cleanUp });
|
||||||
Console.WriteLine($"Capture: {cleanUp}");
|
Console.WriteLine($"Capture: {cleanUp}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return foundHeaders;
|
return foundHeaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public virtual ICollection<NoteContentModel> NoteContentModels { get; set; } = new List<NoteContentModel>();
|
|
||||||
|
|
||||||
[NotMapped] public virtual NoteContentModel Parent { get; set; }
|
|
||||||
[NotMapped] public virtual int PageOrder { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
private string GetLink()
|
private string GetLink()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public interface IAgileService
|
|||||||
public void Unsubscribe(Action? action);
|
public void Unsubscribe(Action? action);
|
||||||
public void Update();
|
public void Update();
|
||||||
|
|
||||||
public Task Load();
|
public Task Load();
|
||||||
public bool IsLoaded();
|
public bool IsLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,15 @@ namespace Services.Immortal;
|
|||||||
public class BuildOrderService : IBuildOrderService
|
public class BuildOrderService : IBuildOrderService
|
||||||
{
|
{
|
||||||
private BuildOrderModel buildOrder = new();
|
private BuildOrderModel buildOrder = new();
|
||||||
public int BuildingInputDelay { get; set; } = 2;
|
private int lastInterval;
|
||||||
private int lastInterval = 0;
|
|
||||||
|
|
||||||
public BuildOrderService()
|
public BuildOrderService()
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int BuildingInputDelay { get; set; } = 2;
|
||||||
|
|
||||||
public Dictionary<int, List<EntityModel>> StartedOrders => buildOrder.StartedOrders;
|
public Dictionary<int, List<EntityModel>> StartedOrders => buildOrder.StartedOrders;
|
||||||
public Dictionary<int, List<EntityModel>> CompletedOrders => buildOrder.CompletedOrders;
|
public Dictionary<int, List<EntityModel>> CompletedOrders => buildOrder.CompletedOrders;
|
||||||
public Dictionary<string, int> UniqueCompletedTimes => buildOrder.UniqueCompletedTimes;
|
public Dictionary<string, int> UniqueCompletedTimes => buildOrder.UniqueCompletedTimes;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using Model.Economy;
|
using Model.Economy;
|
||||||
using Model.Entity;
|
using Model.Entity;
|
||||||
using Model.Feedback;
|
|
||||||
using Model.Types;
|
using Model.Types;
|
||||||
using Services.Website;
|
|
||||||
|
|
||||||
namespace Services.Immortal;
|
namespace Services.Immortal;
|
||||||
|
|
||||||
@@ -159,10 +157,7 @@ public class EconomyService : IEconomyService
|
|||||||
|
|
||||||
public EconomyModel GetEconomy(int atInterval)
|
public EconomyModel GetEconomy(int atInterval)
|
||||||
{
|
{
|
||||||
if (atInterval >= economyOverTime.Count)
|
if (atInterval >= economyOverTime.Count) return economyOverTime.Last();
|
||||||
{
|
|
||||||
return economyOverTime.Last();
|
|
||||||
}
|
|
||||||
|
|
||||||
return economyOverTime[atInterval];
|
return economyOverTime[atInterval];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="YamlDotNet" Version="11.2.1" />
|
<PackageReference Include="YamlDotNet" Version="11.2.1"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Model\Model.csproj" />
|
<ProjectReference Include="..\Model\Model.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
//TODO Move to a database folder, with EntityService, EntityFilterService
|
//TODO Move to a database folder, with EntityService, EntityFilterService
|
||||||
public class EntityDialogService : IEntityDialogService
|
public class EntityDialogService : IEntityDialogService
|
||||||
{
|
{
|
||||||
private string? entityId;
|
|
||||||
|
|
||||||
private readonly List<string> history = new();
|
private readonly List<string> history = new();
|
||||||
|
private string? entityId;
|
||||||
|
|
||||||
public void Subscribe(Action action)
|
public void Subscribe(Action action)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,23 +1,20 @@
|
|||||||
using Model.Entity.Data;
|
using Model.Entity.Data;
|
||||||
using Model.Feedback;
|
|
||||||
using Model.Website;
|
using Model.Website;
|
||||||
|
|
||||||
namespace Services.Website;
|
namespace Services.Website;
|
||||||
|
|
||||||
public class SearchService : ISearchService
|
public class SearchService : ISearchService
|
||||||
{
|
{
|
||||||
|
private readonly IDocumentationService documentationService;
|
||||||
|
|
||||||
private bool isLoaded = false;
|
private bool isLoaded;
|
||||||
public List<SearchPointModel> SearchPoints { get; set; } = new();
|
private readonly INoteService noteService;
|
||||||
|
|
||||||
public Dictionary<string, List<SearchPointModel>> Searches { get; set; } = new();
|
|
||||||
|
|
||||||
|
|
||||||
private IWebsiteService websiteService;
|
private readonly IWebsiteService websiteService;
|
||||||
private INoteService noteService;
|
|
||||||
private IDocumentationService documentationService;
|
|
||||||
|
|
||||||
public SearchService(IWebsiteService websiteService, INoteService noteService, IDocumentationService documentationService)
|
public SearchService(IWebsiteService websiteService, INoteService noteService,
|
||||||
|
IDocumentationService documentationService)
|
||||||
{
|
{
|
||||||
this.websiteService = websiteService;
|
this.websiteService = websiteService;
|
||||||
this.noteService = noteService;
|
this.noteService = noteService;
|
||||||
@@ -26,6 +23,10 @@ public class SearchService : ISearchService
|
|||||||
// All Unit Data
|
// All Unit Data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SearchPointModel> SearchPoints { get; set; } = new();
|
||||||
|
|
||||||
|
public Dictionary<string, List<SearchPointModel>> Searches { get; set; } = new();
|
||||||
|
|
||||||
public bool IsVisible { get; set; }
|
public bool IsVisible { get; set; }
|
||||||
|
|
||||||
public void Subscribe(Action action)
|
public void Subscribe(Action action)
|
||||||
@@ -56,9 +57,11 @@ public class SearchService : ISearchService
|
|||||||
|
|
||||||
foreach (var webPage in websiteService.WebPageModels)
|
foreach (var webPage in websiteService.WebPageModels)
|
||||||
{
|
{
|
||||||
SearchPoints.Add(new SearchPointModel{ Title = webPage.Name,
|
SearchPoints.Add(new SearchPointModel
|
||||||
|
{
|
||||||
|
Title = webPage.Name,
|
||||||
PointType = "WebPage",
|
PointType = "WebPage",
|
||||||
Href=webPage.Href
|
Href = webPage.Href
|
||||||
});
|
});
|
||||||
|
|
||||||
Searches["Pages"].Add(SearchPoints.Last());
|
Searches["Pages"].Add(SearchPoints.Last());
|
||||||
@@ -66,17 +69,20 @@ public class SearchService : ISearchService
|
|||||||
|
|
||||||
foreach (var note in noteService.NoteContentModels)
|
foreach (var note in noteService.NoteContentModels)
|
||||||
{
|
{
|
||||||
SearchPoints.Add(new SearchPointModel(){ Title = note.Name,
|
SearchPoints.Add(new SearchPointModel
|
||||||
PointType = "Note", Href = note.GetNoteLink()});
|
{
|
||||||
|
Title = note.Name,
|
||||||
|
PointType = "Note", Href = note.GetNoteLink()
|
||||||
|
});
|
||||||
|
|
||||||
Searches["Notes"].Add(SearchPoints.Last());
|
Searches["Notes"].Add(SearchPoints.Last());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (var entity in DATA.Get().Values)
|
foreach (var entity in DATA.Get().Values)
|
||||||
{
|
{
|
||||||
SearchPoints.Add(new SearchPointModel(){
|
SearchPoints.Add(new SearchPointModel
|
||||||
|
{
|
||||||
Title = entity.Info().Name,
|
Title = entity.Info().Name,
|
||||||
Tags = $"{entity.EntityType},{entity.Descriptive}",
|
Tags = $"{entity.EntityType},{entity.Descriptive}",
|
||||||
PointType = "Entity",
|
PointType = "Entity",
|
||||||
@@ -89,8 +95,11 @@ public class SearchService : ISearchService
|
|||||||
|
|
||||||
foreach (var doc in documentationService.DocContentModels)
|
foreach (var doc in documentationService.DocContentModels)
|
||||||
{
|
{
|
||||||
SearchPoints.Add(new SearchPointModel { Title = doc.Name,
|
SearchPoints.Add(new SearchPointModel
|
||||||
PointType = "Document", Href = doc.GetDocLink()});
|
{
|
||||||
|
Title = doc.Name,
|
||||||
|
PointType = "Document", Href = doc.GetDocLink()
|
||||||
|
});
|
||||||
|
|
||||||
Searches["Documents"].Add(SearchPoints.Last());
|
Searches["Documents"].Add(SearchPoints.Last());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user