Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

59 data management UI #65

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Phalanx.App/Pages/DataManagement.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@page "/datamanagement"

@using Phalanx.App.Pages.Management

<TitlePart>Data Management</TitlePart>

<div>
<h1>Data Management</h1>
<FluentCard class="p-2">
<FluentSearch Placeholder="Search Packages" class="w-100 mt-2 mb-3"/>
<br />
<FluentCheckbox>Show Pulled Packages</FluentCheckbox>
<FluentCheckbox>Show Archived Packages</FluentCheckbox>
</FluentCard>
<hr/>
<div class="data-gallery">
<GalleryItem/>
<GalleryItem/>
</div>
</div>
12 changes: 12 additions & 0 deletions src/Phalanx.App/Pages/DataManagement.razor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
h1 {
display: block;
}

.control-container {
margin-top: 2em;
margin-bottom: 1em;
}

.data-gallery {
margin-top: 1em;
}
1 change: 1 addition & 0 deletions src/Phalanx.App/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

<div style="display: flex; justify-content: space-around;">
<FluentAnchor Appearance="Appearance.Accent" Href="/rosteredit">Edit sample roster</FluentAnchor>
<FluentAnchor Appearance="Appearance.Accent" Href="/datamanagement">Data Management</FluentAnchor>
<FluentAnchor Appearance="Appearance.Accent" Href="/print">Format roster</FluentAnchor>
</div>
25 changes: 25 additions & 0 deletions src/Phalanx.App/Pages/Management/GalleryItem.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<FluentCard class="my-3">
<div class="gallery-item">
<div class="game-system-info-container">
<h2 class="game-system-title">A Song of Ice & Fire: Tabletop Miniture Game</h2>
<span class="remote-version">v2.1</span>
<span class="remote-version-release-date">3 years ago</span>
</div>

<div class="gallery-item-button-container">
<FluentButton class="mx-1 mb-1">
<FluentIcon Name="@FluentIcons.Save" Slot="start" Filled="true" Size="@IconSize.Size16"/>
Pull
</FluentButton>
<FluentButton class="mx-1 mb-1">
<FluentIcon Name="@FluentIcons.ArrowUp" Slot="start" Size="IconSize.Size16" Filled=true />
Update
</FluentButton>
<FluentButton class="mx-1 mb-1">
<FluentIcon Name="@FluentIcons.Delete" Slot="start" Filled="true" Size="@IconSize.Size16"/>
Remove
</FluentButton>
</div>
<span class="local-version">Local Version: 2.0</span>
</div>
</FluentCard>
38 changes: 38 additions & 0 deletions src/Phalanx.App/Pages/Management/GalleryItem.razor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.gallery-item {
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 120px;
padding: 0.2em 0.4em;
margin-top: 0.5em;
margin-bottom: 0.5em;
}

.game-system-title {
font-size: 1.2em;
display: block;
margin: 0;
padding: 0;
}

.remote-version {
font-size: 1em;
display: block;
margin-top: 0.4em;
}

.remote-version-release-date, .local-version {
font-style: italic;
font-size: 0.8em;
display: block;
}

.game-system-info-container, .gallery-item-button-container {
margin-top: 0.6em;
margin-bottom: 0.6em;
}

.gallery-item-button-container {
display: flex;
flex-wrap: wrap;
}
3 changes: 3 additions & 0 deletions src/Phalanx.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Phalanx.App;
using Phalanx.App.Pages.Printing;
using Microsoft.Fast.Components.FluentUI;


var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddScoped<RosterFormatsProvider>();
builder.Services.AddFluentUIComponents();

await builder.Build().RunAsync();