Ajour Partie Component

master
Fages Tony 1 year ago
parent c791f8930e
commit 42177fc1a0

@ -1,12 +1,11 @@
<Properties StartupConfiguration="{4B84D2B8-1D74-4293-945B-F1A30FCAB5B3}|Default">
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MultiItemStartupConfigurations />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MonoDevelop.Ide.ItemProperties.BlazorProject PreferredExecutionTarget="/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app" />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="BlazorProject/Components/Card.razor">
<MultiItemStartupConfigurations />
<MonoDevelop.Ide.Workbench ActiveDocument="BlazorProject/Pages/Index.razor">
<Files>
<File FileName="BlazorProject/Pages/Add.razor" Line="69" Column="12" />
<File FileName="BlazorProject/Pages/Add.razor.cs" Line="32" Column="16" />
@ -23,8 +22,7 @@
<File FileName="BlazorProject/Factories/ItemFactory.cs" Line="48" Column="6" />
<File FileName="BlazorProject/_Imports.razor" Line="13" Column="31" />
<File FileName="BlazorProject/Pages/_Layout.cshtml" Line="32" Column="70" />
<File FileName="BlazorProject/Pages/DeleteConfirmation.razor" Line="10" Column="7" />
<File FileName="BlazorProject/Pages/Index.razor" Line="3" Column="1" />
<File FileName="BlazorProject/Pages/Index.razor" Line="26" Column="8" />
<File FileName="BlazorProject/Shared/MainLayout.razor" Line="16" Column="19" />
<File FileName="BlazorProject/appsettings.json" Line="1" Column="1" />
<File FileName="BlazorProject/Controllers/CultureController.cs" Line="34" Column="1" />
@ -35,17 +33,20 @@
<File FileName="BlazorProject/Resources/Pages.List.fr-FR.resx" Line="1" Column="1" />
<File FileName="BlazorProject/Resources/Pages.fr-FR.resx" Line="1" Column="1" />
<File FileName="BlazorProject/Resources/Pages.fr-FR.Designer.cs" Line="1" Column="1" />
<File FileName="BlazorProject/Components/Card.razor" Line="1" Column="1" />
<File FileName="BlazorProject/Components/Card.razor" Line="6" Column="7" />
<File FileName="BlazorProject/Components/Card.razor.cs" Line="19" Column="6" />
<File FileName="BlazorProject/Models/Cake.cs" Line="9" Column="6" />
<File FileName="BlazorProject/Pages/Index.razor.cs" Line="14" Column="6" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="BlazorProject">
<Node name="BlazorProject">
<Node name="Components" expanded="True" selected="True" />
<Node name="Resources" expanded="True">
<Node name="Pages.fr-FR.resx" expanded="True" />
<Node name="Pages.List.resx" expanded="True" />
<Node name="BlazorProject" expanded="True">
<Node name="Components" expanded="True" />
<Node name="Models" expanded="True" />
<Node name="Pages" expanded="True">
<Node name="Index.razor" expanded="True" selected="True" />
</Node>
</Node>
</Node>
@ -53,4 +54,5 @@
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
</Properties>

File diff suppressed because one or more lines are too long

@ -0,0 +1,54 @@

<CascadingValue Value="@this">
<div class="container">
<div class="row">
<div class="col-6">
<div>Available items:</div>
<div>
<div class="css-grid">
@foreach (var item in Items)
{
<CraftingItem Item="item" NoDrop="true" />
}
</div>
</div>
</div>
<div class="col-6">
<div>Recipe</div>
<div>
<div class="css-recipe">
<CraftingItem Index="0" />
<CraftingItem Index="1" />
<CraftingItem Index="2" />
<CraftingItem Index="3" />
<CraftingItem Index="4" />
<CraftingItem Index="5" />
<CraftingItem Index="6" />
<CraftingItem Index="7" />
<CraftingItem Index="8" />
</div>
</div>
<div>Result</div>
<div>
<CraftingItem Item="RecipeResult" />
</div>
</div>
<div class="col-12">
<div>Actions</div>
<div class="actions" id="actions">
</div>
</div>
</div>
</div>
</CascadingValue>

