This commit is contained in:
2026-06-02 15:46:13 +02:00
25 changed files with 951 additions and 215 deletions
+6 -8
View File
@@ -15,11 +15,8 @@
@if (UserContext.Role < UserRole.TechN1) { <WriteGuard /> return; }
<div class="card">
<div class="form-row">
<div class="form-group">
<label class="form-label">Site URL</label>
<input class="form-input" @bind="_siteUrl" placeholder="@Session.CurrentProfile!.TenantUrl" />
</div>
<SitePicker Profile="Session.CurrentProfile!" @bind-SelectedSites="_sites" Single="true" />
<div class="form-row mt-8">
<div class="form-group">
<label class="form-label">Library Title</label>
<input class="form-input" @bind="_libraryTitle" placeholder="Shared Documents" />
@@ -56,7 +53,8 @@
}
@code {
private string _siteUrl = string.Empty, _libraryTitle = string.Empty;
private List<SiteInfo> _sites = new();
private string _libraryTitle = string.Empty;
private List<CsvValidationRow<FolderStructureRow>> _rows = new();
private bool _running; private string _status = string.Empty, _error = string.Empty;
private int _current, _total;
@@ -75,8 +73,8 @@
_error = string.Empty; _summary = null; _running = true;
_cts = new CancellationTokenSource();
var validRows = _rows.Where(r => r.IsValid && r.Record != null).Select(r => r.Record!).ToList();
if (string.IsNullOrWhiteSpace(_siteUrl)) { _error = "Please enter a site URL."; _running = false; return; }
var siteUrl = _siteUrl.Trim();
var siteUrl = _sites.FirstOrDefault()?.Url;
if (string.IsNullOrWhiteSpace(siteUrl)) { _error = "Please select a site."; _running = false; return; }
var progress = new Progress<OperationProgress>(p => { _status = p.Message; _current = p.Current; _total = p.Total; InvokeAsync(StateHasChanged); });
try
{