fix issue #134 - ensure files are not locked by another processs and remove loading indicator

This commit is contained in:
Shaun Walker
2019-10-17 11:39:15 -04:00
parent 82af078677
commit 73feb1f93f
3 changed files with 52 additions and 7 deletions

View File

@ -17,7 +17,7 @@ else
<th>&nbsp;</th>
</Header>
<Row>
<td>@context</td>
<td><a href="@(uri.Scheme + "://" + uri.Authority + "/" + PageState.Site.SiteRootPath + context)" target="_new">@context</a></td>
<td>
<button type="button" class="btn btn-danger" @onclick=@(async () => await DeleteFile(context))>Delete</button>
</td>
@ -29,10 +29,12 @@ else
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Admin; } }
List<string> Files;
Uri uri;
protected override async Task OnParametersSetAsync()
{
Files = await FileService.GetFilesAsync(PageState.Site.SiteRootPath);
uri = new Uri(NavigationManager.Uri);
}
private async Task DeleteFile(string filename)