5a23783e07
- Add missing modal CSS (.modal-overlay/.modal-dialog/.modal-header): the "Connect to Microsoft" auth modal was rendering unstyled inline at the bottom of the page. Now a centered dialog with backdrop. - Surface OAuth connect errors in the modal instead of silently reopening it with no explanation. - MainLayout: implement IDisposable so event handlers are actually unsubscribed (Dispose existed but was never invoked). - Wire up the Settings theme selector (was a dead control): drop the unsupported Dark option, call sptb.setTheme on save and on load, resolve System via prefers-color-scheme. - Add branded 404 page via UseStatusCodePagesWithReExecute + Routes <NotFound> (blank white page before). - Add .progress-fill.indeterminate animation and .progress-panel. - Home: replace inline JS hover handlers with a .feature-card CSS class. - Define missing --surface-2 variable referenced by MainLayout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
60 lines
2.6 KiB
Plaintext
60 lines
2.6 KiB
Plaintext
@page "/"
|
|
@attribute [Authorize]
|
|
@inject IUserSessionService Session
|
|
@rendermode InteractiveServer
|
|
|
|
<h1 class="page-title">SharePoint Toolbox</h1>
|
|
|
|
@if (!Session.HasProfile)
|
|
{
|
|
<div class="card">
|
|
<div class="card-title">Welcome</div>
|
|
<p>Select a tenant profile to start using SharePoint Toolbox.</p>
|
|
<a href="/profiles" class="btn btn-primary">Manage Profiles</a>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="card">
|
|
<div class="card-title">Connected: @Session.CurrentProfile!.Name</div>
|
|
<p>Tenant: <strong>@Session.CurrentProfile.TenantUrl</strong></p>
|
|
<div class="flex-row mt-16">
|
|
<a href="/permissions" class="btn btn-secondary">Permissions Audit</a>
|
|
<a href="/storage" class="btn btn-secondary">Storage Metrics</a>
|
|
<a href="/search" class="btn btn-secondary">File Search</a>
|
|
<a href="/user-audit" class="btn btn-secondary">User Access Audit</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;margin-top:16px">
|
|
@foreach (var feature in _features)
|
|
{
|
|
<a href="@feature.Href" style="text-decoration:none;color:inherit">
|
|
<div class="card feature-card">
|
|
<div style="font-size:28px;margin-bottom:8px">@feature.Icon</div>
|
|
<div style="font-weight:600;margin-bottom:4px">@feature.Title</div>
|
|
<div class="text-muted">@feature.Description</div>
|
|
</div>
|
|
</a>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
@code {
|
|
private readonly (string Href, string Icon, string Title, string Description)[] _features = new[]
|
|
{
|
|
("/permissions", "🔐", "Permissions Audit", "Scan site permission assignments"),
|
|
("/storage", "💾", "Storage Metrics", "Analyze library storage usage"),
|
|
("/search", "🔍", "File Search", "KQL-based file search"),
|
|
("/duplicates", "📋", "Duplicates", "Find duplicate files/folders"),
|
|
("/versions", "🗂️", "Version Cleanup", "Delete old file versions"),
|
|
("/transfer", "📦", "File Transfer", "Copy/move files between libraries"),
|
|
("/bulk-members", "👥", "Bulk Members", "Add users to groups via CSV"),
|
|
("/bulk-sites", "🌐", "Bulk Sites", "Create sites from CSV"),
|
|
("/folder-structure", "📁", "Folder Structure", "Create folders from CSV template"),
|
|
("/user-audit", "👤", "User Access Audit", "Audit user permissions cross-site"),
|
|
("/user-directory", "📖", "User Directory", "Browse tenant users via Graph"),
|
|
("/templates", "📐", "Templates", "Capture and apply site templates"),
|
|
};
|
|
}
|