@ -0,0 +1,85 @@
using System;
using BlazorProject.Models;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
namespace BlazorProject.Components
{
public partial class Crafting
{
private Item _recipeResult;
[CascadingParameter]
public Crafting Parent { get; set; }
public Crafting()
{
Actions = new ObservableCollection<CraftingAction>();
Actions.CollectionChanged += OnActionsCollectionChanged;
this.RecipeItems = new List<Item> { null, null, null, null, null, null, null, null, null };
}
public ObservableCollection<CraftingAction> Actions { get; set; }
public Item CurrentDragItem { get; set; }
[Parameter]
public List<Item> Items { get; set; }
public List<Item> RecipeItems { get; set; }
public Item RecipeResult
{
get => this._recipeResult;
set
{
if (this._recipeResult == value)
{
return;
}
this._recipeResult = value;
this.StateHasChanged();
}
}
[Parameter]
public List<CraftingRecipe> Recipes { get; set; }
/// <summary>
/// Gets or sets the java script runtime.
/// </summary>
[Inject]
internal IJSRuntime JavaScriptRuntime { get; set; }
public void CheckRecipe()
{
RecipeResult = null;
// Get the current model
var currentModel = string.Join("|", this.RecipeItems.Select(s => s != null ? s.Name : string.Empty));
this.Actions.Add(new CraftingAction { Action = $"Items : {currentModel}" });
foreach (var craftingRecipe in Recipes)
{
// Get the recipe model
var recipeModel = string.Join("|", craftingRecipe.Have.SelectMany(s => s));
this.Actions.Add(new CraftingAction { Action = $"Recipe model : {recipeModel}" });
if (currentModel == recipeModel)
{
RecipeResult = craftingRecipe.Give;
}
}
}
private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems);
}
}
}

@ -0,0 +1,19 @@
.css-grid {
grid-template-columns: repeat(4,minmax(0,1fr));
gap: 10px;
display: grid;
width: 286px;
}
.css-recipe {
grid-template-columns: repeat(3,minmax(0,1fr));
gap: 10px;
display: grid;
width: 212px;
}
.actions {
border: 1px solid black;
height: 250px;
overflow: scroll;
}

@ -0,0 +1,16 @@
window.Crafting =
{
AddActions: function (data) {
data.forEach(element => {
var div = document.createElement('div');
div.innerHTML = 'Action: ' + element.action + ' - Index: ' + element.index;
if (element.item) {
div.innerHTML += ' - Item Name: ' + element.item.name;
}
document.getElementById('actions').appendChild(div);
});
}
}

@ -0,0 +1,13 @@
using System;
using BlazorProject.Models;
namespace BlazorProject.Components
{
public class CraftingAction
{
public string Action { get; set; }
public int Index { get; set; }
public Item Item { get; set; }
}
}

@ -0,0 +1,13 @@
<div class="item"
ondragover="event.preventDefault();"
draggable="true"
@ondragstart="@OnDragStart"
@ondrop="@OnDrop"
@ondragenter="@OnDragEnter"
@ondragleave="@OnDragLeave">
@if (Item != null)
{
@Item.DisplayName
}
</div>

@ -0,0 +1,66 @@
using System;
using Blazorise;
using BlazorProject.Models;
using Microsoft.AspNetCore.Components;
namespace BlazorProject.Components
{
public partial class CraftingItem
{
[Parameter]
public int Index { get; set; }
[Parameter]
public Item Item { get; set; }
[Parameter]
public bool NoDrop { get; set; }
[CascadingParameter]
public Crafting Parent { get; set; }
internal void OnDragEnter()
{
if (NoDrop)
{
return;
}
Parent.Actions.Add(new CraftingAction { Action = "Drag Enter", Item = this.Item, Index = this.Index });
}
internal void OnDragLeave()
{
if (NoDrop)
{
return;
}
Parent.Actions.Add(new CraftingAction { Action = "Drag Leave", Item = this.Item, Index = this.Index });
}
internal void OnDrop()
{
if (NoDrop)
{
return;
}
this.Item = Parent.CurrentDragItem;
Parent.RecipeItems[this.Index] = this.Item;
Parent.Actions.Add(new CraftingAction { Action = "Drop", Item = this.Item, Index = this.Index });
// Check recipe
Parent.CheckRecipe();
}
private void OnDragStart()
{
Parent.CurrentDragItem = this.Item;
Parent.Actions.Add(new CraftingAction { Action = "Drag Start", Item = this.Item, Index = this.Index });
}
}
}

