Merge branch 'main' of https://git.azuze.fr/kawa/SharepointToolbox-Web
This commit is contained in:
@@ -7,9 +7,10 @@
|
||||
@inject IVersionCleanupService VersionSvc
|
||||
@inject VersionCleanupHtmlExportService HtmlExport
|
||||
@inject WebExportService WebExport
|
||||
@inject TranslationSource T
|
||||
@rendermode InteractiveServer
|
||||
|
||||
<h1 class="page-title">Version Cleanup</h1>
|
||||
<h1 class="page-title">@T["versions.page.title"]</h1>
|
||||
|
||||
@if (!Session.HasProfile) { <NoProfilePrompt /> return; }
|
||||
@if (UserContext.Role < UserRole.TechN1) { <WriteGuard /> return; }
|
||||
@@ -18,13 +19,13 @@
|
||||
<SitePicker Profile="Session.CurrentProfile!" @bind-SelectedSites="_sites" Single="true" />
|
||||
<div class="flex-row mt-8">
|
||||
<button class="btn btn-secondary" @onclick="LoadLibraries" disabled="@_loading">
|
||||
@(_loading ? "Loading…" : "Load Libraries")
|
||||
@(_loading ? T["versions.btn.loading"] : T["versions.btn.loadLibs"])
|
||||
</button>
|
||||
</div>
|
||||
@if (_libraries.Count > 0)
|
||||
{
|
||||
<div class="form-group mt-8">
|
||||
<label class="form-label">Libraries (none = all)</label>
|
||||
<label class="form-label">@T["versions.lbl.libsNoneAll"]</label>
|
||||
<div style="max-height:200px;overflow-y:auto;border:1px solid var(--border);border-radius:4px;padding:4px">
|
||||
@foreach (var lib in _libraries)
|
||||
{
|
||||
@@ -38,18 +39,18 @@
|
||||
}
|
||||
<div class="form-row mt-8">
|
||||
<div class="form-group" style="flex:0 0 auto">
|
||||
<label class="form-label">Keep last N versions</label>
|
||||
<label class="form-label">@T["versions.lbl.keepLastN"]</label>
|
||||
<input class="form-input" type="number" @bind="_keepLast" min="0" max="999" style="width:80px" />
|
||||
</div>
|
||||
<div class="form-group" style="display:flex;align-items:center;padding-top:20px">
|
||||
<label><input type="checkbox" @bind="_keepFirst" /> Keep first version</label>
|
||||
<label><input type="checkbox" @bind="_keepFirst" /> @T["versions.chk.keepFirstShort"]</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-row mt-8">
|
||||
<button class="btn btn-danger" @onclick="RunCleanup" disabled="@_running">
|
||||
@(_running ? "Cleaning…" : "Delete Old Versions")
|
||||
@(_running ? T["versions.btn.cleaning"] : T["versions.btn.run"])
|
||||
</button>
|
||||
@if (_running) { <button class="btn btn-secondary" @onclick="Cancel">Cancel</button> }
|
||||
@if (_running) { <button class="btn btn-secondary" @onclick="Cancel">@T["btn.cancel"]</button> }
|
||||
</div>
|
||||
<ProgressPanel IsRunning="_running" StatusMessage="@_status" Current="_current" Total="_total" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user