|
@@ -1,135 +0,0 @@
|
|
|
-@inject IEventBus EventBus;
|
|
|
-
|
|
|
-@* Required *@
|
|
|
-<MudThemeProvider />
|
|
|
-<MudPopoverProvider />
|
|
|
-
|
|
|
-@* Needed for dialogs *@
|
|
|
-<MudDialogProvider />
|
|
|
-
|
|
|
-@* Needed for snackbars *@
|
|
|
-<MudSnackbarProvider />
|
|
|
-
|
|
|
-<MudLayout>
|
|
|
- <MudSplitter Class="mud-height-full" StartContentStyle="overflow:hidden">
|
|
|
- <StartContent>
|
|
|
- <MudStack StretchItems="StretchItems.End" AlignItems="AlignItems.Stretch" Style="width:100%">
|
|
|
- <MudStack Row AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="mud-paper mud-paper-square stack-adorner">
|
|
|
- <MudButton Color="Color.Inherit" Class="pa-3 rounded-0 hideable" Style="min-width: 0;"><MudIcon Icon="@Icons.Material.Outlined.Add" /></MudButton>
|
|
|
- <MudText Class="hideable">Contacts</MudText>
|
|
|
- <MudButton Color="Color.Inherit" Class="pa-3 rounded-0 hideable" Style="min-width: 0;"><MudIcon Icon="@Icons.Material.Outlined.Delete" /></MudButton>
|
|
|
- </MudStack>
|
|
|
- <MudStack Row Class="mud-background-gray stack-adorner" Style="overflow-x: auto;">
|
|
|
- <MudDropContainer T="DropZoneItem" Items="_items" ItemsSelector="@((item, dropzone) => item.Zone == dropzone)" ItemDropped="ItemUpdated" Class="4 flex-grow-1">
|
|
|
- <ChildContent>
|
|
|
- <MudDropContainer T="DropZone" Items="_zones" ItemsSelector="@((item, dropzone) => true)" Class="5">
|
|
|
- <ChildContent>
|
|
|
- <MudDropZone T="DropZone" AllowReorder Class="6 rounded mud-background-gray px-1 py-1 ma-1"/>
|
|
|
- </ChildContent>
|
|
|
- <ItemRenderer>
|
|
|
- <MudPaper Class="pa-1 my-1">
|
|
|
- <MudText Typo="Typo.h6">@context.Name</MudText>
|
|
|
- <MudDropZone T="DropZoneItem" Identifier="@context.Name" AllowReorder Class="rounded mud-background-gray px-4 py-1 ma-4"/>
|
|
|
- </MudPaper>
|
|
|
- </ItemRenderer>
|
|
|
- </MudDropContainer>
|
|
|
- </ChildContent>
|
|
|
- <ItemRenderer>
|
|
|
- <MudPaper Class="pa-4 my-4">
|
|
|
- <MudText>@context.Name</MudText>
|
|
|
- </MudPaper>
|
|
|
- </ItemRenderer>
|
|
|
- </MudDropContainer>
|
|
|
- </MudStack>
|
|
|
-
|
|
|
- </MudStack>
|
|
|
-
|
|
|
- </StartContent>
|
|
|
- <EndContent>
|
|
|
- <MudMainContent>
|
|
|
- <h1>Counter3</h1>
|
|
|
- <p>Current count: @currentCount</p>
|
|
|
- <MudButton Variant="Variant.Filled" @onclick="IncrementCount">Click me</MudButton>
|
|
|
- <MudGrid>
|
|
|
- <MudItem xs="12" sm="6" md="4">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12" sm="6" md="4">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12" sm="12" md="4">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12" sm="6">
|
|
|
- <MudGrid>
|
|
|
- <MudItem xs="12">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- </MudGrid>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12" sm="6">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 100%"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12" sm="6" md="4">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12" sm="6" md="4">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- <MudItem xs="12" sm="12" md="4">
|
|
|
- <MudPaper Elevation="2" Class="pa-4" Style="height: 200px;"></MudPaper>
|
|
|
- </MudItem>
|
|
|
- </MudGrid>
|
|
|
- </MudMainContent>
|
|
|
- </EndContent>
|
|
|
- </MudSplitter>
|
|
|
-</MudLayout>
|
|
|
-
|
|
|
-
|
|
|
-@code {
|
|
|
- private int currentCount = 0;
|
|
|
- private bool _isUiShown = false;
|
|
|
-
|
|
|
- private void IncrementCount()
|
|
|
- {
|
|
|
- currentCount++;
|
|
|
- }
|
|
|
-
|
|
|
- protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
|
- {
|
|
|
- await base.OnAfterRenderAsync(firstRender);
|
|
|
-
|
|
|
- if (_isUiShown) return;
|
|
|
- _isUiShown = true;
|
|
|
- EventBus.Publish<UiShownEvent>();
|
|
|
- }
|
|
|
-
|
|
|
- private void ItemUpdated(MudItemDropInfo<DropZoneItem> dropItem) => dropItem.Item.Zone = dropItem.DropzoneIdentifier;
|
|
|
-
|
|
|
- private List<DropZone> _zones = new()
|
|
|
- {
|
|
|
- new() { Name = "Drop Zone 1" },
|
|
|
- new() { Name = "Drop Zone 2" }
|
|
|
- };
|
|
|
-
|
|
|
- private List<DropZoneItem> _items = new()
|
|
|
- {
|
|
|
- new() { Zone = "Drop Zone 1", Name = "Item 1" },
|
|
|
- new() { Zone = "Drop Zone 1", Name = "Item 2" },
|
|
|
- new() { Zone = "Drop Zone 2", Name = "Item 3" },
|
|
|
- };
|
|
|
-
|
|
|
- private class DropZone
|
|
|
- {
|
|
|
- public string Name { get; init; }
|
|
|
- }
|
|
|
-
|
|
|
- private class DropZoneItem
|
|
|
- {
|
|
|
- public string Zone { get; set; }
|
|
|
- public string Name { get; init; }
|
|
|
- }
|
|
|
-}
|