@ -0,0 +1,6 @@
.item {
width: 64px;
height: 64px;
border: 1px solid;
overflow: hidden;
}

@ -0,0 +1,12 @@
using System;
using BlazorProject.Models;
namespace BlazorProject.Components
{
public class CraftingRecipe
{
public Item Give { get; set; }
public List<List<string>> Have { get; set; }
}
}

@ -0,0 +1,14 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; }
[CascadingParameter]
public MyRootComponent RootComponent { get; set; }
}
<div style="border: 1px solid black; padding: 10px;">
<strong>MyFirstChildComponent - @RootComponent.Text</strong>
<div>
@ChildContent
</div>
</div>

@ -0,0 +1,16 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; }
[Parameter]
public string Text { get; set; }
}
<div style="border: 1px solid black; padding: 10px;">
<strong>MyRootComponent - @Text</strong>
<div>
<CascadingValue Value="@this">
@ChildContent
</CascadingValue>
</div>
</div>

@ -0,0 +1,14 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; }
[CascadingParameter]
public MyRootComponent RootComponent { get; set; }
}
<div style="border: 1px solid black; padding: 10px;">
<strong>MySecondChildComponent - @RootComponent.Text</strong>
<div>
@ChildContent
</div>
</div>

@ -0,0 +1,11 @@
@typeparam TItem
<div>
@if ((Items?.Count ?? 0) != 0)
{
@foreach (var item in Items)
{
@ShowTemplate(item);
}
}
</div>

@ -0,0 +1,15 @@
using System;
using Microsoft.AspNetCore.Components;
namespace BlazorProject.Components
{
public partial class ShowItems<TItem>
{
[Parameter]
public List<TItem> Items { get; set; }
[Parameter]
public RenderFragment<TItem> ShowTemplate { get; set; }
}
}

@ -0,0 +1,8 @@
<h3>TestRenderFragment</h3>
@code {
[Parameter]
public RenderFragment ChildContent { get; set; }
}
@ChildContent

@ -2,6 +2,19 @@
@using System.Globalization
@using BlazorProject.Components
@code
{
MyRootComponent MyRootComponent;
}
<MyRootComponent Text="RootComponentText">
<MyFirstChildComponent>
<MySecondChildComponent>
<div>MySecondChildComponent - Content</div>
</MySecondChildComponent>
</MyFirstChildComponent>
</MyRootComponent>
<PageTitle>Index</PageTitle>
<h1>Hello, world!</h1>
@ -24,5 +37,30 @@ Welcome to your new app.
</div>
</CardBody>
</Card>
<ShowItems Items="Cakes">
<ShowTemplate Context="CakeContext">
<div class="card text-center">
<div class="card-header">
Cake Token Id - @CakeContext.Id
</div>
<div class="card-body">
<h5 class="card-title">@CakeContext.Name</h5>
<p class="card-text">Price $@CakeContext.Cost</p>
</div>
<div class="card-footer text-muted">
Click Here
</div>
</div>
</ShowTemplate>
</ShowItems>
<TestRenderFragment>
<div>Content of my TestRenderFragment</div>
</TestRenderFragment>
<SurveyPrompt Title="How is Blazor working for you?" />
<div>
<Crafting Items="Items" Recipes="Recipes" />
</div>

@ -1,16 +1,59 @@
using System;
using BlazorProject.Components;
using BlazorProject.Models;
using BlazorProject.Services;
using Microsoft.AspNetCore.Components;
namespace BlazorProject.Pages
{
public partial class Index
{
private Cake CakeItem = new Cake
{
Id = 1,
Name = "Black Forest",
Cost = 50
};
public List<Cake> Cakes { get; set; }
[Inject]
public IDataService DataService { get; set; }
public List<Item> Items { get; set; } = new List<Item>();
private List<CraftingRecipe> Recipes { get; set; } = new List<CraftingRecipe>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
base.OnAfterRenderAsync(firstRender);
if (!firstRender)
{
return;
}
Items = await DataService.List(0, await DataService.Count());
Recipes = await DataService.GetRecipes();
StateHasChanged();
}
public void LoadCakes()
{
Cakes = new List<Cake>
{
// items hidden for display purpose
new Cake
{
Id = 1,
Name = "Red Velvet",
Cost = 60
},
};
}
}
}

