Merge branch 'main' of https://git.azuze.fr/kawa/SharepointToolbox-Web
This commit is contained in:
@@ -14,11 +14,8 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-title">Source</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Source Site URL</label>
|
||||
<input class="form-input" @bind="_srcSiteUrl" placeholder="@Session.CurrentProfile!.TenantUrl" />
|
||||
</div>
|
||||
<SitePicker Profile="Session.CurrentProfile!" @bind-SelectedSites="_srcSites" Single="true" />
|
||||
<div class="form-row mt-8">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Source Library</label>
|
||||
<input class="form-input" @bind="_srcLibrary" placeholder="Shared Documents" />
|
||||
@@ -32,11 +29,8 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-title">Destination</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Destination Site URL</label>
|
||||
<input class="form-input" @bind="_dstSiteUrl" placeholder="@Session.CurrentProfile!.TenantUrl" />
|
||||
</div>
|
||||
<SitePicker Profile="Session.CurrentProfile!" @bind-SelectedSites="_dstSites" Single="true" />
|
||||
<div class="form-row mt-8">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Destination Library</label>
|
||||
<input class="form-input" @bind="_dstLibrary" placeholder="Shared Documents" />
|
||||
@@ -102,8 +96,9 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
private string _srcSiteUrl = string.Empty, _srcLibrary = string.Empty, _srcFolder = string.Empty;
|
||||
private string _dstSiteUrl = string.Empty, _dstLibrary = string.Empty, _dstFolder = string.Empty;
|
||||
private List<SiteInfo> _srcSites = new(), _dstSites = new();
|
||||
private string _srcLibrary = string.Empty, _srcFolder = string.Empty;
|
||||
private string _dstLibrary = string.Empty, _dstFolder = string.Empty;
|
||||
private string _mode = "Copy", _conflict = "Skip";
|
||||
private bool _includeSourceFolder;
|
||||
private bool _running; private string _status = string.Empty, _error = string.Empty;
|
||||
@@ -118,10 +113,10 @@
|
||||
var progress = new Progress<OperationProgress>(p => { _status = p.Message; _current = p.Current; _total = p.Total; InvokeAsync(StateHasChanged); });
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_srcSiteUrl)) { _error = "Please enter a source site URL."; return; }
|
||||
if (string.IsNullOrWhiteSpace(_dstSiteUrl)) { _error = "Please enter a destination site URL."; return; }
|
||||
var srcUrl = _srcSiteUrl.Trim();
|
||||
var dstUrl = _dstSiteUrl.Trim();
|
||||
var srcUrl = _srcSites.FirstOrDefault()?.Url;
|
||||
var dstUrl = _dstSites.FirstOrDefault()?.Url;
|
||||
if (string.IsNullOrWhiteSpace(srcUrl)) { _error = "Please select a source site."; return; }
|
||||
if (string.IsNullOrWhiteSpace(dstUrl)) { _error = "Please select a destination site."; return; }
|
||||
var job = new TransferJob
|
||||
{
|
||||
SourceSiteUrl = srcUrl, SourceLibrary = _srcLibrary, SourceFolderPath = _srcFolder,
|
||||
|
||||
Reference in New Issue
Block a user