Stream Patch plus WIP and quick fixes

This commit is contained in:
2022-04-24 22:16:49 -04:00
parent adbf36da9f
commit 5e9ed4c2f5
10 changed files with 127 additions and 66 deletions
@@ -20,7 +20,7 @@
@if (Entity.Faction() != null)
{
<div>
<b>Faction:</b> @Entity.Faction().Faction
<b>Faction:</b> @DATA.Get()[Entity.Faction().Faction].Info().Name
</div>
}
@if (Entity.Tier() != null)
@@ -70,7 +70,7 @@ else
@if (Entity.Faction() != null)
{
<div>
<b>Faction:</b> @Entity.Faction().Faction
<b>Faction:</b> @DATA.Get()[Entity.Faction().Faction].Info().Name
</div>
}
@if (Entity.Tier() != null)
@@ -1,4 +1,9 @@
@if (Entity!.Weapons().Count > 0)
@inject IStorageService StorageService
@using Services.Website
@implements IDisposable
@if (Entity!.Weapons().Count > 0)
{
@if (StyleType.Equals("Plain"))
{
@@ -72,6 +77,7 @@
</div>
}
<div>
<b>- Targets:</b> @data.Targets
</div>
@@ -149,6 +155,7 @@
<div>
<b>Range:</b> @data.Range
</div>
@if (data.SecondsBetweenAttacks > 0)
{
<div>
@@ -233,4 +240,22 @@
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
private bool _isDynamicFormatting = false;
protected override void OnInitialized()
{
StorageService.Subscribe(RefreshDefaults);
}
void RefreshDefaults()
{
_isDynamicFormatting = StorageService.GetValue<bool>(StorageKeys.IsDynamicFormatting);
}
void IDisposable.Dispose()
{
StorageService.Unsubscribe(RefreshDefaults);
}
}