@ -0,0 +1,29 @@
@page "/pets1"
<h1>Pets</h1>
<TableTemplate Items="pets" Context="pet">
<TableHeader>
<th>ID</th>
<th>Name</th>
</TableHeader>
<RowTemplate>
<td>@pet.PetId</td>
<td>@pet.Name</td>
</RowTemplate>
</TableTemplate>
@code {
private List<Pet> pets = new()
{
new Pet { PetId = 2, Name = "Mr. Bigglesworth" },
new Pet { PetId = 4, Name = "Salem Saberhagen" },
new Pet { PetId = 7, Name = "K-9" }
};
private class Pet
{
public int PetId { get; set; }
public string? Name { get; set; }
}
}

@ -0,0 +1,29 @@
@page "/pets2"
<h1>Pets</h1>
<TableTemplate Items="pets">
<TableHeader>
<th>ID</th>
<th>Name</th>
</TableHeader>
<RowTemplate Context="pet">
<td>@pet.PetId</td>
<td>@pet.Name</td>
</RowTemplate>
</TableTemplate>
@code {
private List<Pet> pets = new()
{
new Pet { PetId = 2, Name = "Mr. Bigglesworth" },
new Pet { PetId = 4, Name = "Salem Saberhagen" },
new Pet { PetId = 7, Name = "K-9" }
};
private class Pet
{
public int PetId { get; set; }
public string? Name { get; set; }
}
}

@ -0,0 +1,29 @@
@page "/pets3"
<h1>Pets</h1>
<TableTemplate Items="pets">
<TableHeader>
<th>ID</th>
<th>Name</th>
</TableHeader>
<RowTemplate>
<td>@context.PetId</td>
<td>@context.Name</td>
</RowTemplate>
</TableTemplate>
@code {
private List<Pet> pets = new()
{
new Pet { PetId = 2, Name = "Mr. Bigglesworth" },
new Pet { PetId = 4, Name = "Salem Saberhagen" },
new Pet { PetId = 7, Name = "K-9" }
};
private class Pet
{
public int PetId { get; set; }
public string? Name { get; set; }
}
}

@ -0,0 +1,29 @@
@page "/pets4"
<h1>Pets</h1>
<TableTemplate Items="pets" TItem="Pet">
<TableHeader>
<th>ID</th>
<th>Name</th>
</TableHeader>
<RowTemplate>
<td>@context.PetId</td>
<td>@context.Name</td>
</RowTemplate>
</TableTemplate>
@code {
private List<Pet> pets = new()
{
new Pet { PetId = 2, Name = "Mr. Bigglesworth" },
new Pet { PetId = 4, Name = "Salem Saberhagen" },
new Pet { PetId = 7, Name = "K-9" }
};
private class Pet
{
public int PetId { get; set; }
public string? Name { get; set; }
}
}

@ -36,5 +36,6 @@
<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
</body>
<script src="Components/Crafting.razor.js"></script>
</html>

@ -1,5 +1,6 @@
using System;
using Blazored.LocalStorage;
using BlazorProject.Components;
using BlazorProject.Factories;
using BlazorProject.Models;
using Microsoft.AspNetCore.Components;
@ -197,6 +198,25 @@ namespace BlazorProject.Services
// Save the data
await _localStorage.SetItemAsync("data", currentData);
}
public Task<List<CraftingRecipe>> GetRecipes()
{
var items = new List<CraftingRecipe>
{
new CraftingRecipe
{
Give = new Item { DisplayName = "Diamond", Name = "diamond" },
Have = new List<List<string>>
{
new List<string> { "dirt", "dirt", "dirt" },
new List<string> { "dirt", null, "dirt" },
new List<string> { "dirt", "dirt", "dirt" }
}
}
};
return Task.FromResult(items);
}
}
}

@ -1,4 +1,5 @@
using System;
using BlazorProject.Components;
using BlazorProject.Models;
namespace BlazorProject.Services
@ -17,6 +18,8 @@ namespace BlazorProject.Services
Task Delete(int id);
Task<List<CraftingRecipe>> GetRecipes();
}
}

@ -0,0 +1,28 @@
@typeparam TItem
@using System.Diagnostics.CodeAnalysis
<table class="table">
<thead>
<tr>@TableHeader</tr>
</thead>
<tbody>
@foreach (var item in Items)
{
if (RowTemplate is not null)
{
<tr>@RowTemplate(item)</tr>
}
}
</tbody>
</table>
@code {
[Parameter]
public RenderFragment? TableHeader { get; set; }
[Parameter]
public RenderFragment<TItem>? RowTemplate { get; set; }
[Parameter, AllowNull]
public IReadOnlyList<TItem> Items { get; set; }
}

