This commit is contained in:
Paul Schneider 2026-02-14 16:54:27 +00:00
commit 45514010f2
3505 changed files with 154 additions and 523 deletions

View file

@ -0,0 +1,36 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
using Yavsc.ViewModels.UserFiles;
namespace Yavsc.ViewComponents
{
public class DirectoryViewComponent : ViewComponent
{
private readonly UserManager<ApplicationUser> _userManager;
private readonly SignInManager<ApplicationUser> _signInManager;
public DirectoryViewComponent(UserManager<ApplicationUser> userManager,
SignInManager<ApplicationUser> signInManager)
{
_userManager = userManager;
_signInManager = signInManager;
}
public async Task<IViewComponentResult> InvokeAsync(string dirname)
{
string uid = ViewContext.HttpContext.User.GetUserId();
IViewComponentResult result = null;
result = View(new UserDirectoryInfo(
AbstractFileSystemHelpers.UserFilesDirName,
uid, dirname));
return result;
}
}
}