Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 66081eead5 | |||
| 530b8ffea2 | |||
| b8a5d81856 | |||
| 5c34663617 | |||
| 184ce1854e | |||
| 8f26d5fbfa | |||
| d8964da36f | |||
| 51946a1388 | |||
| cf0d6ee62a | |||
| c2d6fd1b17 | |||
| 029f5b5d8a | |||
| ff81325020 | |||
| 3e1b2eb48c | |||
| fc884c2350 | |||
| 2d833d3a90 | |||
| c152018be8 | |||
| aa7b3f3d68 | |||
| c7f4aad99d | |||
| e24a0a3144 | |||
| 5f5f83a85a | |||
| 3bdf897ac8 | |||
| 76fe6886f2 | |||
| 5fd12b34ac | |||
| da0961fe7f | |||
| bbc724957a | |||
| 86a66d3278 | |||
| e997222068 | |||
| 47418a60ad | |||
| 2145871637 | |||
| 45da04bb18 | |||
| bf2e7e142d | |||
| a5f397e388 | |||
| 70c7351051 |
@@ -0,0 +1,147 @@
|
|||||||
|
@using Microsoft.AspNetCore.Components.Forms
|
||||||
|
|
||||||
|
<div class="create-product-shell">
|
||||||
|
|
||||||
|
<div class="book-preview-drawer @(string.IsNullOrEmpty(ActivePreviewUrl) ? "" : "is-open")">
|
||||||
|
@if (!string.IsNullOrEmpty(ActivePreviewUrl))
|
||||||
|
{
|
||||||
|
<button type="button" class="btn-close-preview-floating" title="Collapse Frame" @onclick="ClosePreviewDrawer">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
||||||
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="drawer-portrait-frame">
|
||||||
|
<img src="@ActivePreviewUrl" alt="Active Book Design Preview" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="create-product-container">
|
||||||
|
<EditForm Model="@ProductModel" OnValidSubmit="HandleValidSubmit" class="form-entry-canvas">
|
||||||
|
<DataAnnotationsValidator />
|
||||||
|
|
||||||
|
<div class="form-scroll-viewport">
|
||||||
|
|
||||||
|
<div class="form-section-header">
|
||||||
|
<span class="field-accent-tag">PRODUCT MASTER LEDGER</span>
|
||||||
|
<p>Provision catalog items metadata, book cover assets, and supplementary chapter telemetry designs.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-text-inputs-section">
|
||||||
|
<div class="console-field-group">
|
||||||
|
<label class="console-field-label">Book Title</label>
|
||||||
|
<InputText @bind-Value="ProductModel.Name" class="console-input" placeholder="e.g., Neuromancer" />
|
||||||
|
<ValidationMessage For="@(() => ProductModel.Name)" style="color: #ff5722; font-size: 0.75rem;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="console-field-group">
|
||||||
|
<label class="console-field-label">Short Summary</label>
|
||||||
|
<InputText @bind-Value="ProductModel.Summary" class="console-input" placeholder="Brief catchphrase description metadata line..." />
|
||||||
|
<ValidationMessage For="@(() => ProductModel.Summary)" style="color: #ff5722; font-size: 0.75rem;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="console-field-group">
|
||||||
|
<label class="console-field-label">Base Ledger Price (ZAR)</label>
|
||||||
|
<InputNumber @bind-Value="ProductModel.Price" class="console-input" placeholder="0.00" />
|
||||||
|
<ValidationMessage For="@(() => ProductModel.Price)" style="color: #ff5722; font-size: 0.75rem;" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="console-field-group">
|
||||||
|
<label class="console-field-label">Full Catalog Description</label>
|
||||||
|
<InputTextArea @bind-Value="ProductModel.Description" class="console-textarea" rows="4" placeholder="Enter extended markdown contents..." />
|
||||||
|
<ValidationMessage For="@(() => ProductModel.Description)" style="color: #ff5722; font-size: 0.75rem;" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-media-deck-section">
|
||||||
|
<div class="form-section-header" style="margin-bottom: 1rem; padding-bottom: 0.5rem;">
|
||||||
|
<p style="text-transform: uppercase; font-weight: 600; color: #cbd5e1; font-size: 0.8rem; letter-spacing: 0.05em;">Media Assets Node Array</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="media-deck-row">
|
||||||
|
|
||||||
|
<div class="console-field-group">
|
||||||
|
<label class="console-field-label">Primary Cover</label>
|
||||||
|
<div class="book-cover-dropzone">
|
||||||
|
<InputFile OnChange="HandleMainImageUpload" accept=".png,.jpg,.jpeg,.webp" class="hidden-file-input" id="main-image-file" />
|
||||||
|
|
||||||
|
@if (string.IsNullOrEmpty(ProductModel.ImageUrl))
|
||||||
|
{
|
||||||
|
/* Clicking anywhere inside this label launches the file system picker */
|
||||||
|
<label for="main-image-file" class="dropzone-interactive-layer">
|
||||||
|
<div class="empty-slot-blueprint">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
||||||
|
<line x1="12" y1="5" x2="12" y2="19"></line>
|
||||||
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
||||||
|
</svg>
|
||||||
|
<span style="font-size: 0.7rem; font-family: monospace; color: #475569; margin-top: 0.5rem;">UPLOAD COVER</span>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="dropzone-active-preview">
|
||||||
|
<img src="@ProductModel.ImageUrl" alt="Main Book Cover" />
|
||||||
|
|
||||||
|
<div class="image-actions-overlay">
|
||||||
|
<button type="button" class="btn-micro-action" title="Preview Image" @onclick="() => SetPreviewActive(ProductModel.ImageUrl)">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn-micro-action danger" title="Remove Asset" @onclick="ClearMainImage">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="console-field-group">
|
||||||
|
<label class="console-field-label">Additional Media Slots</label>
|
||||||
|
<div class="thumbnail-deck-grid">
|
||||||
|
@for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
var index = i;
|
||||||
|
<div class="thumbnail-slot-node @(HasAssetAt(index) ? "populated" : "empty")">
|
||||||
|
@if (HasAssetAt(index))
|
||||||
|
{
|
||||||
|
<img src="@ProductModel.Thumbnails[index]" alt="Slot @(index + 1)" />
|
||||||
|
|
||||||
|
<div class="image-actions-overlay">
|
||||||
|
<button type="button" class="btn-micro-action" title="Preview Image" @onclick="() => SetPreviewActive(ProductModel.Thumbnails[index])">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn-micro-action danger" title="Remove Asset" @onclick="() => RemoveThumbnailAt(index)">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Clean hidden execution context matched back to label action surfaces */
|
||||||
|
<InputFile OnChange="@(e => HandleThumbnailUpload(e, index))" accept=".png,.jpg,.jpeg,.webp" class="hidden-file-input" id="@($"thumb-file-{index}")" />
|
||||||
|
<label for="@($"thumb-file-{index}")" class="empty-slot-blueprint">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
||||||
|
<line x1="12" y1="5" x2="12" y2="19"></line>
|
||||||
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
||||||
|
</svg>
|
||||||
|
<span style="font-size: 0.65rem; font-family: monospace; margin-top: 0.25rem;">0@(index + 1)</span>
|
||||||
|
</label>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-action-footer">
|
||||||
|
<button type="submit" class="btn-apply-filters">Commit Record Ledger</button>
|
||||||
|
</div>
|
||||||
|
</EditForm>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
using LiteCharms.Features.S3.Abstractions;
|
||||||
|
using static LiteCharms.Features.S3.Constants;
|
||||||
|
|
||||||
|
namespace ShopAdmin.Components;
|
||||||
|
|
||||||
|
public partial class CreateProduct([FromKeyedServices(BookshopBucketName)] IS3Service s3Service)
|
||||||
|
{
|
||||||
|
private readonly CancellationTokenSource cancellationTokenSource = new();
|
||||||
|
private CancellationToken cancellationToken;
|
||||||
|
|
||||||
|
protected string? ActivePreviewUrl { get; set; }
|
||||||
|
|
||||||
|
protected CreateProductModel ProductModel { get; set; } = new();
|
||||||
|
|
||||||
|
private const long MaxAllowedFileSize = 1024 * 1024 * 5;
|
||||||
|
|
||||||
|
private readonly Func<string, string> GetFileKeyFromUrl = url => url.Split('/').Last();
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
base.OnInitialized();
|
||||||
|
|
||||||
|
cancellationToken = cancellationTokenSource.Token;
|
||||||
|
|
||||||
|
if (ProductModel.Thumbnails.Count == 0)
|
||||||
|
ProductModel.Thumbnails = [.. Enumerable.Repeat(string.Empty, 5)];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task HandleValidSubmit() => Task.CompletedTask;
|
||||||
|
|
||||||
|
public bool HasAssetAt(int index) => (ProductModel?.Thumbnails) != null && index < ProductModel.Thumbnails.Count &&
|
||||||
|
!string.IsNullOrWhiteSpace(ProductModel.Thumbnails[index]);
|
||||||
|
|
||||||
|
private async Task HandleMainImageUpload(InputFileChangeEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var file = e.File;
|
||||||
|
|
||||||
|
if (file == null) return;
|
||||||
|
|
||||||
|
using var stream = new MemoryStream();
|
||||||
|
|
||||||
|
await file.OpenReadStream(MaxAllowedFileSize).CopyToAsync(stream, cancellationToken);
|
||||||
|
|
||||||
|
stream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
var result = await s3Service.UploadFileAsync(file.Name, stream,
|
||||||
|
MimeTypes.GetMimeType(file.Name), cancellationToken);
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
ProductModel.ImageUrl = result.Value;
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Main Image Upload Exception: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPreviewActive(string? url)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(url)) return;
|
||||||
|
|
||||||
|
ActivePreviewUrl = url;
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClosePreviewDrawer()
|
||||||
|
{
|
||||||
|
ActivePreviewUrl = null;
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task HandleThumbnailUpload(InputFileChangeEventArgs e, int index)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var file = e.File;
|
||||||
|
|
||||||
|
if (file == null) return;
|
||||||
|
|
||||||
|
using var stream = new MemoryStream();
|
||||||
|
|
||||||
|
await file.OpenReadStream(MaxAllowedFileSize, cancellationToken).CopyToAsync(stream, cancellationToken);
|
||||||
|
|
||||||
|
stream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
var result = await s3Service.UploadFileAsync(file.Name, stream,
|
||||||
|
MimeTypes.GetMimeType(file.Name), cancellationToken);
|
||||||
|
|
||||||
|
if (result.IsSuccess && index < ProductModel.Thumbnails.Count)
|
||||||
|
{
|
||||||
|
ProductModel.Thumbnails[index] = result.Value;
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Thumbnail Slot {index} Upload Exception: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task ClearMainImage()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(ProductModel.ImageUrl)) return;
|
||||||
|
|
||||||
|
var targetUrl = ProductModel.ImageUrl;
|
||||||
|
|
||||||
|
if (ActivePreviewUrl == targetUrl) ActivePreviewUrl = null;
|
||||||
|
|
||||||
|
ProductModel.ImageUrl = null;
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
|
|
||||||
|
var result = await s3Service.DeleteFileAsync(GetFileKeyFromUrl(targetUrl));
|
||||||
|
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
Console.WriteLine($"[S3 Orphan Cleanup Failure]: {result.Errors[0].Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task RemoveThumbnailAt(int index)
|
||||||
|
{
|
||||||
|
if (index < 0 || index >= ProductModel.Thumbnails.Count) return;
|
||||||
|
|
||||||
|
var targetUrl = ProductModel.Thumbnails[index];
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(targetUrl)) return;
|
||||||
|
|
||||||
|
if (ActivePreviewUrl == targetUrl) ActivePreviewUrl = null;
|
||||||
|
|
||||||
|
ProductModel.Thumbnails[index] = string.Empty;
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
|
|
||||||
|
var result = await s3Service.DeleteFileAsync(GetFileKeyFromUrl(targetUrl));
|
||||||
|
|
||||||
|
if (result.IsFailed)
|
||||||
|
Console.WriteLine($"[S3 Thumbnail Cleanup Failure]: {result.Errors[0].Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CreateProductModel
|
||||||
|
{
|
||||||
|
[Required(ErrorMessage = "Product name is required.")]
|
||||||
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "Summary is required.")]
|
||||||
|
public string? Summary { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "Description is required.")]
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
[Range(0.01, double.MaxValue, ErrorMessage = "Price must be greater than zero.")]
|
||||||
|
public decimal Price { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "Primary image is required.")]
|
||||||
|
public string? ImageUrl { get; set; }
|
||||||
|
|
||||||
|
public List<string> Thumbnails { get; set; } = [];
|
||||||
|
}
|
||||||
@@ -0,0 +1,364 @@
|
|||||||
|
/* ==========================================================================
|
||||||
|
Shell & Outer Layout Container
|
||||||
|
========================================================================== */
|
||||||
|
.create-product-shell {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
background: #02060d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.create-product-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-entry-canvas {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-scroll-viewport {
|
||||||
|
padding: 2.5rem;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-section-header {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||||
|
padding-bottom: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-accent-tag {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 600;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-section-header p {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
font-size: 0.88rem;
|
||||||
|
color: #64748b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Stacked Sub-Section Layout Blocks
|
||||||
|
========================================================================== */
|
||||||
|
.form-text-inputs-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 3rem; /* Generates clear space before the media controls block */
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-media-deck-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Horizontal alignment grid for cover upload & thumbnail array side-by-side */
|
||||||
|
.media-deck-row {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 240px 1fr;
|
||||||
|
gap: 2.5rem;
|
||||||
|
align-items: start;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.console-field-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.6rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.console-field-label {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #cbd5e1;
|
||||||
|
letter-spacing: 0.03em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Input Form Elements
|
||||||
|
========================================================================== */
|
||||||
|
::deep .console-input,
|
||||||
|
::deep .console-textarea {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #060b13 !important;
|
||||||
|
border: 1px solid #1e293b !important;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0.85rem 1rem;
|
||||||
|
color: #f8fafc !important;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
outline: none;
|
||||||
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .console-input:focus,
|
||||||
|
::deep .console-textarea:focus {
|
||||||
|
border-color: #00f2fe !important;
|
||||||
|
box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.2), 0 0 12px rgba(0, 242, 254, 0.1) !important;
|
||||||
|
background: #02060d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .console-textarea {
|
||||||
|
resize: none;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Image Slots & Cloud Upload Dropzones
|
||||||
|
========================================================================== */
|
||||||
|
::deep .hidden-file-input,
|
||||||
|
.hidden-file-input {
|
||||||
|
position: absolute !important;
|
||||||
|
top: 0 !important;
|
||||||
|
left: 0 !important;
|
||||||
|
width: 0 !important;
|
||||||
|
height: 0 !important;
|
||||||
|
opacity: 0 !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
pointer-events: none !important;
|
||||||
|
display: none !important; /* Forces layout removal */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Book Cover - Enforced Portrait Display Frame Aspect Ratio */
|
||||||
|
.book-cover-dropzone {
|
||||||
|
width: 240px;
|
||||||
|
aspect-ratio: 2 / 3;
|
||||||
|
background: #060b13;
|
||||||
|
border: 1px dashed #1e293b;
|
||||||
|
border-radius: 4px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book-cover-dropzone:hover {
|
||||||
|
border-color: #00f2fe;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropzone-interactive-layer,
|
||||||
|
.thumbnail-slot-node.empty label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
margin: 0;
|
||||||
|
padding: 1rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Thumbnails Grid */
|
||||||
|
.thumbnail-deck-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, 1fr);
|
||||||
|
gap: 1rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail-slot-node {
|
||||||
|
aspect-ratio: 2 / 3; /* Matches portrait layout format smoothly */
|
||||||
|
background: #060b13;
|
||||||
|
border: 1px solid #1e293b;
|
||||||
|
border-radius: 4px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail-slot-node.empty {
|
||||||
|
border: 1px dashed #1e293b;
|
||||||
|
background: #060b13;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail-slot-node.empty:hover {
|
||||||
|
border-color: #00f2fe;
|
||||||
|
background: rgba(0, 242, 254, 0.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail-slot-node img,
|
||||||
|
.dropzone-active-preview img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-slot-blueprint {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
color: #334155;
|
||||||
|
gap: 0.5rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Minimalist Floating Action Micro-Icons
|
||||||
|
========================================================================== */
|
||||||
|
.image-actions-overlay {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: rgba(4, 8, 15, 0.4);
|
||||||
|
backdrop-filter: blur(1px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Show floating control node buttons cleanly on hover state */
|
||||||
|
.book-cover-dropzone:hover .image-actions-overlay,
|
||||||
|
.thumbnail-slot-node:hover .image-actions-overlay {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-micro-action {
|
||||||
|
background: #060b13;
|
||||||
|
border: 1px solid #1e293b;
|
||||||
|
color: #cbd5e1;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-micro-action:hover {
|
||||||
|
border-color: #00f2fe;
|
||||||
|
color: #00f2fe;
|
||||||
|
box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-micro-action.danger:hover {
|
||||||
|
border-color: #ff5722;
|
||||||
|
color: #ff5722;
|
||||||
|
box-shadow: 0 0 8px rgba(255, 87, 34, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Sliding Preview System (Left Panel Drawer)
|
||||||
|
========================================================================== */
|
||||||
|
.book-preview-drawer {
|
||||||
|
width: 0px;
|
||||||
|
height: 100%;
|
||||||
|
background: #04080f;
|
||||||
|
border-right: 0 solid #1e293b;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0;
|
||||||
|
transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book-preview-drawer.is-open {
|
||||||
|
width: 340px;
|
||||||
|
padding: 2rem;
|
||||||
|
border-right: 1px solid #1e293b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-portrait-frame {
|
||||||
|
width: 100%;
|
||||||
|
aspect-ratio: 2 / 3;
|
||||||
|
background: #060b13;
|
||||||
|
border: 1px solid #1e293b;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-portrait-frame img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Floating Close Action Icon sitting directly on top inside the drawer viewport frame */
|
||||||
|
.btn-close-preview-floating {
|
||||||
|
position: absolute;
|
||||||
|
top: 12px;
|
||||||
|
right: 12px;
|
||||||
|
background: rgba(6, 11, 19, 0.85);
|
||||||
|
border: 1px solid #1e293b;
|
||||||
|
color: #64748b;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-close-preview-floating:hover {
|
||||||
|
border-color: #ff5722;
|
||||||
|
color: #ff5722;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Footer Action Dashboard Bar
|
||||||
|
========================================================================= */
|
||||||
|
.form-action-footer {
|
||||||
|
padding: 0.85rem 2.5rem;
|
||||||
|
background: #04080f;
|
||||||
|
border-top: 1px solid #1e293b;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 1.25rem;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-apply-filters {
|
||||||
|
background: rgba(0, 242, 254, 0.05);
|
||||||
|
border: 1px solid #00f2fe;
|
||||||
|
color: #00f2fe;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
padding: 0.55rem 1.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
|
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-apply-filters:hover {
|
||||||
|
background: #00f2fe;
|
||||||
|
color: #060b13;
|
||||||
|
box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
|
||||||
|
}
|
||||||
@@ -1,19 +1,59 @@
|
|||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
@using Blazored.Toast
|
||||||
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
|
|
||||||
<div class="page">
|
<header class="top-bar">
|
||||||
<main>
|
<a href="/" class="brand">
|
||||||
<div class="top-row px-4">
|
<svg class="brand-mark" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg">
|
||||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
<path d="M70,25 C65,18 58,15 50,15 C30,15 15,30 15,50 C15,70 30,85 50,85 C58,85 65,82 70,75 L62,68 C58,72 54,74 50,74 C37,74 27,63 27,50 C27,37 37,26 50,26 C54,26 58,28 62,32 L70,25 Z" fill="#0096c7" />
|
||||||
|
<circle cx="85" cy="50" r="8" fill="#4dabff" opacity="0.9" />
|
||||||
|
<circle cx="75" cy="80" r="5" fill="#4dabff" opacity="0.6" />
|
||||||
|
<circle cx="75" cy="20" r="5" fill="#4dabff" opacity="0.6" />
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<div class="text-column">
|
||||||
|
<span class="brand-main">Lite<span class="brand-accent">Charms</span></span>
|
||||||
|
<span class="payoff-line">Shop Administration & Monitoring</span>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
<article class="content px-4">
|
<TopBarAuthstateView />
|
||||||
@* @Body *@
|
</header>
|
||||||
</article>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="blazor-error-ui" data-nosnippet>
|
<CascadingAuthenticationState>
|
||||||
An unhandled error has occurred.
|
<AuthorizeView>
|
||||||
<a href="." class="reload">Reload</a>
|
<Authorized>
|
||||||
<span class="dismiss">🗙</span>
|
<NavShelf IsOpen="isShelfExpanded" IsOpenChanged="OnShelfStateChanged" @rendermode="InteractiveServer" />
|
||||||
</div>
|
</Authorized>
|
||||||
|
</AuthorizeView>
|
||||||
|
</CascadingAuthenticationState>
|
||||||
|
|
||||||
|
<CascadingAuthenticationState>
|
||||||
|
<div class="page-wrapper @(isShelfExpanded ? "shifted-canvas" : "")">
|
||||||
|
<AuthorizeView>
|
||||||
|
<Authorized>
|
||||||
|
<main class="content-body">
|
||||||
|
@Body
|
||||||
|
</main>
|
||||||
|
</Authorized>
|
||||||
|
<NotAuthorized>
|
||||||
|
<Login />
|
||||||
|
</NotAuthorized>
|
||||||
|
</AuthorizeView>
|
||||||
|
</div>
|
||||||
|
</CascadingAuthenticationState>
|
||||||
|
|
||||||
|
<BlazoredToasts />
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private bool isShelfExpanded { get; set; } = false;
|
||||||
|
|
||||||
|
private void OnShelfStateChanged(bool newState)
|
||||||
|
{
|
||||||
|
isShelfExpanded = newState;
|
||||||
|
|
||||||
|
// This forces Blazor to re-evaluate the DOM, instantly applying
|
||||||
|
// the "shelf-open" and "shifted-canvas" CSS utility classes.
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,98 +1,92 @@
|
|||||||
.page {
|
/* --- Blazored Toast Branded Styling --- */
|
||||||
position: relative;
|
::deep .blazored-toast-container {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
left: 20px;
|
||||||
|
z-index: 9999;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
gap: 12px;
|
||||||
|
width: 350px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .blazored-toast {
|
||||||
|
pointer-events: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
|
background: rgba(11, 17, 20, 0.95);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border: 1px solid rgba(0, 150, 199, 0.3);
|
||||||
|
border-left: 4px solid #0096c7;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px 40px 16px 16px;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
||||||
|
animation: slideInLeft 0.3s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
::deep .blazored-toast-header {
|
||||||
flex: 1;
|
font-weight: 800;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: #0096c7;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
::deep .blazored-toast-message {
|
||||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
font-size: 0.9rem;
|
||||||
|
color: #e0e0e0;
|
||||||
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-row {
|
::deep .blazored-toast-close {
|
||||||
background-color: #f7f7f7;
|
position: absolute;
|
||||||
border-bottom: 1px solid #d6d5d5;
|
top: 12px;
|
||||||
justify-content: flex-end;
|
right: 12px;
|
||||||
height: 3.5rem;
|
cursor: pointer;
|
||||||
display: flex;
|
background: none;
|
||||||
align-items: center;
|
border: none;
|
||||||
|
color: #888;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 1;
|
||||||
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
::deep .blazored-toast-close::before {
|
||||||
white-space: nowrap;
|
content: "×";
|
||||||
margin-left: 1.5rem;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
|
::deep .blazored-toast-close:hover {
|
||||||
text-decoration: underline;
|
color: #ff4d4d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-row ::deep a:first-child {
|
::deep .blazored-toast-progressbar {
|
||||||
overflow: hidden;
|
position: absolute;
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 640.98px) {
|
|
||||||
.top-row {
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 641px) {
|
|
||||||
.page {
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar {
|
|
||||||
width: 250px;
|
|
||||||
height: 100vh;
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row.auth ::deep a:first-child {
|
|
||||||
flex: 1;
|
|
||||||
text-align: right;
|
|
||||||
width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row, article {
|
|
||||||
padding-left: 2rem !important;
|
|
||||||
padding-right: 1.5rem !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#blazor-error-ui {
|
|
||||||
color-scheme: light only;
|
|
||||||
background: lightyellow;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: none;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
height: 3px;
|
||||||
position: fixed;
|
background: rgba(0, 150, 199, 0.5);
|
||||||
width: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#blazor-error-ui .dismiss {
|
@keyframes slideInLeft {
|
||||||
cursor: pointer;
|
from {
|
||||||
position: absolute;
|
transform: translateX(-100%);
|
||||||
right: 0.75rem;
|
opacity: 0;
|
||||||
top: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: translateX(0);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
::deep .blazored-toast-container {
|
||||||
|
width: calc(100% - 40px);
|
||||||
|
left: 20px;
|
||||||
|
bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
@page "/counter"
|
|
||||||
@rendermode InteractiveServer
|
|
||||||
|
|
||||||
<PageTitle>Counter</PageTitle>
|
|
||||||
|
|
||||||
<h1>Counter</h1>
|
|
||||||
|
|
||||||
<p role="status">Current count: @currentCount</p>
|
|
||||||
|
|
||||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
|
||||||
|
|
||||||
@code {
|
|
||||||
private int currentCount = 0;
|
|
||||||
|
|
||||||
private void IncrementCount()
|
|
||||||
{
|
|
||||||
currentCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
@page "/"
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
@page "/login"
|
||||||
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
|
@inject NavigationManager Navigation
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
<div class="auth-workspace-canvas">
|
||||||
|
<div class="tech-background-matrix">
|
||||||
|
<svg class="bg-vector-mesh" viewBox="0 0 800 500" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<pattern id="cyber-grid" width="40" height="40" patternUnits="userSpaceOnUse">
|
||||||
|
<path d="M 40 0 L 0 0 0 40" fill="none" stroke="#102a35" stroke-width="0.75" />
|
||||||
|
<circle cx="40" cy="40" r="1" fill="#173b4a" />
|
||||||
|
</pattern>
|
||||||
|
|
||||||
|
<filter id="core-blue-glow" x="-20%" y="-20%" width="140%" height="140%">
|
||||||
|
<feGaussianBlur stdDeviation="6" result="blur" />
|
||||||
|
<feComposite in="SourceGraphic" in2="blur" operator="over" />
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<rect width="100%" height="100%" fill="url(#cyber-grid)" opacity="0.6" />
|
||||||
|
|
||||||
|
<g class="tech-circuit-left" stroke="#0091ff" stroke-width="1.25" fill="none" opacity="0.35">
|
||||||
|
<path d="M -50,250 L 120,250 L 180,190 L 250,190" />
|
||||||
|
<path d="M 40,100 L 100,160 L 100,340 L 160,400" />
|
||||||
|
<polyline points="220,160 240,190 220,220" />
|
||||||
|
<circle cx="250" cy="190" r="3" fill="#0091ff" />
|
||||||
|
<polygon points="30,200 60,170 90,170 60,200" stroke="#00bfff" stroke-width="1" opacity="0.5" />
|
||||||
|
<polygon points="110,300 130,280 160,280 140,300" stroke="#00bfff" stroke-width="1" opacity="0.3" />
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<g class="tech-circuit-right" stroke="#00bfff" stroke-width="1.25" fill="none" opacity="0.35">
|
||||||
|
<path d="M 850,250 L 680,250 L 620,310 L 550,310" />
|
||||||
|
<path d="M 760,400 L 700,340 L 700,160 L 640,100" />
|
||||||
|
<polyline points="580,340 560,310 580,280" />
|
||||||
|
<circle cx="550" cy="310" r="3" fill="#00bfff" />
|
||||||
|
<polygon points="770,300 740,330 710,330 740,300" stroke="#0091ff" stroke-width="1" opacity="0.5" />
|
||||||
|
<polygon points="690,200 670,220 640,220 660,200" stroke="#0091ff" stroke-width="1" opacity="0.3" />
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<g class="center-target" stroke="#0091ff" fill="none" opacity="0.15">
|
||||||
|
<circle cx="400" cy="250" r="90" stroke-dasharray="8 6" />
|
||||||
|
<circle cx="400" cy="250" r="130" />
|
||||||
|
<line x1="400" y1="80" x2="400" y2="420" stroke-dasharray="4 4" />
|
||||||
|
<line x1="220" y1="250" x2="580" y2="250" stroke-dasharray="4 4" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="login-action-container">
|
||||||
|
<header class="login-header">
|
||||||
|
<span class="security-status-tag">SYSTEM_LOCKOUT_ACTIVE</span>
|
||||||
|
<h1 class="login-title">Console Authentication Required</h1>
|
||||||
|
<p class="login-subtitle">Initialize terminal authorization pipeline to access core application monitors.</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<button class="login-cta-button" @onclick="HandleLogin">
|
||||||
|
<span class="btn-glow-layer"></span>
|
||||||
|
<span class="btn-text-content">INITIALIZE SECURE ACCESS</span>
|
||||||
|
<svg class="btn-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
|
||||||
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
||||||
|
<polyline points="12 5 19 12 12 19"></polyline>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[CascadingParameter]
|
||||||
|
private Task<AuthenticationState>? AuthState { get; set; }
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
if (AuthState is not null)
|
||||||
|
{
|
||||||
|
var state = await AuthState;
|
||||||
|
|
||||||
|
if (state.User.Identity?.IsAuthenticated ?? false)
|
||||||
|
Navigation.NavigateTo("/", replace: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleLogin() => Navigation.NavigateTo("/auth/login", forceLoad: true);
|
||||||
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
/* Login.razor.css */
|
||||||
|
|
||||||
|
.auth-workspace-canvas {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: calc(100vh - var(--header-height, 92px));
|
||||||
|
background-color: #010405; /* Matches your core console background depth */
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BOUNDLESS TECH BACKGROUND ANIMATION & MAPPING */
|
||||||
|
.tech-background-matrix {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
width: 140%;
|
||||||
|
height: 140%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-vector-mesh {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Subtle technological pulse across background circuit networks */
|
||||||
|
.tech-circuit-left, .tech-circuit-right {
|
||||||
|
animation: background-circuit-glow 6s ease-in-out infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tech-circuit-right {
|
||||||
|
animation-delay: 3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* THE CONTAINER PAYLOAD */
|
||||||
|
.login-action-container {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
max-width: 520px;
|
||||||
|
padding: 40px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-header {
|
||||||
|
margin-bottom: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.security-status-tag {
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ffd166; /* Matches your top bar warning lock indicator token */
|
||||||
|
background: rgba(255, 209, 102, 0.07);
|
||||||
|
border: 1px solid rgba(255, 209, 102, 0.25);
|
||||||
|
padding: 4px 10px;
|
||||||
|
border-radius: 2px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-title {
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ffffff;
|
||||||
|
margin: 20px 0 10px 0;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-subtitle {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #8fa3ad;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* THE INVITING LARGE CALL TO ACTION BUTTON */
|
||||||
|
.login-cta-button {
|
||||||
|
position: relative;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 12px;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 320px;
|
||||||
|
height: 54px;
|
||||||
|
background: #0087f5; /* Core premium brand interaction blue */
|
||||||
|
color: #ffffff;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
cursor: pointer;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 135, 245, 0.3);
|
||||||
|
transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-cta-button:hover {
|
||||||
|
background: #0091ff;
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 0 24px rgba(0, 145, 255, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-cta-button:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-arrow-icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
transition: transform 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-cta-button:hover .btn-arrow-icon {
|
||||||
|
transform: translateX(4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* KEYFRAMES */
|
||||||
|
@keyframes background-circuit-glow {
|
||||||
|
0% {
|
||||||
|
opacity: 0.25;
|
||||||
|
filter: drop-shadow(0 0 1px rgba(0, 145, 255, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 0.55;
|
||||||
|
filter: drop-shadow(0 0 6px rgba(0, 191, 255, 0.4));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
@inject NavigationManager NavManager
|
||||||
|
|
||||||
|
<button class="shelf-grip @(IsOpen ? "grip-open" : "")"
|
||||||
|
@onclick="ToggleShelf"
|
||||||
|
aria-label="Toggle Navigation Shelf">
|
||||||
|
<div class="grip-icon">
|
||||||
|
@if (IsOpen)
|
||||||
|
{
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="shelf-backdrop @(IsOpen ? "backdrop-active" : "")" @onclick="CloseShelf"></div>
|
||||||
|
|
||||||
|
<aside class="nav-shelf-panel @(IsOpen ? "shelf-open" : "")">
|
||||||
|
<div class="shelf-header">
|
||||||
|
<h3>Shop Console</h3>
|
||||||
|
<span class="environment-badge">@Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="shelf-navigation">
|
||||||
|
<NavLink class="shelf-link" href="" Match="NavLinkMatch.All" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="9"></rect><rect x="14" y="3" width="7" height="5"></rect><rect x="14" y="12" width="7" height="9"></rect><rect x="3" y="16" width="7" height="5"></rect></svg>
|
||||||
|
<span>Dashboard</span>
|
||||||
|
</NavLink>
|
||||||
|
|
||||||
|
<NavLink class="shelf-link" href="customers" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
|
||||||
|
<span>Customers</span>
|
||||||
|
</NavLink>
|
||||||
|
|
||||||
|
<NavLink class="shelf-link" href="orders" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>
|
||||||
|
<span>Orders</span>
|
||||||
|
</NavLink>
|
||||||
|
|
||||||
|
<NavLink class="shelf-link" href="leads" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
|
||||||
|
<span>Leads</span>
|
||||||
|
</NavLink>
|
||||||
|
|
||||||
|
<NavLink class="shelf-link" href="products" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line></svg>
|
||||||
|
<span>Products</span>
|
||||||
|
</NavLink>
|
||||||
|
|
||||||
|
<NavLink class="shelf-link" href="notifications" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon icon-warn" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
|
||||||
|
<span>Notifications</span>
|
||||||
|
</NavLink>
|
||||||
|
|
||||||
|
<div class="shelf-divider"></div>
|
||||||
|
|
||||||
|
<NavLink class="shelf-link" href="@ProfileUrl" target="_blank" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
|
</svg>
|
||||||
|
<span>Profile</span>
|
||||||
|
</NavLink>
|
||||||
|
|
||||||
|
<NavLink class="shelf-link" href="auth/logout" ForceLoad="true" @onclick="CloseShelf">
|
||||||
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
||||||
|
<polyline points="16 17 21 12 16 7"></polyline>
|
||||||
|
<line x1="21" y1="12" x2="9" y2="12"></line>
|
||||||
|
</svg>
|
||||||
|
<span>Logout</span>
|
||||||
|
</NavLink>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public bool IsOpen { get; set; } = false;
|
||||||
|
[Parameter] public EventCallback<bool> IsOpenChanged { get; set; }
|
||||||
|
|
||||||
|
[Inject] private IConfiguration? Configuration { get; set; }
|
||||||
|
|
||||||
|
private string? ProfileUrl { get; set; }
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
if (Configuration is null) return;
|
||||||
|
|
||||||
|
var authority = Configuration["IdKongisa:Authority"];
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(authority))
|
||||||
|
{
|
||||||
|
var uri = new Uri(authority);
|
||||||
|
|
||||||
|
ProfileUrl = $"{uri.Scheme}://{uri.Host}/if/user/#/settings";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ToggleShelf()
|
||||||
|
{
|
||||||
|
IsOpen = !IsOpen;
|
||||||
|
await IsOpenChanged.InvokeAsync(IsOpen);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task CloseShelf()
|
||||||
|
{
|
||||||
|
if (IsOpen)
|
||||||
|
{
|
||||||
|
IsOpen = false;
|
||||||
|
await IsOpenChanged.InvokeAsync(IsOpen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
/* --- 1. The Flyout Side Panel --- */
|
||||||
|
.nav-shelf-panel {
|
||||||
|
position: fixed;
|
||||||
|
top: var(--header-height);
|
||||||
|
right: -300px;
|
||||||
|
width: 300px;
|
||||||
|
height: calc(100vh - var(--header-height));
|
||||||
|
background-color: var(--shelf-bg);
|
||||||
|
border-left: 1px solid rgba(144, 224, 239, 0.15);
|
||||||
|
z-index: 2000;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
/* MODIFIED: Reduce padding-bottom so items don't clip raw against the bottom line window frame */
|
||||||
|
padding: 2rem 1.5rem 1rem 1.5rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
|
box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-shelf-panel.shelf-open {
|
||||||
|
right: 0; /* Animate into viewport */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- 2. The Floating Mechanical Grip Handle --- */
|
||||||
|
.shelf-grip {
|
||||||
|
position: fixed;
|
||||||
|
top: calc(var(--header-height) + 24px);
|
||||||
|
right: 0;
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
background-color: var(--shelf-bg);
|
||||||
|
border: 1px solid var(--border-mid-opacity);
|
||||||
|
border-right: none;
|
||||||
|
border-radius: 8px 0 0 8px;
|
||||||
|
color: var(--payoff-color);
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 2001;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Moves out dynamically alongside the shelf edge when open */
|
||||||
|
.shelf-grip.grip-open {
|
||||||
|
right: 300px;
|
||||||
|
background-color: var(--shelf-bg);
|
||||||
|
border-color: var(--border-low-opacity);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shelf-grip:hover {
|
||||||
|
background-color: #112930;
|
||||||
|
color: var(--text-white);
|
||||||
|
}
|
||||||
|
|
||||||
|
.grip-icon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- 3. Panel Internal Layout & Links --- */
|
||||||
|
.shelf-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
border-bottom: 1px solid rgba(144, 224, 239, 0.1);
|
||||||
|
flex-shrink: 0; /* CRITICAL: Prevents the header text from squishing up on small screens */
|
||||||
|
}
|
||||||
|
|
||||||
|
.shelf-header h3 {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-white);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.environment-badge {
|
||||||
|
font-size: 0.65rem;
|
||||||
|
font-family: monospace;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 2px 6px;
|
||||||
|
background: rgba(0, 150, 199, 0.15);
|
||||||
|
border: 1px solid rgba(0, 150, 199, 0.4);
|
||||||
|
color: var(--payoff-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shelf-navigation {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
/* NEW RULES: Absorb all available viewport height and isolate scrolling bounds */
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
/* Optional: Adds smooth mobile elastic touch responses on iOS devices */
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
/* Clean up spacing so bottom-most links have breathing room when fully scrolled down */
|
||||||
|
padding-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Deep selection matching Blazor's active class matching system */
|
||||||
|
::deep .shelf-link {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 14px;
|
||||||
|
color: rgba(255, 255, 255, 0.65);
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 12px 16px;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 500;
|
||||||
|
border-radius: 6px;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .shelf-link:hover {
|
||||||
|
background-color: rgba(0, 150, 199, 0.08);
|
||||||
|
color: var(--text-white);
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .shelf-link.active {
|
||||||
|
background-color: var(--brand-blue);
|
||||||
|
color: var(--text-white);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-warn {
|
||||||
|
color: var(--payoff-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.shelf-divider {
|
||||||
|
height: 1px;
|
||||||
|
background: rgba(144, 224, 239, 0.1);
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- 4. Content Blur/Backdrop Overlay --- */
|
||||||
|
.shelf-backdrop {
|
||||||
|
position: fixed;
|
||||||
|
top: var(--header-height);
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: calc(100vh - var(--header-height));
|
||||||
|
background-color: rgba(0, 0, 0, 0.25);
|
||||||
|
backdrop-filter: blur(0px);
|
||||||
|
z-index: 1999;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shelf-backdrop.backdrop-active {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
pointer-events: auto;
|
||||||
|
backdrop-filter: blur(3px);
|
||||||
|
}
|
||||||
@@ -1,5 +1,40 @@
|
|||||||
@page "/not-found"
|
@page "/404"
|
||||||
@layout MainLayout
|
@page "/not-found"
|
||||||
|
|
||||||
<h3>Not Found</h3>
|
<div class="error-container">
|
||||||
<p>Sorry, the content you are looking for does not exist</p>
|
<div class="error-visual">
|
||||||
|
<svg viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg" class="tech-svg">
|
||||||
|
<line x1="20" y1="100" x2="180" y2="100" stroke="rgba(144, 224, 239, 0.08)" stroke-width="2" stroke-dasharray="4 4" />
|
||||||
|
<line x1="100" y1="20" x2="100" y2="180" stroke="rgba(144, 224, 239, 0.08)" stroke-width="2" stroke-dasharray="4 4" />
|
||||||
|
|
||||||
|
<circle cx="100" cy="100" r="70" stroke="var(--brand-blue)" stroke-width="1.5" stroke-dasharray="5 10" opacity="0.4" />
|
||||||
|
<circle cx="100" cy="100" r="50" stroke="var(--payoff-color)" stroke-width="1" opacity="0.15" />
|
||||||
|
|
||||||
|
<path d="M65,65 L135,135" stroke="var(--brand-blue)" stroke-width="2" stroke-linecap="round" opacity="0.3" />
|
||||||
|
<path d="M135,65 L65,135" stroke="rgba(144, 224, 239, 0.2)" stroke-width="1.5" stroke-linecap="round" />
|
||||||
|
|
||||||
|
<circle cx="100" cy="100" r="14" fill="var(--bar-bg)" stroke="var(--brand-blue)" stroke-width="3" />
|
||||||
|
<circle cx="100" cy="100" r="4" fill="#4dabff" />
|
||||||
|
|
||||||
|
<circle cx="65" cy="65" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||||
|
<circle cx="135" cy="65" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||||
|
<circle cx="135" cy="135" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||||
|
<circle cx="65" cy="135" r="6" fill="var(--bar-bg)" stroke="var(--payoff-color)" stroke-width="2" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="error-meta">
|
||||||
|
<h1 class="error-code">404</h1>
|
||||||
|
<h2 class="error-title">Resource Location Failure</h2>
|
||||||
|
<p class="error-desc">
|
||||||
|
The operational route, package schema, or data record you are querying cannot be resolved within this cluster context.
|
||||||
|
</p>
|
||||||
|
<a href="/" class="btn-return">
|
||||||
|
<svg class="icon-left" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<line x1="19" y1="12" x2="5" y2="12"></line>
|
||||||
|
<polyline points="12 19 5 12 12 5"></polyline>
|
||||||
|
</svg>
|
||||||
|
Return to Core Dashboard
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
.error-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
padding: 2rem;
|
||||||
|
max-width: 520px;
|
||||||
|
width: 100%;
|
||||||
|
margin: auto; /* Works alongside layout flex to keep perfectly centered */
|
||||||
|
animation: fadeIn 0.4s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Technical SVG Frame Handling */
|
||||||
|
.error-visual {
|
||||||
|
width: 160px;
|
||||||
|
height: 160px;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tech-svg {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
filter: drop-shadow(0 0 25px rgba(0, 150, 199, 0.25));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Typography Hierarchy */
|
||||||
|
.error-code {
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-size: 3.5rem;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 1;
|
||||||
|
color: var(--brand-blue);
|
||||||
|
letter-spacing: -1px;
|
||||||
|
margin: 0 0 0.5rem 0;
|
||||||
|
text-shadow: 0 0 20px rgba(0, 150, 199, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-title {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-white);
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
letter-spacing: -0.2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-desc {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: var(--payoff-color);
|
||||||
|
opacity: 0.75;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Control Actions styled precisely to match your existing brand colors */
|
||||||
|
.btn-return {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
background-color: rgba(0, 150, 199, 0.08);
|
||||||
|
color: var(--text-white);
|
||||||
|
border: 1px solid rgba(0, 150, 199, 0.4);
|
||||||
|
padding: 12px 28px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-return:hover {
|
||||||
|
background-color: var(--brand-blue);
|
||||||
|
border-color: var(--hover-blue);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 150, 199, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-left {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
transition: transform 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-return:hover .icon-left {
|
||||||
|
transform: translateX(-3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
@page "/notifications"
|
||||||
|
@using Blazored.Toast
|
||||||
|
@using Microsoft.AspNetCore.Components.QuickGrid
|
||||||
|
@rendermode RenderMode.InteractiveServer
|
||||||
|
|
||||||
|
<PageTitle>Notifications | Shop Console</PageTitle>
|
||||||
|
|
||||||
|
<div class="workspace-ambient-backdrop"></div>
|
||||||
|
|
||||||
|
@if (NotificationQueryable == null && IsLoading)
|
||||||
|
{
|
||||||
|
<div class="initial-page-fullscreen-loader">
|
||||||
|
<div class="loader-content">
|
||||||
|
<span class="spinner"></span>
|
||||||
|
<p>Initializing Operational Console registers...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="console-workspace">
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<div>
|
||||||
|
<h2>System Logs & Notifications</h2>
|
||||||
|
<p class="text-muted">Inbound and outbound communication engine event log tracking.</p>
|
||||||
|
</div>
|
||||||
|
<button class="btn-refresh" @onclick="HandleRefreshClickAsync" disabled="@IsLoading">
|
||||||
|
<svg class="refresh-icon @(IsLoading ? "spinning" : "")" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M21.5 2v6h-6M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.67" />
|
||||||
|
</svg>
|
||||||
|
Sync Console
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dashboard-control-deck">
|
||||||
|
|
||||||
|
<div class="top-row-panels">
|
||||||
|
<div class="mini-table-card shadow-card">
|
||||||
|
<span class="panel-title-lbl">Operational Inventory</span>
|
||||||
|
<table class="dashboard-mini-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Metric Item</th>
|
||||||
|
<th>Telemetry Node</th>
|
||||||
|
<th style="text-align: right;">Register</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Total Inbound Volume</td>
|
||||||
|
<td class="node-dim">Core-System</td>
|
||||||
|
<td class="text-cyan text-mono">@TotalCount</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Operational Failures</td>
|
||||||
|
<td class="node-dim">Fault-Engine</td>
|
||||||
|
<td class="text-red text-mono">@ErrorCount</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Pending Dispatches</td>
|
||||||
|
<td class="node-dim">Queue-Worker</td>
|
||||||
|
<td class="text-yellow text-mono">@PendingCount</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="radial-gauge-card shadow-card">
|
||||||
|
<span class="panel-title-lbl">Health Efficiency</span>
|
||||||
|
<div class="gauge-presentation-box">
|
||||||
|
<div class="svg-gauge-container">
|
||||||
|
<svg class="gauge-ring-matrix" viewBox="0 0 36 36">
|
||||||
|
<path class="gauge-bg-track" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" />
|
||||||
|
<path class="gauge-active-fill text-purple" stroke-dasharray="@SuccessRate, 100" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" />
|
||||||
|
</svg>
|
||||||
|
<div class="gauge-center-text text-purple">@SuccessRate%</div>
|
||||||
|
</div>
|
||||||
|
<div class="svg-gauge-container">
|
||||||
|
<svg class="gauge-ring-matrix" viewBox="0 0 36 36">
|
||||||
|
<path class="gauge-bg-track" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" />
|
||||||
|
<path class="gauge-active-fill text-cyan" stroke-dasharray="@(TotalCount > 0 ? Math.Round(((double)PendingCount / TotalCount) * 100) : 0), 100" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" />
|
||||||
|
</svg>
|
||||||
|
<div class="gauge-center-text text-cyan">@((TotalCount > 0) ? Math.Round(((double)PendingCount / TotalCount) * 100) : 0)%</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="filter-panel shadow-card">
|
||||||
|
<span class="panel-title-lbl" style="margin-bottom:1.25rem; display:block;">Telemetry Filters</span>
|
||||||
|
|
||||||
|
<div class="filter-grid-form">
|
||||||
|
<div class="input-wrapper full-width">
|
||||||
|
<label>Search Text</label>
|
||||||
|
<input type="text" placeholder="Search subject, sender or recipient..." @bind-value="SearchFilter" @bind-value:event="oninput" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-wrapper">
|
||||||
|
<label>From Date</label>
|
||||||
|
<div class="themed-date-picker-box">
|
||||||
|
<input type="date" @bind="FromDate" @bind:after="LoadNotificationDataAsync" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-wrapper">
|
||||||
|
<label>To Date</label>
|
||||||
|
<div class="themed-date-picker-box">
|
||||||
|
<input type="date" @bind="ToDate" @bind:after="LoadNotificationDataAsync" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-wrapper">
|
||||||
|
<label>Max Records</label>
|
||||||
|
<div class="themed-dropdown-box">
|
||||||
|
<select @bind="MaxRecords">
|
||||||
|
<option value="50">50 rows</option>
|
||||||
|
<option value="100">100 rows</option>
|
||||||
|
<option value="500">500 rows</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-wrapper action-wrapper">
|
||||||
|
<button class="btn-apply-filters" @onclick="HandleRefreshClickAsync" disabled="@IsLoading">Apply</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="trend-spline-card shadow-card full-width-row">
|
||||||
|
<span class="panel-title-lbl">Operational Load Density Timeline</span>
|
||||||
|
<div class="vector-chart-viewport">
|
||||||
|
<svg class="area-spline-graph" viewBox="0 0 500 100" preserveAspectRatio="none">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="purpleGlow" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0%" stop-color="#bd00ff" stop-opacity="0.25" />
|
||||||
|
<stop offset="100%" stop-color="#bd00ff" stop-opacity="0.0" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<path class="area-fill-path" d="M 0 90 Q 50 85, 100 60 T 200 45 T 300 80 T 400 30 T 500 15 L 500 100 L 0 100 Z" fill="url(#purpleGlow)" />
|
||||||
|
<path class="line-stroke-path" d="M 0 90 Q 50 85, 100 60 T 200 45 T 300 80 T 400 30 T 500 15" fill="none" stroke="#bd00ff" stroke-width="2" />
|
||||||
|
</svg>
|
||||||
|
<div class="chart-axis-labels">
|
||||||
|
<span>04/17</span>
|
||||||
|
<span>04/24</span>
|
||||||
|
<span>05/01</span>
|
||||||
|
<span>05/08</span>
|
||||||
|
<span>05/17</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (NotificationQueryable == null && IsLoading)
|
||||||
|
{
|
||||||
|
<div class="grid-inline-loading-veil">
|
||||||
|
<div class="veil-content">
|
||||||
|
<div class="console-sync-loader">
|
||||||
|
<div class="inner-ring"></div>
|
||||||
|
<div class="outer-ring"></div>
|
||||||
|
</div>
|
||||||
|
<p class="sync-text">Syncing system log registers...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="grid-card-wrapper full-width-table relative-grid-container">
|
||||||
|
|
||||||
|
@if (IsLoading)
|
||||||
|
{
|
||||||
|
<div class="grid-inline-loading-veil">
|
||||||
|
<div class="veil-content">
|
||||||
|
<span class="spinner"></span>
|
||||||
|
<p>Syncing system log registers...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<QuickGrid Items="@NotificationQueryable" Pagination="@Pagination" RowClass="@GetRowClass">
|
||||||
|
|
||||||
|
<TemplateColumn Title="Origin" SortBy="@SortByOrigin" Sortable="true">
|
||||||
|
<div class="origin-composite">
|
||||||
|
<span class="platform-lbl">@context.Platform</span>
|
||||||
|
<span class="direction-lbl text-muted">@context.Direction</span>
|
||||||
|
</div>
|
||||||
|
</TemplateColumn>
|
||||||
|
|
||||||
|
<TemplateColumn Title="Priority" SortBy="@SortByPriority" Sortable="true">
|
||||||
|
<span class="priority-tag @context.Priority.ToString().ToLower()">
|
||||||
|
@context.Priority
|
||||||
|
</span>
|
||||||
|
</TemplateColumn>
|
||||||
|
|
||||||
|
<PropertyColumn Property="@(n => n.CreatedAt)" Title="Created At" Format="yyyy-MM-dd HH:mm" Sortable="true" />
|
||||||
|
|
||||||
|
<TemplateColumn Title="Sender" SortBy="@SortBySender" Sortable="true">
|
||||||
|
<div class="contact-composite" title="@context.SenderAddress">
|
||||||
|
<span class="contact-name">@(string.IsNullOrWhiteSpace(context.SenderName) ? "System Core" : context.SenderName)</span>
|
||||||
|
<span class="contact-email text-muted">@context.SenderAddress</span>
|
||||||
|
</div>
|
||||||
|
</TemplateColumn>
|
||||||
|
|
||||||
|
<TemplateColumn Title="Subject" SortBy="@SortBySubject" Sortable="true">
|
||||||
|
<div class="subject-cell">
|
||||||
|
<span class="subject-text" title="@context.Subject">@context.Subject</span>
|
||||||
|
@if (!string.IsNullOrWhiteSpace(context.Message))
|
||||||
|
{
|
||||||
|
<span class="message-subtext text-muted" title="@context.Message">@context.Message</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</TemplateColumn>
|
||||||
|
|
||||||
|
<TemplateColumn Title="Recipient" SortBy="@SortByRecipient" Sortable="true">
|
||||||
|
<div class="contact-composite" title="@context.RecipientAddress">
|
||||||
|
<span class="contact-name">@context.RecipientName</span>
|
||||||
|
<span class="contact-email text-muted">@context.RecipientAddress</span>
|
||||||
|
</div>
|
||||||
|
</TemplateColumn>
|
||||||
|
|
||||||
|
<TemplateColumn Title="Status" SortBy="@SortByStatus" Sortable="true" Align="Align.Center">
|
||||||
|
@if (context.HasError)
|
||||||
|
{
|
||||||
|
<span class="status-indicator alert-text">✕ Error</span>
|
||||||
|
}
|
||||||
|
else if (context.Processed)
|
||||||
|
{
|
||||||
|
<span class="status-indicator success-text">✓ Processed</span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<span class="status-indicator idle-text">⚙ Pending</span>
|
||||||
|
}
|
||||||
|
</TemplateColumn>
|
||||||
|
|
||||||
|
<TemplateColumn Align="Align.Right">
|
||||||
|
@if (context.HasError)
|
||||||
|
{
|
||||||
|
<button class="grid-retry-btn" @onclick="() => HandleRetryRowAsync(context)">
|
||||||
|
Retry
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@((MarkupString)" ")
|
||||||
|
}
|
||||||
|
</TemplateColumn>
|
||||||
|
|
||||||
|
</QuickGrid>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid-paginator-wrapper">
|
||||||
|
<Paginator State="@Pagination" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<BlazoredToasts />
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
using LiteCharms.Features.Models;
|
||||||
|
using LiteCharms.Features.Shop.Notifications;
|
||||||
|
using LiteCharms.Features.Shop.Notifications.Models;
|
||||||
|
|
||||||
|
namespace ShopAdmin.Components.Pages;
|
||||||
|
|
||||||
|
public partial class Notifications(NotificationService notificationService, IToastService ToastService)
|
||||||
|
{
|
||||||
|
protected IQueryable<Notification> NotificationQueryable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var query = NotificationItems.AsQueryable();
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(SearchFilter))
|
||||||
|
{
|
||||||
|
query = query.Where(n =>
|
||||||
|
(n.Subject != null && n.Subject.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase)) ||
|
||||||
|
(n.SenderAddress != null && n.SenderAddress.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase)) ||
|
||||||
|
(n.RecipientAddress != null && n.RecipientAddress.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<Notification> NotificationItems { get; set; } = [];
|
||||||
|
|
||||||
|
protected PaginationState Pagination { get; set; } = new() { ItemsPerPage = 10 };
|
||||||
|
|
||||||
|
protected bool IsLoading { get; set; } = true;
|
||||||
|
|
||||||
|
protected string SearchFilter { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
protected int MaxRecords { get; set; } = 100;
|
||||||
|
|
||||||
|
protected DateTime FromDate { get; set; } = DateTime.Today.AddDays(-30);
|
||||||
|
|
||||||
|
protected DateTime ToDate { get; set; } = DateTime.Today.AddDays(1);
|
||||||
|
|
||||||
|
protected string FromDateBind
|
||||||
|
{
|
||||||
|
get => FromDate.ToString("yyyy-MM-dd");
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (DateTime.TryParse(value, out var parsedDate))
|
||||||
|
{
|
||||||
|
FromDate = parsedDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected string ToDateBind
|
||||||
|
{
|
||||||
|
get => ToDate.ToString("yyyy-MM-dd");
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (DateTime.TryParse(value, out var parsedDate))
|
||||||
|
{
|
||||||
|
ToDate = parsedDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int TotalCount => NotificationItems.Count;
|
||||||
|
|
||||||
|
protected int ErrorCount => NotificationItems.Count(n => n.HasError);
|
||||||
|
|
||||||
|
protected int PendingCount => NotificationItems.Count(n => !n.Processed && !n.HasError);
|
||||||
|
|
||||||
|
protected double SuccessRate => TotalCount > 0
|
||||||
|
? Math.Round(((double)(TotalCount - ErrorCount) / TotalCount) * 100, 1)
|
||||||
|
: 100.0;
|
||||||
|
|
||||||
|
protected GridSort<Notification> SortByOrigin => GridSort<Notification>.ByAscending(n => n.Platform);
|
||||||
|
protected GridSort<Notification> SortByPriority => GridSort<Notification>.ByDescending(n => n.Priority);
|
||||||
|
protected GridSort<Notification> SortByCreatedAt => GridSort<Notification>.ByDescending(n => n.CreatedAt);
|
||||||
|
protected GridSort<Notification> SortBySender => GridSort<Notification>.ByAscending(n => n.SenderAddress);
|
||||||
|
protected GridSort<Notification> SortBySubject => GridSort<Notification>.ByAscending(n => n.Subject);
|
||||||
|
protected GridSort<Notification> SortByRecipient => GridSort<Notification>.ByAscending(n => n.RecipientAddress);
|
||||||
|
protected GridSort<Notification> SortByStatus => GridSort<Notification>.ByAscending(n => n.HasError);
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync() => await LoadNotificationDataAsync();
|
||||||
|
|
||||||
|
protected async Task HandleRefreshClickAsync()
|
||||||
|
{
|
||||||
|
await LoadNotificationDataAsync();
|
||||||
|
|
||||||
|
ToastService.ShowInfo("Console metrics and telemetry logs refreshed.");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task LoadNotificationDataAsync()
|
||||||
|
{
|
||||||
|
IsLoading = true;
|
||||||
|
|
||||||
|
var dateRange = new DateRange()
|
||||||
|
{
|
||||||
|
From = DateOnly.FromDateTime(FromDate),
|
||||||
|
To = DateOnly.FromDateTime(ToDate),
|
||||||
|
MaxRecords = MaxRecords
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = await notificationService.GetNotificationsAsync(dateRange);
|
||||||
|
|
||||||
|
if (result.IsSuccess) NotificationItems = [.. result.Value];
|
||||||
|
|
||||||
|
if (result.IsFailed)
|
||||||
|
{
|
||||||
|
var errorMsg = result.Errors.FirstOrDefault()?.Message ?? "Unable to load telemetry log data.";
|
||||||
|
|
||||||
|
ToastService.ShowError(errorMsg);
|
||||||
|
|
||||||
|
NotificationItems = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
IsLoading = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected string GetRowClass(Notification item)
|
||||||
|
{
|
||||||
|
var errorStatus = item.HasError ? "row-has-error" : "row-success";
|
||||||
|
var priorityStatus = $"row-priority-{item.Priority.ToString().ToLower()}";
|
||||||
|
|
||||||
|
return $"{errorStatus} {priorityStatus}";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async Task HandleRetryRowAsync(Notification item)
|
||||||
|
{
|
||||||
|
var updateRequest = new UpdateNotification
|
||||||
|
{
|
||||||
|
NotificationId = item.Id,
|
||||||
|
Processed = false,
|
||||||
|
HasError = false,
|
||||||
|
Errors = null
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = await notificationService.UpdateNotificationAsync(updateRequest);
|
||||||
|
|
||||||
|
await LoadNotificationDataAsync();
|
||||||
|
|
||||||
|
if (result.IsSuccess) ToastService.ShowSuccess($"{item.Subject}, has been marked for reprocessing.");
|
||||||
|
if (result.IsFailed) ToastService.ShowError("Failed to update notification state execution.");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,726 @@
|
|||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
1. WORKSPACE LAYOUT & LAYOUT ENGINE BOUNDS
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.console-workspace {
|
||||||
|
max-width: 1240px !important;
|
||||||
|
width: 100% !important;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 2rem 1.5rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-control-deck {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.dashboard-control-deck {
|
||||||
|
/* Splitting into explicit proportional grid columns */
|
||||||
|
grid-template-columns: 1.6fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Force the timeline block to span both columns underneath them */
|
||||||
|
.full-width-row {
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.charts-and-gauges-block {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-row-panels {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Shared structural foundation for dashboard panels */
|
||||||
|
.mini-table-card,
|
||||||
|
.radial-gauge-card,
|
||||||
|
.trend-spline-card,
|
||||||
|
.filter-panel {
|
||||||
|
padding: 1.25rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
2. TELEMETRY FILTERS PANEL & INPUT FORM STRUCTURES
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.filter-panel {
|
||||||
|
height: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
/* Fixed selector to accurately target nested wrapper structure input elements */
|
||||||
|
input[type="text"],
|
||||||
|
.input-wrapper input {
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
padding: 10px 12px !important;
|
||||||
|
background: rgba(0, 0, 0, 0.4) !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.05) !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border-radius: 6px !important;
|
||||||
|
font-size: 0.85rem !important;
|
||||||
|
outline: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus,
|
||||||
|
.input-wrapper input:focus {
|
||||||
|
border-color: #ff6b35 !important;
|
||||||
|
box-shadow: 0 0 10px rgba(255, 107, 53, 0.25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-grid-form {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 1rem;
|
||||||
|
align-content: start; /* Prevents vertical item stretching */
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-apply-filters {
|
||||||
|
background: #ff6b35;
|
||||||
|
border: none;
|
||||||
|
color: #fff;
|
||||||
|
width: 100%; /* Stretches nicely on small screens, or adjust to max-content if preferred */
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.2s ease;
|
||||||
|
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background: #ff8552;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.themed-dropdown-box,
|
||||||
|
.themed-date-picker-box {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
select, input[type="date"] {
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
padding: 9px 12px !important;
|
||||||
|
background: rgba(28, 32, 43, 0.85) !important;
|
||||||
|
border: 1px solid rgba(255, 107, 53, 0.15) !important;
|
||||||
|
color: #e2e8f0 !important;
|
||||||
|
border-radius: 6px !important;
|
||||||
|
font-size: 0.85rem !important;
|
||||||
|
outline: none;
|
||||||
|
appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: #ff6b35 !important;
|
||||||
|
box-shadow: 0 0 10px rgba(255, 107, 53, 0.25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.themed-date-picker-box input[type="date"]::-webkit-calendar-picker-indicator {
|
||||||
|
filter: invert(53%) sepia(86%) saturate(1637%) hue-rotate(345deg) brightness(101%) contrast(101%);
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
|
||||||
|
.themed-dropdown-box {
|
||||||
|
select option {
|
||||||
|
background-color: #141821 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
padding: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "▼";
|
||||||
|
font-size: 0.65rem;
|
||||||
|
color: #ff6b35;
|
||||||
|
position: absolute;
|
||||||
|
right: 14px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-wrapper {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-apply-filters {
|
||||||
|
background: #ff6b35;
|
||||||
|
border: none;
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.2s ease;
|
||||||
|
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background: #ff8552;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
3. INTERNAL MICRO-TABLE COMPONENTS (OPERATIONAL INVENTORY)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.dashboard-mini-table {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 0.75rem;
|
||||||
|
border-collapse: collapse;
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: rgba(255, 255, 255, 0.3);
|
||||||
|
padding: 6px 0;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 10px 0;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
4. DATA VISUALIZATION COMPONENTS (GAUGES & TIMELINES)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.gauge-presentation-box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg-gauge-container {
|
||||||
|
position: relative;
|
||||||
|
width: 75px;
|
||||||
|
height: 75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gauge-ring-matrix {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gauge-bg-track {
|
||||||
|
fill: none;
|
||||||
|
stroke: rgba(255, 255, 255, 0.04);
|
||||||
|
stroke-width: 2.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gauge-active-fill {
|
||||||
|
fill: none;
|
||||||
|
stroke-width: 3.2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
transition: stroke-dasharray 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gauge-center-text {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-family: monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vector-chart-viewport {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 1rem;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.area-spline-graph {
|
||||||
|
width: 100%;
|
||||||
|
height: 85px;
|
||||||
|
display: block;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-axis-labels {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 0.68rem;
|
||||||
|
font-family: monospace;
|
||||||
|
color: rgba(255, 255, 255, 0.25);
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
5. BLAZOR QUICKGRID COMPLEX ENHANCEMENTS (SCOPED FIX)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.full-width-table {
|
||||||
|
width: 100% !important;
|
||||||
|
overflow-x: auto;
|
||||||
|
margin-top: 1rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: rgba(13, 16, 23, 0.65);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.03);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- QuickGrid Empty Body Row Elimination (Header Safe) --- */
|
||||||
|
.full-width-table ::deep tbody tr:has(td:empty) {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forces the table structure to hug only active data rows */
|
||||||
|
.full-width-table ::deep tbody {
|
||||||
|
display: table-row-group !important;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Properly combining parent scope with deep combinator to force child table styles */
|
||||||
|
.full-width-table ::deep table {
|
||||||
|
width: 100% !important;
|
||||||
|
table-layout: fixed !important; /* Forces layout engine to honor assigned column percentages */
|
||||||
|
border-collapse: collapse !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- High Contrast Header Component Overrides --- */
|
||||||
|
.full-width-table ::deep th {
|
||||||
|
background: #141821 !important; /* Solid contrast block background */
|
||||||
|
padding: 14px 10px !important;
|
||||||
|
border-bottom: 2px solid #ff6b35 !important; /* Solid brand accent line */
|
||||||
|
vertical-align: middle !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Target QuickGrid's native internal header sorting buttons & plain titles */
|
||||||
|
.full-width-table ::deep th button,
|
||||||
|
.full-width-table ::deep th .col-title {
|
||||||
|
color: #ff6b35 !important; /* Vibrant orange contrast text */
|
||||||
|
font-weight: 700 !important;
|
||||||
|
font-size: 0.75rem !important; /* Slightly optimized down for layout safety */
|
||||||
|
text-transform: uppercase !important;
|
||||||
|
letter-spacing: 1px !important;
|
||||||
|
background: transparent !important;
|
||||||
|
border: none !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-width-table ::deep th button:hover {
|
||||||
|
color: #ffffff !important; /* Highlight on hover interaction */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Explicit Column Width Definitions (Optimized for Date Visibility) --- */
|
||||||
|
/* Origin */
|
||||||
|
.full-width-table ::deep th:nth-child(1), .full-width-table ::deep td:nth-child(1) {
|
||||||
|
width: 9%;
|
||||||
|
min-width: 85px;
|
||||||
|
}
|
||||||
|
/* Priority */
|
||||||
|
.full-width-table ::deep th:nth-child(2), .full-width-table ::deep td:nth-child(2) {
|
||||||
|
width: 8%;
|
||||||
|
min-width: 75px;
|
||||||
|
}
|
||||||
|
/* Created At (Given extra breathing space) */
|
||||||
|
.full-width-table ::deep th:nth-child(3), .full-width-table ::deep td:nth-child(3) {
|
||||||
|
width: 16%;
|
||||||
|
min-width: 145px;
|
||||||
|
}
|
||||||
|
/* Sender */
|
||||||
|
.full-width-table ::deep th:nth-child(4), .full-width-table ::deep td:nth-child(4) {
|
||||||
|
width: 20%;
|
||||||
|
min-width: 190px;
|
||||||
|
}
|
||||||
|
/* Subject / Description */
|
||||||
|
.full-width-table ::deep th:nth-child(5), .full-width-table ::deep td:nth-child(5) {
|
||||||
|
width: 22%;
|
||||||
|
min-width: 200px;
|
||||||
|
}
|
||||||
|
/* Recipient */
|
||||||
|
.full-width-table ::deep th:nth-child(6), .full-width-table ::deep td:nth-child(6) {
|
||||||
|
width: 15%;
|
||||||
|
min-width: 150px;
|
||||||
|
}
|
||||||
|
/* Status */
|
||||||
|
.full-width-table ::deep th:nth-child(7), .full-width-table ::deep td:nth-child(7) {
|
||||||
|
width: 10%;
|
||||||
|
min-width: 90px;
|
||||||
|
}
|
||||||
|
/* Action */
|
||||||
|
.full-width-table ::deep th:nth-child(8), .full-width-table ::deep td:nth-child(8) {
|
||||||
|
width: 5%;
|
||||||
|
min-width: 65px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Body Cells Engine & Text Preservation --- */
|
||||||
|
.full-width-table ::deep td {
|
||||||
|
padding: 12px 10px !important; /* Tighter padding values to maximize text viewport bounds */
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
|
||||||
|
vertical-align: middle !important;
|
||||||
|
font-size: 0.78rem !important; /* Dropped size down slightly from 0.85rem to fix clipping */
|
||||||
|
overflow: hidden !important;
|
||||||
|
text-overflow: ellipsis !important;
|
||||||
|
white-space: nowrap !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-width-table ::deep tr:hover td {
|
||||||
|
background: rgba(255, 255, 255, 0.02) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
6. ATOMIC INTERACTION & GLOBAL STATUS DESIGN
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shadow-card {
|
||||||
|
background: rgba(13, 16, 23, 0.65) !important;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.03) !important;
|
||||||
|
box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-refresh {
|
||||||
|
background: rgba(255, 107, 53, 0.06);
|
||||||
|
border: 1px solid rgba(255, 107, 53, 0.25);
|
||||||
|
color: #ff6b35;
|
||||||
|
padding: 10px 18px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background: rgba(255, 107, 53, 0.12);
|
||||||
|
border-color: #ff6b35;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.origin-composite,
|
||||||
|
.contact-composite,
|
||||||
|
.subject-cell {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
line-height: 1.3;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Typography Classes */
|
||||||
|
.panel-title-lbl {
|
||||||
|
font-size: 0.72rem;
|
||||||
|
color: rgba(255, 255, 255, 0.4);
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.platform-lbl {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.direction-lbl {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node-dim {
|
||||||
|
color: rgba(255, 255, 255, 0.4);
|
||||||
|
font-size: 0.78rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-mono {
|
||||||
|
font-family: monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-name {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 500;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-email, .message-subtext {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subject-text {
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
font-weight: 500;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Status Color Tokens */
|
||||||
|
.text-purple {
|
||||||
|
color: #bd00ff;
|
||||||
|
stroke: #bd00ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-cyan {
|
||||||
|
color: #00b4d8;
|
||||||
|
stroke: #00b4d8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-red {
|
||||||
|
color: #e63946;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-yellow {
|
||||||
|
color: #ffb703;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-emerald {
|
||||||
|
color: #2a9d8f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-indicator {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success-text {
|
||||||
|
color: #2a9d8f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-text {
|
||||||
|
color: #e63946;
|
||||||
|
}
|
||||||
|
|
||||||
|
.idle-text {
|
||||||
|
color: #ffb703;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Priority Badge Elements */
|
||||||
|
.priority-tag {
|
||||||
|
font-size: 0.68rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: monospace;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
width: max-content;
|
||||||
|
|
||||||
|
&.critical {
|
||||||
|
background: rgba(230, 57, 70, 0.12);
|
||||||
|
color: #e63946;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.high {
|
||||||
|
background: rgba(255, 183, 3, 0.12);
|
||||||
|
color: #ffb703;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.medium {
|
||||||
|
background: rgba(0, 180, 216, 0.12);
|
||||||
|
color: #00b4d8;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.low {
|
||||||
|
background: rgba(255, 255, 255, 0.04);
|
||||||
|
color: rgba(255, 255, 255, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-retry-btn {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid rgba(230, 57, 70, 0.4);
|
||||||
|
color: #e63946;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Paginator & Loading Elements */
|
||||||
|
.grid-paginator-wrapper {
|
||||||
|
margin-top: 1.25rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
::deep .blazor-quickgrid-paginator button {
|
||||||
|
background: rgba(255, 255, 255, 0.02) !important;
|
||||||
|
border: 1px solid rgba(255, 107, 53, 0.1) !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.console-loader {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 6rem 2rem;
|
||||||
|
color: rgba(255, 255, 255, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
border: 2px solid rgba(255, 107, 53, 0.1);
|
||||||
|
border-top-color: #ff6b35;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 0.8s linear infinite;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh-icon.spinning {
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Absolute Fullscreen initial overlay alignment rules for a clean loading UX */
|
||||||
|
.initial-page-fullscreen-loader {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background: #0b1116; /* Fallback baseline dark match */
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
z-index: 9999;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.loader-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Seamless Grid Sync Loading Overlay --- */
|
||||||
|
.relative-grid-container {
|
||||||
|
position: relative;
|
||||||
|
min-height: 250px; /* Prevents container collapse when data updates */
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-inline-loading-veil {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(11, 17, 22, 0.7); /* Translucent dark tint matching workspace canvas */
|
||||||
|
backdrop-filter: blur(4px); /* Clean frosted separation without changing structural layouts */
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 8px;
|
||||||
|
animation: fadeInVeil 0.15s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.veil-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInVeil {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
X. BROAD VIEWPORT TELEMETRY CANVASES (Circuit Matrix Backdrop)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.workspace-ambient-backdrop {
|
||||||
|
position: fixed; /* Securely locks backdrop layer behind all scroll surfaces */
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
/* PERCENT-ENCODED INLINE SVG CIRCUIT GRID ENGINE:
|
||||||
|
- Uses a highly diluted telemetry orange mix matching your #ff6b35 accent tags.
|
||||||
|
- Built out of interlocking data nodes, traces, and measurement crosshairs.
|
||||||
|
*/
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='rgba(255, 107, 53, 0.11)' stroke-width='1.2'%3E%3C!-- Core Element 1: Center Tech Microprocessor Node --%3E%3Crect x='70' y='70' width='40' height='40' rx='3' stroke-width='1.5'/%3E%3Ccircle cx='90' cy='90' r='10' stroke-dasharray='2 2'/%3E%3Ccircle cx='90' cy='90' r='3' fill='rgba(255, 107, 53, 0.05)'/%3E%3C!-- Core Element 2: Radiating Bus Traces %26 Corner Trunks --%3E%3Cpath d='M 90,70 L 90,40 L 70,40 M 90,110 L 90,140 L 110,140 M 70,90 L 40,90 L 40,110 M 110,90 L 140,90 L 140,70'/%3E%3Ccircle cx='70' cy='40' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3Ccircle cx='110' cy='140' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3Ccircle cx='40' cy='110' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3Ccircle cx='140' cy='70' r='2.5' fill='rgba(255, 107, 53, 0.15)'/%3E%3C!-- Core Element 3: Peripheral Data Junctions (Interlocking Corners) --%3E%3Ccircle cx='0' cy='0' r='35' stroke-width='0.8'/%3E%3Ccircle cx='0' cy='0' r='20' stroke-dasharray='4 3'/%3E%3Ccircle cx='180' cy='0' r='35' stroke-width='0.8'/%3E%3Ccircle cx='180' cy='0' r='20' stroke-dasharray='4 3'/%3E%3Ccircle cx='0' cy='180' r='35' stroke-width='0.8'/%3E%3Ccircle cx='0' cy='180' r='20' stroke-dasharray='4 3'/%3E%3Ccircle cx='180' cy='180' r='35' stroke-width='0.8'/%3E%3Ccircle cx='180' cy='180' r='20' stroke-dasharray='4 3'/%3E%3C!-- Target Scope Crosshairs --%3E%3Cpath d='M 0,90 L 15,90 M 180,90 L 165,90 M 90,0 L 90,15 M 90,180 L 90,165' stroke-width='0.8' opacity='0.7'/%3E%3Cpath d='M 25,25 L 35,25 M 25,25 L 25,35 M 155,25 L 145,25 M 155,25 L 155,35 M 25,155 L 35,155 M 25,155 L 25,145 M 155,155 L 145,155 M 155,155 L 155,145' stroke-width='0.9' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
|
||||||
|
background-repeat: repeat;
|
||||||
|
background-size: 180px 180px;
|
||||||
|
/* Radial Mask: Blends perfectly out into your dark layout edges while
|
||||||
|
keeping text components crisp and legible in the foreground */
|
||||||
|
mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.12) 15%, black 80%);
|
||||||
|
-webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.12) 15%, black 80%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Deep contextual underglow to give your glassmorphism cards an illuminated orange edge */
|
||||||
|
.workspace-ambient-backdrop::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient( circle at 50% 45%, rgba(255, 107, 53, 0.04) 0%, rgba(0, 0, 0, 0) 75% );
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
@page "/products"
|
||||||
|
@rendermode RenderMode.InteractiveServer
|
||||||
|
|
||||||
|
<PageTitle>Products & Pricing | Shop Console</PageTitle>
|
||||||
|
|
||||||
|
<div class="workspace-ambient-backdrop"></div>
|
||||||
|
|
||||||
|
<div class="console-workspace">
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<div>
|
||||||
|
<h2>Product Master Ledger</h2>
|
||||||
|
<p class="text-muted">Manage catalog inventory item nodes, price matrixing, and currency variations.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="split-workspace-deck shadow-card">
|
||||||
|
|
||||||
|
<nav class="workspace-wing left-wing domain-nav">
|
||||||
|
<span class="panel-title-lbl">Product Domain</span>
|
||||||
|
|
||||||
|
<div class="domain-menu-list">
|
||||||
|
<div class="domain-nav-item @(ActiveView == ProductView.Create ? "active" : "")"
|
||||||
|
@onclick="() => SwitchView(ProductView.Create)">
|
||||||
|
<div class="nav-status-node"></div>
|
||||||
|
<div class="domain-details">
|
||||||
|
<span class="domain-name">Create Product</span>
|
||||||
|
<span class="domain-desc">Provision new inventory nodes</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="domain-nav-item @(ActiveView == ProductView.ViewAll ? "active" : "")"
|
||||||
|
@onclick="() => SwitchView(ProductView.ViewAll)">
|
||||||
|
<div class="nav-status-node"></div>
|
||||||
|
<div class="domain-details">
|
||||||
|
<span class="domain-name">View Products</span>
|
||||||
|
<span class="domain-desc">Browse & modify active catalog</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="domain-nav-item @(ActiveView == ProductView.Prices ? "active" : "")"
|
||||||
|
@onclick="() => SwitchView(ProductView.Prices)">
|
||||||
|
<div class="nav-status-node"></div>
|
||||||
|
<div class="domain-details">
|
||||||
|
<span class="domain-name">Product Prices</span>
|
||||||
|
<span class="domain-desc">Matrix values & currency rates</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="domain-nav-item @(ActiveView == ProductView.Packages ? "active" : "")"
|
||||||
|
@onclick="() => SwitchView(ProductView.Packages)">
|
||||||
|
<div class="nav-status-node"></div>
|
||||||
|
<div class="domain-details">
|
||||||
|
<span class="domain-name">Product Packages</span>
|
||||||
|
<span class="domain-desc">Bundles, kits, and group logic</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="central-divider-axis">
|
||||||
|
<div class="camel-glow-left"></div>
|
||||||
|
<div class="divider-core-line"></div>
|
||||||
|
<div class="camel-glow-right"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="workspace-wing right-wing content-canvas">
|
||||||
|
@switch (ActiveView)
|
||||||
|
{
|
||||||
|
case ProductView.Create:
|
||||||
|
<CreateProduct />
|
||||||
|
break;
|
||||||
|
case ProductView.ViewAll:
|
||||||
|
<div class="workspace-placeholder-state" style="padding: 2rem;">
|
||||||
|
<span class="panel-title-lbl">Active Item Ledger</span>
|
||||||
|
<p class="text-muted">Awaiting product lookup parameters...</p>
|
||||||
|
</div>
|
||||||
|
break;
|
||||||
|
case ProductView.Prices:
|
||||||
|
<div class="workspace-placeholder-state" style="padding: 2rem;">
|
||||||
|
<span class="panel-title-lbl">Pricing Matrices</span>
|
||||||
|
<p class="text-muted">Awaiting exchange rates configuration profiles...</p>
|
||||||
|
</div>
|
||||||
|
break;
|
||||||
|
case ProductView.Packages:
|
||||||
|
<div class="workspace-placeholder-state" style="padding: 2rem;">
|
||||||
|
<span class="panel-title-lbl">Kit & Bundle Registers</span>
|
||||||
|
<p class="text-muted">Awaiting relational node definitions...</p>
|
||||||
|
</div>
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
// Enum declaration to rigidly manage split view panel state mapping safely
|
||||||
|
private enum ProductView
|
||||||
|
{
|
||||||
|
Create,
|
||||||
|
ViewAll,
|
||||||
|
Prices,
|
||||||
|
Packages
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default runtime tracking state variables
|
||||||
|
private ProductView ActiveView { get; set; } = ProductView.Create;
|
||||||
|
|
||||||
|
private void SwitchView(ProductView targetView)
|
||||||
|
{
|
||||||
|
ActiveView = targetView;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
namespace ShopAdmin.Components.Pages;
|
||||||
|
|
||||||
|
public partial class Products
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,205 @@
|
|||||||
|
/* ==========================================================================
|
||||||
|
1. BROAD VIEWPORT KALEIDOSCOPE BACKDROP (The Arrow Targets)
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
|
.workspace-ambient-backdrop {
|
||||||
|
position: fixed; /* Securely locks backdrop layer behind all scroll surfaces */
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
/* ENHANCED INLINE SVG EXOTIC FRUIT KALEIDOSCOPE
|
||||||
|
- Increased stroke values from 0.035 up to 0.14 for striking visibility.
|
||||||
|
- Clean, un-broken cross-browser safe rendering framework.
|
||||||
|
*/
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='rgba(0, 163, 224, 0.14)' stroke-width='1.2'%3E%3Ccircle cx='80' cy='80' r='75'/%3E%3Ccircle cx='80' cy='80' r='50'/%3E%3Ccircle cx='80' cy='80' r='25'/%3E%3Cpath d='M80,0 L80,160 M0,80 L160,80 M23.43,23.43 L136.57,136.57 M23.43,136.57 L136.57,23.43' stroke-dasharray='3 3' opacity='0.6'/%3E%3Cpolygon points='80,15 95,65 145,80 95,95 80,145 65,95 15,80 65,65' stroke-width='0.8'/%3E%3Ccircle cx='0' cy='0' r='20'/%3E%3Ccircle cx='160' cy='0' r='20'/%3E%3Ccircle cx='0' cy='160' r='20'/%3E%3Ccircle cx='160' cy='160' r='20'/%3E%3C/g%3E%3C/svg%3E");
|
||||||
|
background-repeat: repeat;
|
||||||
|
background-size: 160px 160px;
|
||||||
|
/* RADIAL VIGNETTE MASK OPTIMIZATION:
|
||||||
|
Allows the shapes to render significantly sharper as they approach
|
||||||
|
the outer screen margins.
|
||||||
|
*/
|
||||||
|
mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.15) 20%, black 80%);
|
||||||
|
-webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,0.15) 20%, black 80%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Vivid ambient brand cyan underglow backing layout layers */
|
||||||
|
.workspace-ambient-backdrop::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient( circle at 50% 45%, rgba(0, 163, 224, 0.05) 0%, rgba(0, 0, 0, 0) 80% );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
2. MAIN INTERFACE WORKSPACE (The Master Deck Card Block)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.console-workspace {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1; /* Keeps user actions and console content layers strictly on top */
|
||||||
|
max-width: 1340px;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 2rem 1.5rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.split-workspace-deck {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 280px auto 1fr;
|
||||||
|
min-height: 620px;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Translucent Obsidian Glassmorphism panel block */
|
||||||
|
.shadow-card {
|
||||||
|
background: rgba(10, 14, 20, 0.75);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.03);
|
||||||
|
box-shadow: 0 24px 60px 0 rgba(0, 0, 0, 0.85);
|
||||||
|
/* Fully separates workspace views from the outer geometric cyan fruit array */
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
3. DOMAIN SUB-NAVIGATION CONTROL
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.domain-menu-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.75rem;
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-nav-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.22s ease-in-out;
|
||||||
|
opacity: 0.45;
|
||||||
|
user-select: none;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-nav-item:hover {
|
||||||
|
opacity: 0.85;
|
||||||
|
transform: translateX(4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-nav-item.active {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-nav-item .nav-status-node {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
margin-top: 0.45rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
transition: all 0.25s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-nav-item.active .nav-status-node {
|
||||||
|
background: #ff6b35; /* Crisp orange interaction state highlight */
|
||||||
|
box-shadow: 0 0 8px 2px rgba(255, 107, 53, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-details {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-name {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #ffffff;
|
||||||
|
letter-spacing: -0.1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.domain-desc {
|
||||||
|
font-size: 0.76rem;
|
||||||
|
color: rgba(255, 255, 255, 0.38);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
4. CENTRAL SHIELD ARCHITECTURAL DIVIDER AXIS
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.workspace-wing {
|
||||||
|
padding: 2.5rem 2rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-wing.domain-nav {
|
||||||
|
padding-right: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.central-divider-axis {
|
||||||
|
position: relative;
|
||||||
|
width: 60px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider-core-line {
|
||||||
|
width: 1px;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient( to bottom, rgba(255, 107, 53, 0) 0%, rgba(255, 107, 53, 0.12) 20%, rgba(255, 107, 53, 0.8) 50%, rgba(255, 107, 53, 0.12) 80%, rgba(255, 107, 53, 0) 100% );
|
||||||
|
}
|
||||||
|
|
||||||
|
.camel-glow-left {
|
||||||
|
position: absolute;
|
||||||
|
right: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 45px;
|
||||||
|
height: 280px;
|
||||||
|
border-radius: 50% 0 0 50%;
|
||||||
|
background: radial-gradient( ellipse at right, rgba(255, 107, 53, 0.07) 0%, rgba(255, 107, 53, 0.02) 55%, rgba(0, 0, 0, 0) 85% );
|
||||||
|
filter: blur(6px);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.camel-glow-right {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 45px;
|
||||||
|
height: 280px;
|
||||||
|
border-radius: 0 50% 50% 0;
|
||||||
|
background: radial-gradient( ellipse at left, rgba(255, 107, 53, 0.07) 0%, rgba(255, 107, 53, 0.02) 55%, rgba(0, 0, 0, 0) 85% );
|
||||||
|
filter: blur(6px);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-title-lbl {
|
||||||
|
font-size: 0.72rem;
|
||||||
|
color: #ff6b35;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1.5px;
|
||||||
|
}
|
||||||
@@ -1,6 +1,11 @@
|
|||||||
<Router AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(Pages.NotFound)">
|
<Router AppAssembly="@typeof(Program).Assembly">
|
||||||
<Found Context="routeData">
|
<Found Context="routeData">
|
||||||
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
|
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||||
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||||
</Found>
|
</Found>
|
||||||
</Router>
|
<NotFound>
|
||||||
|
<LayoutView Layout="@typeof(MainLayout)">
|
||||||
|
<ShopAdmin.Components.Pages.NotFound />
|
||||||
|
</LayoutView>
|
||||||
|
</NotFound>
|
||||||
|
</Router>
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
|
<div class="auth-state-container">
|
||||||
|
<AuthorizeView>
|
||||||
|
<Authorized>
|
||||||
|
<div class="auth-indicator authenticated">
|
||||||
|
<div class="user-meta-stack">
|
||||||
|
<span class="meta-row-primary">@Name</span>
|
||||||
|
<span class="meta-row-secondary">@Email</span>
|
||||||
|
<span class="meta-row-secondary">@LoginTime</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Authorized>
|
||||||
|
<NotAuthorized>
|
||||||
|
<div class="auth-indicator unauthenticated">
|
||||||
|
<svg class="security-lock-vector" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<filter id="amber-cyber-glow" x="-30%" y="-30%" width="160%" height="160%">
|
||||||
|
<feGaussianBlur stdDeviation="3.5" result="blur" />
|
||||||
|
<feComposite in="SourceGraphic" in2="blur" operator="over" />
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<g class="lock-chassis" filter="url(#amber-cyber-glow)">
|
||||||
|
<path d="M 32,45 V 24 L 38,18 H 62 L 68,24 V 45" stroke="#ffd166" stroke-width="3.5" fill="none" stroke-linecap="square" stroke-linejoin="miter" />
|
||||||
|
|
||||||
|
<rect x="20" y="45" width="60" height="32" fill="#03090b" stroke="#ffd166" stroke-width="3.5" stroke-linejoin="miter" />
|
||||||
|
|
||||||
|
<polygon points="47,54 53,54 55,60 45,60" fill="#ffd166" />
|
||||||
|
<rect x="48.5" y="60" width="3" height="10" fill="#ffd166" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</NotAuthorized>
|
||||||
|
</AuthorizeView>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[CascadingParameter]
|
||||||
|
private Task<AuthenticationState>? AuthStateTask { get; set; }
|
||||||
|
|
||||||
|
private System.Security.Claims.ClaimsPrincipal? UserPrincipal;
|
||||||
|
|
||||||
|
private string? Name { get; set; }
|
||||||
|
private string? Email { get; set; }
|
||||||
|
private DateTime? LoginTime { get; set; }
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
if (AuthStateTask != null)
|
||||||
|
{
|
||||||
|
var authState = await AuthStateTask;
|
||||||
|
|
||||||
|
UserPrincipal = authState.User;
|
||||||
|
|
||||||
|
Name = UserPrincipal?.Identity?.Name;
|
||||||
|
Email = UserPrincipal?.FindFirst(System.Security.Claims.ClaimTypes.Email)?.Value;
|
||||||
|
|
||||||
|
var authTimeClaim = UserPrincipal?.FindFirst("auth_time")?.Value;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(authTimeClaim) && long.TryParse(authTimeClaim, out long unixSeconds))
|
||||||
|
{
|
||||||
|
var dateTimeOffset = DateTimeOffset.FromUnixTimeSeconds(unixSeconds);
|
||||||
|
LoginTime = dateTimeOffset.LocalDateTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/* TopBarAuthstateView.razor.css */
|
||||||
|
|
||||||
|
.auth-state-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
/* REMOVED min-width: 160px; -> Let the box collapse to exactly the icon's width */
|
||||||
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
|
/* Sliced down to a tight, crisp margin from the right browser edge */
|
||||||
|
padding-right: 6px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* Keeps it anchored to the far right side of your header layout layout */
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-indicator {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
width: auto; /* Collapses container layout tight */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pristine yellow security lock vector */
|
||||||
|
.security-lock-vector {
|
||||||
|
width: auto;
|
||||||
|
height: 48px; /* Preserved your ideal visual size */
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Subtle hardware-accelerated technological power-hum pulse */
|
||||||
|
.unauthenticated .lock-chassis {
|
||||||
|
animation: clean-cyber-pulse 4s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PRE-STRUCTURED TEXT STACKS: Active right-aligned layout framework */
|
||||||
|
.user-meta-stack {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: right;
|
||||||
|
font-family: inherit;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-row-primary {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ffffff;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-row-secondary {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #4dabff;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mixed weighting classes pre-staged for detailed user metadata strings */
|
||||||
|
.meta-row-large-bold {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 1.2;
|
||||||
|
letter-spacing: 0.25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta-row-small-regular {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #4dabff;
|
||||||
|
opacity: 0.85;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes clean-cyber-pulse {
|
||||||
|
0%, 100% {
|
||||||
|
filter: drop-shadow(0px 0px 4px rgba(255, 209, 102, 0.35));
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
filter: drop-shadow(0px 0px 14px rgba(255, 209, 102, 0.65));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,3 +9,4 @@
|
|||||||
@using ShopAdmin
|
@using ShopAdmin
|
||||||
@using ShopAdmin.Components
|
@using ShopAdmin.Components
|
||||||
@using ShopAdmin.Components.Layout
|
@using ShopAdmin.Components.Layout
|
||||||
|
@using ShopAdmin.Components.Pages
|
||||||
|
|||||||
+75
-1
@@ -8,6 +8,8 @@ var builder = WebApplication.CreateBuilder(args);
|
|||||||
builder.Services.AddRazorComponents()
|
builder.Services.AddRazorComponents()
|
||||||
.AddInteractiveServerComponents();
|
.AddInteractiveServerComponents();
|
||||||
|
|
||||||
|
builder.Services.AddCascadingAuthenticationState();
|
||||||
|
|
||||||
builder.AddMonitoring();
|
builder.AddMonitoring();
|
||||||
|
|
||||||
builder.Services.AddControllers();
|
builder.Services.AddControllers();
|
||||||
@@ -15,6 +17,7 @@ builder.Services.AddBlazoredToast();
|
|||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
|
|
||||||
builder.Services.AddMediator();
|
builder.Services.AddMediator();
|
||||||
|
builder.Services.AddGarageS3(builder.Configuration);
|
||||||
|
|
||||||
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
|
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
|
||||||
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
|
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
|
||||||
@@ -33,6 +36,56 @@ builder.Services.AddPostgresHealtchCheck();
|
|||||||
builder.Services.AddQuartzHealtchCheck();
|
builder.Services.AddQuartzHealtchCheck();
|
||||||
builder.Services.AddHealthChecksSupport(builder.Configuration);
|
builder.Services.AddHealthChecksSupport(builder.Configuration);
|
||||||
|
|
||||||
|
builder.Services.AddAuthentication(options =>
|
||||||
|
{
|
||||||
|
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||||
|
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
|
||||||
|
})
|
||||||
|
.AddCookie()
|
||||||
|
.AddOpenIdConnect(options =>
|
||||||
|
{
|
||||||
|
options.Authority = builder.Configuration.GetSection("IdKongisa:Authority").Value;
|
||||||
|
options.ClientId = builder.Configuration.GetSection("IdKongisa:ClientId").Value;
|
||||||
|
options.ClientSecret = builder.Configuration.GetSection("IdKongisa:ClientSecret").Value;
|
||||||
|
|
||||||
|
options.ResponseType = "code";
|
||||||
|
options.SaveTokens = true;
|
||||||
|
|
||||||
|
options.GetClaimsFromUserInfoEndpoint = true;
|
||||||
|
|
||||||
|
options.MetadataAddress = $"{options.Authority}/.well-known/openid-configuration";
|
||||||
|
|
||||||
|
options.Scope.Clear();
|
||||||
|
options.Scope.Add("openid");
|
||||||
|
options.Scope.Add("profile");
|
||||||
|
options.Scope.Add("email");
|
||||||
|
|
||||||
|
options.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters
|
||||||
|
{
|
||||||
|
NameClaimType = "name",
|
||||||
|
RoleClaimType = "groups"
|
||||||
|
};
|
||||||
|
|
||||||
|
options.Events = new OpenIdConnectEvents
|
||||||
|
{
|
||||||
|
OnRedirectToIdentityProvider = context =>
|
||||||
|
{
|
||||||
|
var fallbackUri = context.ProtocolMessage.RedirectUri;
|
||||||
|
|
||||||
|
if (fallbackUri.StartsWith("http://", StringComparison.OrdinalIgnoreCase))
|
||||||
|
context.ProtocolMessage.RedirectUri = fallbackUri.Replace("http://", "https://", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.Services.Configure<ForwardedHeadersOptions>(options =>
|
||||||
|
{
|
||||||
|
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
||||||
|
options.KnownProxies.Clear();
|
||||||
|
});
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>();
|
var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>();
|
||||||
@@ -41,6 +94,8 @@ var scheduler = await schedulerFactory.GetScheduler(ShopSchedulerName);
|
|||||||
if (!scheduler!.IsStarted)
|
if (!scheduler!.IsStarted)
|
||||||
await scheduler.Start();
|
await scheduler.Start();
|
||||||
|
|
||||||
|
app.UseForwardedHeaders();
|
||||||
|
|
||||||
if (!app.Environment.IsDevelopment())
|
if (!app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
||||||
@@ -53,11 +108,30 @@ app.UseHealthChecks("/health", new HealthCheckOptions
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);
|
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);
|
||||||
app.UseHttpsRedirection();
|
|
||||||
|
|
||||||
|
app.UseHttpsRedirection();
|
||||||
app.UseAntiforgery();
|
app.UseAntiforgery();
|
||||||
|
|
||||||
|
app.UseAuthentication();
|
||||||
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.MapStaticAssets();
|
app.MapStaticAssets();
|
||||||
|
|
||||||
|
app.MapGet("/auth/login", (string redirectUri = "/") =>
|
||||||
|
Results.Challenge(new AuthenticationProperties { RedirectUri = redirectUri }, [OpenIdConnectDefaults.AuthenticationScheme]));
|
||||||
|
|
||||||
|
app.MapGet("/auth/logout", async (HttpContext context) =>
|
||||||
|
{
|
||||||
|
await context.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
|
|
||||||
|
string currentBaseUrl = $"https://{context.Request.Host}{context.Request.PathBase}/";
|
||||||
|
|
||||||
|
await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
|
||||||
|
{
|
||||||
|
RedirectUri = currentBaseUrl
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
app.MapRazorComponents<App>()
|
app.MapRazorComponents<App>()
|
||||||
.AddInteractiveServerRenderMode();
|
.AddInteractiveServerRenderMode();
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,20 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="LiteCharms.Features" Version="1.32.0" />
|
<PackageReference Include="LiteCharms.Features" Version="1.40.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" Version="10.0.8" />
|
||||||
<PackageReference Include="Polly" Version="8.6.6" />
|
<PackageReference Include="Polly" Version="8.6.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- Authentication-->
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.8" />
|
||||||
|
|
||||||
|
<!-- Global Usings -->
|
||||||
|
<Using Include="Microsoft.AspNetCore.Authentication.Cookies" />
|
||||||
|
<Using Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- UI -->
|
<!-- UI -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ANM.Blazored.Toast" Version="0.1.1" />
|
<PackageReference Include="ANM.Blazored.Toast" Version="0.1.1" />
|
||||||
@@ -48,6 +58,12 @@
|
|||||||
|
|
||||||
<!-- Shared Global Usings -->
|
<!-- Shared Global Usings -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Using Include="MimeKit" />
|
||||||
|
<Using Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Using Include="Microsoft.AspNetCore.Components.Forms" />
|
||||||
|
<Using Include="Microsoft.AspNetCore.Components.QuickGrid" />
|
||||||
|
<Using Include="Microsoft.AspNetCore.HttpOverrides" />
|
||||||
|
<Using Include="Microsoft.AspNetCore.Authentication" />
|
||||||
<Using Include="Blazored.Toast" />
|
<Using Include="Blazored.Toast" />
|
||||||
<Using Include="Quartz" />
|
<Using Include="Quartz" />
|
||||||
<Using Include="Mediator" />
|
<Using Include="Mediator" />
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
{
|
{
|
||||||
|
"BookshopS3Settings": {
|
||||||
|
"ServiceUrl": "http://192.168.1.177:30900",
|
||||||
|
"Region": "garage",
|
||||||
|
"BucketName": "bookshop",
|
||||||
|
"CdnBaseUrl": "https://bookshop.cdn.khongisa.co.za"
|
||||||
|
},
|
||||||
|
"IdKongisa": {
|
||||||
|
"Authority": "https://id.khongisa.co.za/application/o/litecharms-shopadmin"
|
||||||
|
},
|
||||||
"Email": {
|
"Email": {
|
||||||
"Credentials": {
|
"Credentials": {
|
||||||
"Username": "shop@litecharms.co.za"
|
"Username": "shop@litecharms.co.za"
|
||||||
|
|||||||
+126
-36
@@ -1,60 +1,150 @@
|
|||||||
|
/* --- 1. Variables & Global Reset --- */
|
||||||
|
:root {
|
||||||
|
/* --- BRAND CORES --- */
|
||||||
|
--brand-blue: #0096c7;
|
||||||
|
--hover-blue: #4dabff;
|
||||||
|
/* --- NEW CANVAS BALANCE --- */
|
||||||
|
/* Lighter, slate-tinted midnight for the main workspace body */
|
||||||
|
--body-bg: #0b1519;
|
||||||
|
/* Deep obsidian for the fixed navigation anchors */
|
||||||
|
--bar-bg: #03090b;
|
||||||
|
/* The NavShelf background: sits right between the bar and body */
|
||||||
|
--shelf-bg: #070e10;
|
||||||
|
/* --- TYPOGRAPHY & LINES --- */
|
||||||
|
--text-white: #f8f9fa;
|
||||||
|
/* Soft cyan-gray tone for secondary text and structural borders */
|
||||||
|
--payoff-color: #90e0ef;
|
||||||
|
--border-low-opacity: rgba(144, 224, 239, 0.08);
|
||||||
|
--border-mid-opacity: rgba(144, 224, 239, 0.18);
|
||||||
|
--header-height: 92px;
|
||||||
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
background-color: var(--bar-bg);
|
||||||
|
color: var(--text-white);
|
||||||
|
overflow-x: hidden;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
a, .btn-link {
|
/* --- 2. Layout: Top Bar --- */
|
||||||
color: #006bb7;
|
.top-bar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: var(--header-height);
|
||||||
|
background-color: var(--bar-bg);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 1.5rem; /* Balanced horizontal spacing for both sides */
|
||||||
|
z-index: 1000;
|
||||||
|
border-bottom: 1px solid rgba(144, 224, 239, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
/* --- 3. Branding & Logo --- */
|
||||||
color: #fff;
|
.brand {
|
||||||
background-color: #1b6ec2;
|
text-decoration: none;
|
||||||
border-color: #1861ac;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
.brand-mark {
|
||||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
height: 70px;
|
||||||
|
width: auto;
|
||||||
|
flex-shrink: 0;
|
||||||
|
filter: drop-shadow(0 0 12px rgba(0, 180, 216, 0.5));
|
||||||
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.brand:hover .brand-mark {
|
||||||
padding-top: 1.1rem;
|
transform: rotate(5deg) scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1:focus {
|
.text-column {
|
||||||
outline: none;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
padding-left: 16px;
|
||||||
|
margin-left: 8px;
|
||||||
|
height: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.valid.modified:not([type=checkbox]) {
|
.brand-main {
|
||||||
outline: 1px solid #26b050;
|
font-size: 1.8rem;
|
||||||
|
font-weight: 800;
|
||||||
|
color: var(--text-white);
|
||||||
|
letter-spacing: -0.5px;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invalid {
|
.brand-accent {
|
||||||
outline: 1px solid #e50000;
|
color: var(--brand-blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
.validation-message {
|
.payoff-line {
|
||||||
color: #e50000;
|
font-size: 0.82rem;
|
||||||
|
color: var(--payoff-color);
|
||||||
|
margin-top: 2px;
|
||||||
|
letter-spacing: 0.3px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blazor-error-boundary {
|
/* --- 4. Page Structure --- */
|
||||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
.page-wrapper {
|
||||||
padding: 1rem 1rem 1rem 3.7rem;
|
display: flex;
|
||||||
color: white;
|
flex-direction: column;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
padding-top: var(--header-height);
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: var(--bar-bg);
|
||||||
|
position: relative;
|
||||||
|
transition: padding-right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.blazor-error-boundary::after {
|
main {
|
||||||
content: "An error has occurred."
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
background-color: var(--body-bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Responsive Logic --- */
|
||||||
|
@media (max-width: 1200px) {
|
||||||
|
.top-bar {
|
||||||
|
padding: 0 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Custom Scrollbar Branding --- */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: var(--bar-bg);
|
||||||
|
border-left: 1px solid rgba(144, 224, 239, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--brand-blue);
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px solid var(--bar-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--hover-blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
.darker-border-checkbox.form-check-input {
|
* {
|
||||||
border-color: #929292;
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: var(--brand-blue) var(--bar-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
|
|
||||||
color: var(--bs-secondary-color);
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
@@ -7,24 +7,31 @@ metadata:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: shop-config
|
name: shopadmin-config
|
||||||
namespace: litecharms-shopadmin-uat
|
namespace: litecharms-shopadmin-uat
|
||||||
data:
|
data:
|
||||||
ASPNETCORE_ENVIRONMENT: "Development"
|
ASPNETCORE_ENVIRONMENT: "Development"
|
||||||
ASPNETCORE_URLS: "http://0.0.0.0:8080"
|
ASPNETCORE_URLS: "http://0.0.0.0:8080"
|
||||||
Monitoring__Address: "http://aspire-dashboard-service.aspire.svc.cluster.local:18889"
|
Monitoring__Address: "http://aspire-dashboard-service.aspire.svc.cluster.local:18889"
|
||||||
Monitoring__ServiceName: "LiteCharms.Shop.Uat"
|
Monitoring__ServiceName: "LiteCharms.ShopAdmin.Uat"
|
||||||
|
IdKongisa__Authority: "https://id.khongisa.co.za/application/o/litecharms-shopadmin"
|
||||||
|
BooshopS3Settings__ServiceUrl: "http://garage.garage.svc.cluster.local:3900"
|
||||||
|
BooshopS3Settings__Region: "garage"
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: shop-secrets
|
name: shopadmin-secrets
|
||||||
namespace: litecharms-shopadmin-uat
|
namespace: litecharms-shopadmin-uat
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNob3AtZGV2O1VzZXJuYW1lPXNob3AtZGV2LXVzZXI7UGFzc3dvcmQ9a1ZWbW9XS0ozeHpnUVg7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
|
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNob3AtZGV2O1VzZXJuYW1lPXNob3AtZGV2LXVzZXI7UGFzc3dvcmQ9a1ZWbW9XS0ozeHpnUVg7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
|
||||||
connection-string-quartz: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
|
connection-string-quartz: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
|
||||||
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
|
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
|
||||||
|
auth-clientid: NUxldE5hSERsUlhOWXo1N3FkMVV1RWN4R01uUDNmT3FXc0RHcWdjUg==
|
||||||
|
auth-clientsecret: a3ZxN3k1anc0M0g4WDRjQW91eGRqRDhNNXdxVUhUQ2I4UjNSVjNVWjI4TUZjTk51NWxhM3g3V1ZZRzQ2QnJFMjVPMnhXRmhoeEk0VXNSaFlMTHRqSGRhWWVrUTBmdHpIQ3ZNczV5TXdRdERpcDBkM3QzTkNDa0RtN1JXeW1XSTg=
|
||||||
|
bookshop-s3-accesskey: R0s1MTRkMmNlOGRjNjkyMzdhMDVjMDFlZWY=
|
||||||
|
bookshop-s3-secretkey: ZWFhZmVkYTFhZWQ0MDllY2ZlNjA3MTRlY2RhNTQ5YjgyYmRmNWEzZGFmOWYxOGRkNjFmNjZiNDk3M2E2NDgyZQ==
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
@@ -47,11 +54,11 @@ spec:
|
|||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: shop
|
app: shopadmin
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: shop
|
app: shopadmin
|
||||||
spec:
|
spec:
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
@@ -61,7 +68,7 @@ spec:
|
|||||||
- key: node-role.kubernetes.io/control-plane
|
- key: node-role.kubernetes.io/control-plane
|
||||||
operator: DoesNotExist
|
operator: DoesNotExist
|
||||||
containers:
|
containers:
|
||||||
- name: shop
|
- name: shopadmin
|
||||||
image: nexus.khongisa.co.za/litecharms-shopadmin:latest
|
image: nexus.khongisa.co.za/litecharms-shopadmin:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
resources:
|
resources:
|
||||||
@@ -75,33 +82,53 @@ spec:
|
|||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: shop-config
|
name: shopadmin-config
|
||||||
env:
|
env:
|
||||||
|
- name: BookshopS3Settings__AccessKey
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: shopadmin-secrets
|
||||||
|
key: bookshop-s3-accesskey
|
||||||
|
- name: BookshopS3Settings__SecretKey
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: shopadmin-secrets
|
||||||
|
key: bookshop-s3-secretkey
|
||||||
- name: ConnectionStrings__PostgresScheduler
|
- name: ConnectionStrings__PostgresScheduler
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: shop-secrets
|
name: shopadmin-secrets
|
||||||
key: connection-string-quartz
|
key: connection-string-quartz
|
||||||
- name: ConnectionStrings__PostgresShop
|
- name: ConnectionStrings__PostgresShop
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: shop-secrets
|
name: shopadmin-secrets
|
||||||
key: connection-string
|
key: connection-string
|
||||||
- name: Monitoring__Address
|
- name: Monitoring__Address
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: shop-config
|
name: shopadmin-config
|
||||||
key: Monitoring__Address
|
key: Monitoring__Address
|
||||||
- name: Monitoring__ServiceName
|
- name: Monitoring__ServiceName
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: shop-config
|
name: shopadmin-config
|
||||||
key: Monitoring__ServiceName
|
key: Monitoring__ServiceName
|
||||||
- name: Monitoring__ApiKey
|
- name: Monitoring__ApiKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: shop-secrets
|
name: shopadmin-secrets
|
||||||
key: aspire-apikey
|
key: aspire-apikey
|
||||||
|
- name: IdKongisa__ClientId
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: shopadmin-secrets
|
||||||
|
key: auth-clientid
|
||||||
|
- name: IdKongisa__ClientSecret
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: shopadmin-secrets
|
||||||
|
key: auth-clientsecret
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /app/wwwroot/content
|
mountPath: /app/wwwroot/content
|
||||||
@@ -126,12 +153,12 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: shop-service
|
name: shopadmin-service
|
||||||
namespace: litecharms-shopadmin-uat
|
namespace: litecharms-shopadmin-uat
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
selector:
|
selector:
|
||||||
app: shop
|
app: shopadmin
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
@@ -141,7 +168,7 @@ spec:
|
|||||||
apiVersion: traefik.io/v1alpha1
|
apiVersion: traefik.io/v1alpha1
|
||||||
kind: IngressRoute
|
kind: IngressRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: shop-web-secure
|
name: shopadmin-web-secure
|
||||||
namespace: litecharms-shopadmin-uat
|
namespace: litecharms-shopadmin-uat
|
||||||
spec:
|
spec:
|
||||||
entryPoints:
|
entryPoints:
|
||||||
@@ -150,7 +177,7 @@ spec:
|
|||||||
- match: Host(`shopadmin.uat.khongisa.co.za`)
|
- match: Host(`shopadmin.uat.khongisa.co.za`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
services:
|
services:
|
||||||
- name: shop-service
|
- name: shopadmin-service
|
||||||
port: 80
|
port: 80
|
||||||
sticky:
|
sticky:
|
||||||
cookie:
|
cookie:
|
||||||
|
|||||||
Reference in New Issue
Block a user