@ -24,6 +24,26 @@ build_metadata.AdditionalFiles.CssScope =
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9DYXJkLnJhem9y
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/MyFirstChildComponent.razor]
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9NeUZpcnN0Q2hpbGRDb21wb25lbnQucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/MyRootComponent.razor]
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9NeVJvb3RDb21wb25lbnQucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/MySecondChildComponent.razor]
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9NeVNlY29uZENoaWxkQ29tcG9uZW50LnJhem9y
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/ShowItems.razor]
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9TaG93SXRlbXMucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/TestRenderFragment.razor]
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9UZXN0UmVuZGVyRnJhZ21lbnQucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Modals/DeleteConfirmation.razor]
build_metadata.AdditionalFiles.TargetPath = TW9kYWxzL0RlbGV0ZUNvbmZpcm1hdGlvbi5yYXpvcg==
build_metadata.AdditionalFiles.CssScope =
@ -56,6 +76,22 @@ build_metadata.AdditionalFiles.CssScope =
build_metadata.AdditionalFiles.TargetPath = UGFnZXMvTGlzdC5yYXpvcg==
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Pages/Pets1.razor]
build_metadata.AdditionalFiles.TargetPath = UGFnZXMvUGV0czEucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Pages/Pets2.razor]
build_metadata.AdditionalFiles.TargetPath = UGFnZXMvUGV0czIucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Pages/Pets3.razor]
build_metadata.AdditionalFiles.TargetPath = UGFnZXMvUGV0czMucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Pages/Pets4.razor]
build_metadata.AdditionalFiles.TargetPath = UGFnZXMvUGV0czQucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Shared/CultureSelector.razor]
build_metadata.AdditionalFiles.TargetPath = U2hhcmVkL0N1bHR1cmVTZWxlY3Rvci5yYXpvcg==
build_metadata.AdditionalFiles.CssScope =
@ -68,10 +104,22 @@ build_metadata.AdditionalFiles.CssScope =
build_metadata.AdditionalFiles.TargetPath = U2hhcmVkL1N1cnZleVByb21wdC5yYXpvcg==
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Shared/TableTemplate.razor]
build_metadata.AdditionalFiles.TargetPath = U2hhcmVkL1RhYmxlVGVtcGxhdGUucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/_Imports.razor]
build_metadata.AdditionalFiles.TargetPath = X0ltcG9ydHMucmF6b3I=
build_metadata.AdditionalFiles.CssScope =
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/Crafting.razor]
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9DcmFmdGluZy5yYXpvcg==
build_metadata.AdditionalFiles.CssScope = b-vyaap35qwa
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/CraftingItem.razor]
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50cy9DcmFmdGluZ0l0ZW0ucmF6b3I=
build_metadata.AdditionalFiles.CssScope = b-madgw7igqh
[/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Shared/MainLayout.razor]
build_metadata.AdditionalFiles.TargetPath = U2hhcmVkL01haW5MYXlvdXQucmF6b3I=
build_metadata.AdditionalFiles.CssScope = b-u64m9gwoct

@ -1 +1 @@
4675b14f1ace08800c34c4dca72127f225e725cf
08ef396d16c6a4c56c81b8b5e46b63f43850d232

@ -94,3 +94,5 @@
/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/obj/Debug/net6.0/BlazorProject.pdb
/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/obj/Debug/net6.0/BlazorProject.genruntimeconfig.cache
/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/obj/Debug/net6.0/ref/BlazorProject.dll
/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/obj/Debug/net6.0/scopedcss/Components/Crafting.razor.rz.scp.css
/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/obj/Debug/net6.0/scopedcss/Components/CraftingItem.razor.rz.scp.css

@ -0,0 +1,19 @@
.css-grid[b-vyaap35qwa] {
grid-template-columns: repeat(4,minmax(0,1fr));
gap: 10px;
display: grid;
width: 286px;
}
.css-recipe[b-vyaap35qwa] {
grid-template-columns: repeat(3,minmax(0,1fr));
gap: 10px;
display: grid;
width: 212px;
}
.actions[b-vyaap35qwa] {
border: 1px solid black;
height: 250px;
overflow: scroll;
}

