Create a component for displaying bookmark containers
This commit is contained in:
parent
b0a4c5a957
commit
437e90039f
35
Start/Client/Components/BookmarkContainer.razor
Normal file
35
Start/Client/Components/BookmarkContainer.razor
Normal file
|
@ -0,0 +1,35 @@
|
|||
@using Start.Shared
|
||||
|
||||
<div class="activeBookmarkContainer">
|
||||
@if (this.Container == null)
|
||||
{
|
||||
<div class="empty">
|
||||
<div class="empty-icon">
|
||||
<div class="loading loading-icon"></div>
|
||||
</div>
|
||||
<p class="empty-title h5">Loading Bookmarks</p>
|
||||
</div>
|
||||
<p class="text-center">Loading Bookmarks</p>
|
||||
}
|
||||
else if (!this.Container.BookmarkGroups?.Any() ?? true)
|
||||
{
|
||||
<div class="empty">
|
||||
<div class="empty-icon">
|
||||
<i class="icon icon-3x icon-bookmark"></i>
|
||||
</div>
|
||||
<p class="empty-title h5">No Bookmark Groups</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (BookmarkGroupDto group in this.Container.BookmarkGroups!)
|
||||
{
|
||||
<BookmarkGroup Group="group" />
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public BookmarkContainerDto? Container { get; set; }
|
||||
}
|
|
@ -47,34 +47,7 @@ else
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="activeBookmarkContainer">
|
||||
@if (this.selectedBookmarkContainer == null)
|
||||
{
|
||||
<div class="empty">
|
||||
<div class="empty-icon">
|
||||
<div class="loading loading-icon"></div>
|
||||
</div>
|
||||
<p class="empty-title h5">Loading Bookmarks</p>
|
||||
</div>
|
||||
<p class="text-center">Loading Bookmarks</p>
|
||||
}
|
||||
else if (!this.selectedBookmarkContainer.BookmarkGroups?.Any() ?? true)
|
||||
{
|
||||
<div class="empty">
|
||||
<div class="empty-icon">
|
||||
<i class="icon icon-3x icon-bookmark"></i>
|
||||
</div>
|
||||
<p class="empty-title h5">No Bookmark Groups</p>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@foreach (BookmarkGroupDto group in this.selectedBookmarkContainer.BookmarkGroups!)
|
||||
{
|
||||
<BookmarkGroup Group="group" />
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<BookmarkContainer Container="this.selectedBookmarkContainer" />
|
||||
|
||||
<CreateContainer IsOpen="showCreateContainerForm" OnClose="this.OnCloseCreateContainer"
|
||||
OnCreated="this.OnContainerCreated" />
|
||||
|
|
Loading…
Reference in a new issue