|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.Extensions.FileProviders; |
|
|
|
using NUglify.Helpers; |
|
|
|
@ -42,7 +43,7 @@ namespace Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer |
|
|
|
.Where(d => VirtualFileExplorerConsts.AllowFileInfoTypes.Contains(d.GetType().Name)) |
|
|
|
.OrderByDescending(f => f.IsDirectory).ToList(); |
|
|
|
|
|
|
|
PagerModel = new PagerModel(query.Count, PageSize, CurrentPage, PageSize, $"/VirtualFileExplorer?Path={Path}&PageSize={PageSize}"); |
|
|
|
PagerModel = new PagerModel(query.Count, PageSize, CurrentPage, PageSize, $"{ResolveUrl()}VirtualFileExplorer?Path={Path}&PageSize={PageSize}"); |
|
|
|
|
|
|
|
SetViewModel(query.Skip((CurrentPage - 1) * PageSize).Take(PageSize)); |
|
|
|
SetPathNavigation(); |
|
|
|
@ -71,7 +72,7 @@ namespace Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer |
|
|
|
fileInfoViewModel.Icon = "fas fa-folder"; |
|
|
|
fileInfoViewModel.FileType = "folder"; |
|
|
|
fileInfoViewModel.Length = "/"; |
|
|
|
fileInfoViewModel.FileName =$"<a href='/VirtualFileExplorer?path={fileInfo.PhysicalPath}'>{fileInfo.Name}</a>"; |
|
|
|
fileInfoViewModel.FileName =$"<a href='{ResolveUrl()}VirtualFileExplorer?path={fileInfo.PhysicalPath}'>{fileInfo.Name}</a>"; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
@ -86,7 +87,7 @@ namespace Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer |
|
|
|
{ |
|
|
|
var navigationBuild = new StringBuilder(); |
|
|
|
var pathArray = Path.Split('/').Where(p => !p.IsNullOrWhiteSpace()); |
|
|
|
var href = "/VirtualFileExplorer?path="; |
|
|
|
var href = $"{ResolveUrl()}VirtualFileExplorer?path="; |
|
|
|
|
|
|
|
navigationBuild.Append($"<nav aria-label='breadcrumb'>" + |
|
|
|
$" <ol class='breadcrumb'>" + |
|
|
|
@ -102,5 +103,13 @@ namespace Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer |
|
|
|
|
|
|
|
PathNavigation = navigationBuild.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
private string ResolveUrl() |
|
|
|
{ |
|
|
|
var segment = new PathString("/"); |
|
|
|
var applicationPath = Request.PathBase; |
|
|
|
|
|
|
|
return applicationPath.Add(segment).Value; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|