Clean up code formatting and enhance data immutability
Standardized spacing and removed extraneous white space across multiple files for better readability. Updated several data grids to use `readonly` for `_data` collections, improving immutability and code clarity.
This commit is contained in:
@@ -30,7 +30,9 @@
|
|||||||
What is this tool?
|
What is this tool?
|
||||||
</InfoQuestionComponent>
|
</InfoQuestionComponent>
|
||||||
<InfoAnswerComponent>
|
<InfoAnswerComponent>
|
||||||
This tool is a data table of all information belonging to a type of data. Such as viewing all weapons, so one can easily sort and see what weapon attack has the highest range, and what faction and unit that attack belongs to.
|
This tool is a data table of all information belonging to a type of data. Such as viewing all weapons,
|
||||||
|
so one can easily sort and see what weapon attack has the highest range, and what faction and unit that
|
||||||
|
attack belongs to.
|
||||||
</InfoAnswerComponent>
|
</InfoAnswerComponent>
|
||||||
</InfoBodyComponent>
|
</InfoBodyComponent>
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,10 @@
|
|||||||
</MudDataGrid>
|
</MudDataGrid>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
IEnumerable<EntityMovementModel> _data = DATA.Get()
|
|
||||||
|
readonly IEnumerable<EntityMovementModel> _data = DATA.Get()
|
||||||
.SelectMany(e => e.Value.EntityParts)
|
.SelectMany(e => e.Value.EntityParts)
|
||||||
.OfType<EntityMovementModel>()
|
.OfType<EntityMovementModel>()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -18,4 +18,5 @@
|
|||||||
.SelectMany(e => e.Value.EntityParts)
|
.SelectMany(e => e.Value.EntityParts)
|
||||||
.OfType<EntityProductionModel>()
|
.OfType<EntityProductionModel>()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -16,8 +16,10 @@
|
|||||||
</MudDataGrid>
|
</MudDataGrid>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
IEnumerable<EntityVitalityModel> _data = DATA.Get()
|
|
||||||
|
readonly IEnumerable<EntityVitalityModel> _data = DATA.Get()
|
||||||
.SelectMany(e => e.Value.EntityParts)
|
.SelectMany(e => e.Value.EntityParts)
|
||||||
.OfType<EntityVitalityModel>()
|
.OfType<EntityVitalityModel>()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -22,8 +22,10 @@
|
|||||||
</MudDataGrid>
|
</MudDataGrid>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
IEnumerable<EntityWeaponModel> _data = DATA.Get()
|
|
||||||
|
readonly IEnumerable<EntityWeaponModel> _data = DATA.Get()
|
||||||
.SelectMany(e => e.Value.EntityParts)
|
.SelectMany(e => e.Value.EntityParts)
|
||||||
.OfType<EntityWeaponModel>()
|
.OfType<EntityWeaponModel>()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
@layout PageLayout
|
@layout PageLayout
|
||||||
@inherits BasePage
|
@inherits BasePage
|
||||||
@page "/database"
|
@page "/database"
|
||||||
|
|
||||||
@using Model
|
@using Model
|
||||||
@implements IDisposable
|
@implements IDisposable
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
@page "/database/{text}"
|
@page "/database/{text}"
|
||||||
|
|
||||||
@inject IEntityDisplayService EntityDisplayService
|
@inject IEntityDisplayService EntityDisplayService
|
||||||
|
|
||||||
@using Model
|
@using Model
|
||||||
@implements IDisposable
|
@implements IDisposable
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ builder.Services.AddScoped(sp => new HttpClient
|
|||||||
builder.Services.AddMudServices();
|
builder.Services.AddMudServices();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await builder.Build().RunAsync();
|
await builder.Build().RunAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user