@ -0,0 +1,6 @@
.item[b-madgw7igqh] {
width: 64px;
height: 64px;
border: 1px solid;
overflow: hidden;
}

@ -1,5 +1,32 @@
@import '_content/Blazored.Modal/Blazored.Modal.bundle.scp.css';
/* _content/BlazorProject/Components/Crafting.razor.rz.scp.css */
.css-grid[b-vyaap35qwa] {
grid-template-columns: repeat(4,minmax(0,1fr));
gap: 10px;
display: grid;
width: 286px;
}
.css-recipe[b-vyaap35qwa] {
grid-template-columns: repeat(3,minmax(0,1fr));
gap: 10px;
display: grid;
width: 212px;
}
.actions[b-vyaap35qwa] {
border: 1px solid black;
height: 250px;
overflow: scroll;
}
/* _content/BlazorProject/Components/CraftingItem.razor.rz.scp.css */
.item[b-madgw7igqh] {
width: 64px;
height: 64px;
border: 1px solid;
overflow: hidden;
}
/* _content/BlazorProject/Shared/MainLayout.razor.rz.scp.css */
.page[b-u64m9gwoct] {
position: relative;

@ -1,3 +1,30 @@
/* _content/BlazorProject/Components/Crafting.razor.rz.scp.css */
.css-grid[b-vyaap35qwa] {
grid-template-columns: repeat(4,minmax(0,1fr));
gap: 10px;
display: grid;
width: 286px;
}
.css-recipe[b-vyaap35qwa] {
grid-template-columns: repeat(3,minmax(0,1fr));
gap: 10px;
display: grid;
width: 212px;
}
.actions[b-vyaap35qwa] {
border: 1px solid black;
height: 250px;
overflow: scroll;
}
/* _content/BlazorProject/Components/CraftingItem.razor.rz.scp.css */
.item[b-madgw7igqh] {
width: 64px;
height: 64px;
border: 1px solid;
overflow: hidden;
}
/* _content/BlazorProject/Shared/MainLayout.razor.rz.scp.css */
.page[b-u64m9gwoct] {
position: relative;

@ -1,6 +1,6 @@
{
"Version": 1,
"Hash": "m1oX1yGhI9WFPv/9tmkPw/FhIWyDMm5N4mSthpG4UVQ=",
"Hash": "gAkmmfGCfHCBoNwMfpAFzwh9KgQQZ4yOZ5X1ct77Szs=",
"Source": "BlazorProject",
"BasePath": "_content/BlazorProject",
"Mode": "Default",
@ -747,6 +747,23 @@
"CopyToPublishDirectory": "PreserveNewest",
"OriginalItemSpec": "/Users/tonyfages/.nuget/packages/blazorise/1.4.0/staticwebassets/vendors/sha512.js"
},
{
"Identity": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/Crafting.razor.js",
"SourceId": "BlazorProject",
"SourceType": "Discovered",
"ContentRoot": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/",
"BasePath": "_content/BlazorProject",
"RelativePath": "Components/Crafting.razor.js",
"AssetKind": "All",
"AssetMode": "All",
"AssetRole": "Primary",
"RelatedAsset": "",
"AssetTraitName": "",
"AssetTraitValue": "",
"CopyToOutputDirectory": "Never",
"CopyToPublishDirectory": "PreserveNewest",
"OriginalItemSpec": "Components/Crafting.razor.js"
},
{
"Identity": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/obj/Debug/net6.0/scopedcss/bundle/BlazorProject.styles.css",
"SourceId": "BlazorProject",
@ -1069,6 +1086,40 @@
"CopyToOutputDirectory": "Never",
"CopyToPublishDirectory": "PreserveNewest",
"OriginalItemSpec": "wwwroot/images/luna.png"
},
{
"Identity": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/wwwroot/images/okko.png",
"SourceId": "BlazorProject",
"SourceType": "Discovered",
"ContentRoot": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/wwwroot/",
"BasePath": "_content/BlazorProject",
"RelativePath": "images/okko.png",
"AssetKind": "All",
"AssetMode": "All",
"AssetRole": "Primary",
"RelatedAsset": "",
"AssetTraitName": "",
"AssetTraitValue": "",
"CopyToOutputDirectory": "Never",
"CopyToPublishDirectory": "PreserveNewest",
"OriginalItemSpec": "wwwroot/images/okko.png"
},
{
"Identity": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/wwwroot/index.html",
"SourceId": "BlazorProject",
"SourceType": "Discovered",
"ContentRoot": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/wwwroot/",
"BasePath": "_content/BlazorProject",
"RelativePath": "index.html",
"AssetKind": "All",
"AssetMode": "All",
"AssetRole": "Primary",
"RelatedAsset": "",
"AssetTraitName": "",
"AssetTraitValue": "",
"CopyToOutputDirectory": "Never",
"CopyToPublishDirectory": "PreserveNewest",
"OriginalItemSpec": "wwwroot/index.html"
}
]
}

File diff suppressed because one or more lines are too long

@ -1,5 +1,9 @@
{
"Files": [
{
"Id": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/Components/Crafting.razor.js",
"PackagePath": "staticwebassets/Components/Crafting.razor.js"
},
{
"Id": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/obj/Debug/net6.0/scopedcss/projectbundle/BlazorProject.bundle.scp.css",
"PackagePath": "staticwebassets/BlazorProject.bundle.scp.css"
@ -72,6 +76,14 @@
"Id": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/wwwroot/images/luna.png",
"PackagePath": "staticwebassets/images/luna.png"
},
{
"Id": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/wwwroot/images/okko.png",
"PackagePath": "staticwebassets/images/okko.png"
},
{
"Id": "/Users/tonyfages/2A/Blazor/BlazorApp/BlazorProject/BlazorProject/wwwroot/index.html",
"PackagePath": "staticwebassets/index.html"
},
{
"Id": "obj/Debug/net6.0/staticwebassets/msbuild.BlazorProject.Microsoft.AspNetCore.StaticWebAssets.props",
"PackagePath": "build\\Microsoft.AspNetCore.StaticWebAssets.props"

@ -16,6 +16,22 @@
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\BlazorProject.bundle.scp.css))</OriginalItemSpec>
</StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\Components\Crafting.razor.js))">
<SourceType>Package</SourceType>
<SourceId>BlazorProject</SourceId>
<ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
<BasePath>_content/BlazorProject</BasePath>
<RelativePath>Components/Crafting.razor.js</RelativePath>
<AssetKind>All</AssetKind>
<AssetMode>All</AssetMode>
<AssetRole>Primary</AssetRole>
<RelatedAsset></RelatedAsset>
<AssetTraitName></AssetTraitName>
<AssetTraitValue></AssetTraitValue>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\Components\Crafting.razor.js))</OriginalItemSpec>
</StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\css\bootstrap\bootstrap.min.css))">
<SourceType>Package</SourceType>
<SourceId>BlazorProject</SourceId>
@ -288,5 +304,37 @@
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\images\luna.png))</OriginalItemSpec>
</StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\images\okko.png))">
<SourceType>Package</SourceType>
<SourceId>BlazorProject</SourceId>
<ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
<BasePath>_content/BlazorProject</BasePath>
<RelativePath>images/okko.png</RelativePath>
<AssetKind>All</AssetKind>
<AssetMode>All</AssetMode>
<AssetRole>Primary</AssetRole>
<RelatedAsset></RelatedAsset>
<AssetTraitName></AssetTraitName>
<AssetTraitValue></AssetTraitValue>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\images\okko.png))</OriginalItemSpec>
</StaticWebAsset>
<StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\index.html))">
<SourceType>Package</SourceType>
<SourceId>BlazorProject</SourceId>
<ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
<BasePath>_content/BlazorProject</BasePath>
<RelativePath>index.html</RelativePath>
<AssetKind>All</AssetKind>
<AssetMode>All</AssetMode>
<AssetRole>Primary</AssetRole>
<RelatedAsset></RelatedAsset>
<AssetTraitName></AssetTraitName>
<AssetTraitValue></AssetTraitValue>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\index.html))</OriginalItemSpec>
</StaticWebAsset>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
</body>
<script>window.convertArray = (win1251Array) => {
var win1251decoder = new TextDecoder('windows-1251');
var bytes = new Uint8Array(win1251Array);
var decodedArray = win1251decoder.decode(bytes);
console.log(decodedArray);
return decodedArray;
};</script>
</html>
Loading…
Cancel
Save